I was able to emulate what inEventScript CS2 plug-in did, using the EventListener new function build into CS3. UNFORTUNATELY as soon as I close the document(s), InDesign crashes. The script is reliable as it has been used in CS2 for the past 6 months. All I did was to write the script that creates the event. The event gets triggered, the script executes and the handler closes once the script is finished. I can open several Docs. and they all get scripted correctly. It looks like something terminates INCORRECTLY once I close one of the document!
Any suggestion or input will be greatly appreciated. Alex.
Here is the EVENT Script.
app.scriptPreferences.version = 5.0;
//******************** BEGIN Main ********************
//** Number 0
app.addEventListener( "afterOpen", EventOpen, true);
function EventOpen (itsEvent)
var myExeSrcFile = new File (app.scriptArgs.get("Event_Open"));
alert ("Finished Execution"); //*** Debug: Confirms HANDLER termination
alert ("Error! Missing File:\n\n" + myExeSrcFile.fsName);
The scriptArgs are defined during a Startup Script. The "Event_Listener" passes the document opened as an argument to the script and is correctly evaluated w/i the "Event_Open" script.