First of all, Thanks to @SteveC for helping me with command line in Terminal.
I will use ‘Z Perform Action 1’ as the Incoming Perform name and ‘Z Timer’ as the Incoming Timer name for the examples of this post.
For sending parameters to the Incoming Perform action, you must add values or variables separated by commas after the name. As example, “Z Perform Action 1,8,gm” will trigger ‘Z Perform Action 1’ with 2 parameters (8 and the value of the variable gm).
- TERMINAL
You can trigger Perform actions pasting one of the following lines into Terminal:
open -n -a "Bome MIDI Translator Pro" --args -triggerPerform "Z Perform Action 1"
"/Applications/Bome MIDI Translator Pro.app/Contents/MacOS/MIDITranslatorPro" -triggerPerform "Z Perform Action 1"
And trigger Timers with:
open -n -a "Bome MIDI Translator Pro" --args -triggerTimer "Z Timer"
"/Applications/Bome MIDI Translator Pro.app/Contents/MacOS/MIDITranslatorPro" -triggerTimer "Z Timer"
All previous lines will trigger the Perform and also open the main window of BMTP in the frontmost.
If you want to keep BMTP hidden or minimized, add -noShow
at the end of the lines and Terminal will only trigger the Perform or Timer actions:
open -n -a "Bome MIDI Translator Pro" --args -triggerPerform "Z Perform Action 1" -noShow
open -n -a "Bome MIDI Translator Pro" --args -triggerTimer "Z Timer" -noShow
- APPLESCRIPT
You can trigger Perform actions using the following code in AppleScript. Just change the name of the variable actionName:
set appName to quoted form of "/Applications/Bome MIDI Translator Pro.app/Contents/MacOS/MIDITranslatorPro"
set dontShowMainWindow to " -noShow" --don't show the main window if BMTP is hidden or minimized
set triggerName to " -triggerPerform "
------
set actionName to quoted form of "Z Perform Action 1" --change "Z Perform Action 1" for the name of your Incoming Perform action
------
set commandLine to appName & triggerName & actionName & dontShowMainWindow
do shell script commandLine
------
return 1
And for triggering Timers:
set appName to quoted form of "/Applications/Bome MIDI Translator Pro.app/Contents/MacOS/MIDITranslatorPro"
set dontShowMainWindow to " -noShow" --don't show the main window if BMTP is hidden or minimized
set triggerName to " -triggerTimer "
------
set actionName to quoted form of "Z Timer" --change "Z Timer" for the name of your Incoming Timer action
------
set commandLine to appName & triggerName & actionName & dontShowMainWindow
do shell script commandLine
------
return 1
If you want to trigger Timer or Perform actions opening the main window of BMTP , change the following line in these Applescripts:
set commandLine to appName & triggerName & actionName