Copy link to clipboard
Copied
Hi,
I have a menu item say "My Menu" that has a submenu "Batch Process...". This dialog has several radio buttons and a button to begin the batch process. I am trying to script it away.
Here is what I have at the moment:
var menuAction = app.menuActions.itemByName("$ID/Batch Process...");
if(menuAction.enabled) menuAction.invoke();
This does show the dialog box that is intended. However, I have some questions
Q1. Is this the right way to invoke the submenu or is there a more systematic way e.g. menu("My Menu").submenu("Batch Process...")?
Q2. Once the dialog box is shown, is there a way to get a handle/pointer/reference to the displayed dialog?
Q3. How can the script change selections of the radio buttons and invoke the button on the dialog to begin the batch process?
I am finding it hard to come up with a way to systematically build up InD plugin development/scripting knowledge. What am I missing because the only thing is the sdk documentation which is more of a guide than a learning material?
Thanks
Hi asaxena,
if you invoke a dialog, you can see that from the "ellipsis", the "...", at the end of the menu's name, you have no choice to answer that dialog through a menu action with ExtendScript. That's it. So, if you want to invoke a menu action and you do not want to get stuck make sure you use menu actions that work directly on e.g. something like a selection of page items on a spread.
Regards,
Uwe Laubender
( ACP )
Copy link to clipboard
Copied
Hi asaxena,
if you invoke a dialog, you can see that from the "ellipsis", the "...", at the end of the menu's name, you have no choice to answer that dialog through a menu action with ExtendScript. That's it. So, if you want to invoke a menu action and you do not want to get stuck make sure you use menu actions that work directly on e.g. something like a selection of page items on a spread.
Regards,
Uwe Laubender
( ACP )