Copy link to clipboard
Copied
In a script I need to know the state of a menu items checked state - e.g. the View/Proof Colors menu item.
Is that possible? (and of cause if it is how do I do it?)
Thanks,
Jack
Copy link to clipboard
Copied
View > Proof Colors seems to produce no Scripting Listener Code, so I am somewhat skeptical – others may know better, though.
What do you need it for anyway?
A workaround to ensure it is turned it off might be to invoke some random Proof Setup and then toggle Proof Colors.
Copy link to clipboard
Copied
The reason I need the state of "Proof Colors" is that I want to turn on/off the visibility of a layer set depending on its state.
In the layer set I would have my printing adjustments layers. This way it is very easy to compare the image with the softproof. When "Proof Colors" is turned off the printing adjustment layer set would also be turned off - displaying the image without any printing corrections.
When "Proof Colors" is turned on the printing adjustment layer set would also be turned on - displaying the softproof with printing corrections applied.
Jack
Copy link to clipboard
Copied
It's been over 10 years. Does anyone have an answer to this question? I have exactlty the same need (for a different menu item).
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Thank you, there's a lot of useful information there. It looks like the code will examine the items in the main menu bar?
In my case, the menu item I'm interested in is within the Timeline panel. I know the string id of the item ("animationShowNewLayersInFrames"), but I can't just call runMenuItem() because that will toggle the item's state. I need to know whether it's on or off before I decide whether or not to toggle it (I want it to be off).
Any pointers on how to get the state of that menu item?
Copy link to clipboard
Copied
Photoshop does not provide access to the context menu items of the panels. That is, it will most likely fail to find out whether the timeline option you need is enabled or not.
Perhaps this can be understood indirectly (for example, by adding and removing 1 layer on the timeline and analyzing the state of the timeline or layers), however, I have never worked with this panel and have no idea what menu item animationShowNewLayersInFrames is associated with and how changing it affects the document.
Copy link to clipboard
Copied
Thank you for the quick reply.
You would think if Photoshop allows you to manipulate a menu item, there would be a way to query its state as well. But Photoshop scripting can be frustratingly opaque at times.
Copy link to clipboard
Copied
AppleScript could probably tell you… but thats possibly not what you wanted…?
Find more inspiration, events, and resources on the new Adobe Community
Explore Now