1. Download MIDITrail app from OSDN, and put it your desktop.
You can not use MIDITrail of Mac App Store.
2. Launch Automator and select Application.
3. Search "shell" and you will see "Run Shell Script".
4. Drag and drop "Run Shell Script".
5. Set script and your midi file path.
open -W "/Users/xxx/Desktop/MIDITrail.app" --args -p -q "/Users/xxx/Desktop/aaa.mid"
6. Save the file.
7. Double click the file.
If you can use Terminal, you can control MIDITrail by shell scripts.