• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

ExtendScript + Current Dialog

Contributor ,
Nov 08, 2020 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

389

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
community guidelines

correct answers 1 Correct answer

Community Expert , Nov 09, 2020 Nov 09, 2020

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 )

Votes

Translate

Translate
Community Expert ,
Nov 09, 2020 Nov 09, 2020

Copy link to clipboard

Copied

LATEST

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 )

Votes

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
community guidelines