I am writing a script in vbs that uses the beforeClose event and I have most of it working... however .. after some testing with the GetEventInfo.vbs script supplied in the scripting manual it seems the beforeClose event runs twice .. which is fine and is shown in other discussions. When you watch closely though the first time it triggers cancelable is true .. the second time which is too late anyway its false. I'm after the preventdefault() syntax for vbs to cancel the event.... any takers???
Ok .. So I've figured it out and you can definitely cancel the first beforeClose event code is :-
myIndesign.AddEventListener "beforeClose", getref("genPDFClose"), false
rem ...do something here
rem if you want to cancel beforeClose the below two lines work!