Skip to content

ACTN001: Calling Action Bar Entries from Shortcuts and AppleScript

Using Acorn 8 or later, and the Shortcuts app, you can call just about any action available in the menus and even more, the "Call Action Bar" action:

Note

The capitalization and spelling of the command should exactly match what you see in Acorn's Command Bar for best results (except for the trailing '…' on some items; if you use three dots in this case, we'll automatically do the right thing there).

P.S.: The keystroke for getting the "…" character is Option-;

This also works using AppleScript (because of course it does). To do this you would use the do command bar action command. Here's an example:

1
2
3
4
5
tell application "Acorn"
    tell document 1
        do command bar action named "Trim To Inner Opaque Edges"
    end tell
end tell

If you have custom filters or plugins installed, you can also use this interface to use those. For instance, if you have the Insert Random Hexes plugin installed, you can call it like so:

1
2
3
4
5
tell application "Acorn"
    tell document 1
        do command bar action named "Insert Random Hexes"
    end tell
end tell

You can even call it from the shell:

gus@srv:~/.
$ osascript -e 'tell app "Acorn" to tell document 1 to do command bar action named "Insert Random Hexes"'

This is all great and awesome because this means you can call just about any functionality in Acorn via AppleScript, Shortcuts, Automator, or anything that can be piped to Acorn via AppleScript.