There are many ways to use these scripting commands. You can them in addition to the action’s keyboard hotkey or without assigning a hotkey to run the action exclusively with a script command.
The actions used on this page are part of KeyScope’s “Demo Actions”. Go to Menu > File > Import Demo Actions to load them to the Action Editor.
You can trigger any KeyScope action with a simple AppleScript* command in the form of run action
<label>, where <label> is the action label, like this:
tell application "KeyScope"
run action "Solo clear"
end tell
You can also use the action id, like this:
tell application "KeyScope"
run action id "16F6EE87-FAD4-4524-9270-0C9DD10C26F0"
end tell
The return value is either “success” or a custom message like “UI element not found”
“Copy value” type actions return a copied value.
This is a tiny script that copies selection start and end time in Pro Tools to the clipboard:
tell application "KeyScope"
set startTC to run action "Copy - Edit selection start"
set endTC to run action "Copy - Edit selection end"
set returnString to startTC & " - " & endTC
end tell
* Being both OSA languages, KeyScope supports not only AppleScript but also JavaScript for Automation (JXA).
๐ก If you would like to trigger Keyscope actions from a Stream Deck, there is a free plugin on the Elgato marketplace that runs scripts which is called OSA script.