Using Applescript as an Action to show current lay and hide the other layers

How to use Applescript as an Action to show current lay and hide the other layers.

I have three shapes in three layers. I want to use the Applescript as the shape action to hide the current layer and hide others layer.

Can this idea make sense?

You can use the Show/Hide or Toggle Layer action built into OmniGraffle, or if you need something more custom, you can use the Run AppleScript Action and put your AppleScript directly into the Action Inspector. See the section called “Making Objects Interactive with the Action Inspector (PRO)” at https://support.omnigroup.com/documentation/omnigraffle/mac/7.0/en/working-with-the-inspectors/ for information on how to create actions.

@lanettetest Thank you very much. Now, I have read the help document. I face a problem. I don’t know the AppleScript well. Are there some demos of AppleScript in OmniGraffle? Does Your company have some help document of using AppleScript in Omni tools?

If you do not know AppleScript well, try using the built in Show/Hide layer action instead. You do not need to do any scripting to show/hide layers, or to toggle them if you choose that option.

If you do wish to start using AppleScript or there is something beyond the built in OmniGraffle Show/Hide Layer built in action that you need, you’ll want to open the OmniGraffle scripting dictionary. You can view it in the Script Editor application with File->Open Dictionary.