Omni Automation macOS Tutorial: Attached Script URLs
In OmniGraffle, actions (scripts) can be assigned or “attached” to objects, and be triggered through the use of the Action Browse Tool.
“Attached” Action options include:
In this section, we’re going to convert our random color function into an encoded script URL that will be used with the action option of opening a URL.
Creating and Copying a Script URL
We will copy the encoded script from the previous page and assign it to the circle object in the OmniGraffle document. First, let’s create and copy the URL.
DO THIS ► | On the previous page click the Encode Script button 1 to convert the script into an Omni Automation URL, then click the Copy URL button 2 to display the URL selected in an overlay 3 at the top of the screen. Type Command-C (⌘C) to copy the selected script, and then dismiss the overlay by clicking the Close button 4 at the top of the overlay. |
Next, we’ll assign the copied URL to the selected circle object.
DO THIS ► | With the circle object selected, make sure the Inspector 1 sidebar is showing. Click the Properties icon (gear) 2 on the sidebar and scroll the sidebar up to reveal the Action 3 popup menu. Select the “Open a URL” menu option, and then paste the copied script URL into the URL input field 4 below the action options list. Set the URL by pressing the Return key. |
Triggering the Action
Now that the script has been assigned to the circle object, you can use the Action Browser tool to trigger the script.
DO THIS ► | With the circle selected, click the Action Browser tool to set it to be the active tool. |
Note that the browse badge appears over the selected circle and that the cursor changes to a hand:
DO THIS ► | Click the circle with the hand cursor to execute the attached script, which will change the fill, stroke, and text color of the circle. |
You can run the attached script as many times as you like by simply clicking the object with the Browse tool.
Next Topic
Tap the HTML Forms link in the navigation sidebar at the top right of this window.
This webpage is in the process of being developed. Any content may change and may not be accurate or complete at this time.