Omni Automation and the Workflow App

workflow-logoOmni Automation scripts as encoded links can be easily executed by the free Workflow app on iOS.

Simply add the URL action to your workflow document and paste an Omni Automation script link (like the one below) into its input field.

app.activate()
omnigraffle:///omnijs-run?script=app%2Eactivate%28%29

Follow the URL action with the Open URLs action and save the workflow.

TIP: You can use the Web Console page to turn your Omni Automation scripts into links.

Workflow in Workflow App

When the workflow is run, the Omni Automation script will be executed.

Here’s a short video demonstrating using the saved example as a Workflow extension

Run an Omni Automation Script on the Clipboard

Here’s a workflow that converts Omni Automation script code on the clipboard into an Omni Automation script link and executes it. Save it as a Workflow extension and it will be widely available.

Run Script using Clipboard Content

Inserting Content into an Omni Automation Script

Here’s a workflow that will insert the clipboard text contents into an Omni Automation script that creates a textbox containing the text, in the open OmniGraffle document. The process requires the use of multiple workflow variables and the search and replacement of an arbitrary placeholder string (XXXXX).

And here’s the script for creating a text box containing the text that replaces the “XXXXX” placeholder:

nRect = new Rect(0,0,300,300) aShape = document.windows[0].selection.canvas.addShape('Rectangle',nRect) aShape.text = 'XXXXX' aShape.shadowColor = null aShape.strokeType = null aShape.fillType = null aShape.autosizing = TextAutosizing.Overflow aShape.textHorizontalAlignment = HorizontalTextAlignment.Left aShape.textHorizontalPadding = 0 aShape.textVerticalPlacement = VerticalTextPlacement.Top aShape.textVerticalPadding = 0 aShape.textSize = 14 document.windows[0].selection.view.edit(aShape)
omnigraffle:///omnijs-run?script=nRect%20%3D%20new%20Rect%280%2C0%2C300%2C300%29%0AaShape%20%3D%20document%2Ewindows%5B0%5D%2Eselection%2Ecanvas%2EaddShape%28%27Rectangle%27%2CnRect%29%0AaShape%2Etext%20%3D%20%27XXXXX%27%0AaShape%2EshadowColor%20%3D%20null%0AaShape%2EstrokeType%20%3D%20null%0AaShape%2EfillType%20%3D%20null%0AaShape%2Eautosizing%20%3D%20TextAutosizing%2EOverflow%0AaShape%2EtextHorizontalAlignment%20%3D%20HorizontalTextAlignment%2ELeft%0AaShape%2EtextHorizontalPadding%20%3D%200%0AaShape%2EtextVerticalPlacement%20%3D%20VerticalTextPlacement%2ETop%0AaShape%2EtextVerticalPadding%20%3D%200%0AaShape%2EtextSize%20%3D%2014%0Adocument%2Ewindows%5B0%5D%2Eselection%2Eview%2Eedit%28aShape%29
place-clip-workflow
UNDER CONSTRUCTION

This webpage is in the process of being developed. Any content may change and may not be accurate or complete at this time.

DISCLAIMER