Omni Automation iOS 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 tap the Encode Script button 1 to convert the script into an Omni Automation URL, then tap the Copy URL button 2 to display the URL selected in an overlay 3 at the top of the screen. Tap the Copy Selection button 4 at the bottom of the screen, and then dismiss the overlay by tapping the Close button 5 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, tap the Inspector icon 1 to reveal the sidebar. Tap the Properties icon (gear) 2 on the sidebar and scroll the sidebar up to reveal the Action 3 options area. Tap the Opens a URL 4 option, and then paste the copied script URL into the URL input field 5 below the action options list. Set the URL by tapping 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 ► | Tap the Action Browser tool twice to set it to be the active tool. Execute a long press on the circle to select it. |
DO THIS ► | Tap the circle again to execute the attached script. The decoded script will be displayed in a confirmation window. Tap the Run Script button at the bottom of the confirmation overlay. |
The script will change the fill, stroke, and text color of the circle.
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.