Quantcast
Channel: Adobe Community: Message List - InDesign Scripting
Viewing all articles
Browse latest Browse all 37788

EventListener afterOpen, delay

$
0
0

Hello,

 

i'm using Dave Saunders script for saving the window-position, which works fine. http://forums.adobe.com/message/1113471#1113471

A while ago i stumbled upon a script to set metaData to my documents, which works great too. I discovered InD's startup scripts folder. Now I want to merge them together, that the window-pos will be applied after open of every document.

But not being  firm with javascript at all, i can't solve much issues, which I have now: it seems that the afterOpen handler doesnt wait for the document-window to open. Can anyone help me out choosing the right handler to achieve this, or delay the afterOpen to wait for the window to open?

 

#targetengine "session"

main();

 

     function main()

{

var myEventListener1 = app.addEventListener("afterOpen", setWindowPos, false);

}

         

function setWindowPos()

    {

  // the script from the link obove will go here, but really dont know if i can do this this way because lack of js-skills

    }


Viewing all articles
Browse latest Browse all 37788

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>