Thread View: adobe.scripting.indesign
1 messages
1 total messages
Started by ABC_GREEN
Fri, 09 Jan 2009 01:27
JS CS4 Wait for menu item to close
Author: ABC_GREEN
Date: Fri, 09 Jan 2009 01:27
Date: Fri, 09 Jan 2009 01:27
35 lines
1762 bytes
1762 bytes
I am trying to open a dialog in indesign and continue my work after dialog was closed
in vbs my code looks like this and works perfectly
myMenu.invoke [opens Indesign Dialog]
On error resume next
do
err.clear
myIndesign.myFunction(variable1,variable2)
loop while err.Number <> 0 [error while dialog is open andexicutes when dialog closes]
On error Goto 0
in js my codelooks like this
myMenu.invoke [opens Indesign Dialog]
var noError = false;
do{
noError = false;
try{
app.myFunction(variable1,variable2);
}catch(err){
noError = true;
}while(noError==false)
it would work but indesign dialog is not editable.
it seems that vbs runs on seperate thread while js runs on indesigns thread.
I tried addin sleep time into loop but it didn't help.
my js uses its own #engine, if that makes a differance. Would it help if #engine used to invoke menu item was not mine? and would that be possible to maybe call a different js file which has its own engine.
I need it for mac compatability. maybe applescript would solve my problem but I cant figure out how to loop and how to call function with to integer parameters
Thank for any and all help.
ABC GREEN
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads