Highlighted

ExtendScript + Current Dialog

Community Beginner ,
Nov 08, 2020

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

 

TOPICS
How to, Scripting, SDK

Views

34

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

ExtendScript + Current Dialog

Community Beginner ,
Nov 08, 2020

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

 

TOPICS
How to, Scripting, SDK

Views

35

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Nov 08, 2020 0
Adobe Community Professional ,
Nov 09, 2020

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 )

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 09, 2020 0