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

Action is not enabled

Community Beginner ,
Jun 04, 2015 Jun 04, 2015

I'm trying to invoke the menu action in InDesign CS5. I get the error "Action is not enabled."

An item is selected in the app. The menu works if I do it manually. How do I enable this menu action?

Do I need to resort to scripting Apple Events?

‌

TOPICS
Scripting
590
Translate
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 Beginner , Jun 04, 2015 Jun 04, 2015

I actually figured out my main problem was that I was running the code inside the 'tell document' block. It has to be addressed directly to the application.

The final AppleScript code was:

set clearEffects to menu item "Clear Effects" of submenu "Effects" of submenu "Object" of menu 1
select clearEffects

I also figured out this should be in a try block, since if there are no effects applied to the selection, it throws an error. But it works great.

Translate
Participant ,
Jun 04, 2015 Jun 04, 2015

Can you provide the code that doesn't work, and/or the exact name of the Menu Item?

Translate
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
Community Beginner ,
Jun 04, 2015 Jun 04, 2015
LATEST

I actually figured out my main problem was that I was running the code inside the 'tell document' block. It has to be addressed directly to the application.

The final AppleScript code was:

set clearEffects to menu item "Clear Effects" of submenu "Effects" of submenu "Object" of menu 1
select clearEffects

I also figured out this should be in a try block, since if there are no effects applied to the selection, it throws an error. But it works great.

Translate
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
Guide ,
Jun 04, 2015 Jun 04, 2015

What menu action?

Is your menuAction.enabled true?

@+

Marc

Translate
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