Copy link to clipboard
Copied
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?
‌
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.
Copy link to clipboard
Copied
Can you provide the code that doesn't work, and/or the exact name of the Menu Item?
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
What menu action?
Is your menuAction.enabled true?
@+
Marc
Find more inspiration, events, and resources on the new Adobe Community
Explore Now