StartUp Script 4 CLOSE


hi friends,

 

i tried below startup script.

 

 

#targetengine session

app.menuactions.itembyname("close").eventlisteners.add("beforeinvoke", function()

{

    //functions

});

 

 

when closed document via (shortcut -> command + w) keyboard, script executes.

but , when closed document via the close button of doc, nothing happens

please advise.

 

thanx in advance..........

indesign's shortcut points menu item, , menu item caught event handler. has same effect, whether press shortcut key or select "close" file menu.

 

the close button, on other hand, generates different event , not call actual menu item close. imagine similar thing happens when force-quit indesign through task manager -- not *all* events caught id on scriptable level.

 

i think able intercept window close button, need write actual plugin. that, or instruct users not use close button under circumstances.



More discussions in InDesign Scripting


adobe

Comments

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

PProHeadless.exe has stopped working error when opening projects in Adobe Media Encoder CS6

Preconditions Failed. - Joomla! Forum - community, help and support