1 (edited by bsfreq 2013-08-17 14:28:07)

Topic: Help needed with writing applescript (to select TMFX options)

Hi there! 

Anyone here skilled in writing applescripts?
I'd be so greatful if someone could write me a simple script that would do the following in mac os 10.8.4:
1) make the Totalmix window active
2) Select "Enable MIDI Control" from the options menu in the top menu bar.
(I tried with google, but couln't get it working with any of the instructions I found)

(Another option would be if RME added a key command for enabling and disabling midi control, but I can see why this might not happen.)

My problem (and the reason I need this) is, that I'm now using three instances of LcXmu, and each time I start LcXmu, my Totalmix window flickrs for a couple of seconds (changes submixes too I think) and some of the selected 8 mackie channels change their mute (and / or solo) state. This probably happens due to some LcXmu initialization, and to prevent this I can simply disable midi control, start LcXmu, and turn midi control back on.  
I would really like to automate this, as I do this many times a day. I'm already using quicksilver for delayed starting of apps, so I only need this simple sript that selects the "Enable MIDI Control" for me.

Then instead of launching LcXmu, I would launch a quicksilver / automator sequence that 
1) Disables midi control by running the script
2) Launches LcXmu
3) Enables MIDI control by running the script again after a short delay

Thank you very much for your help!

Fireface UFX+ | Fireface UFX | Babyface Pro | 12Mic

2 (edited by maggie33 2023-05-03 00:45:53)

Re: Help needed with writing applescript (to select TMFX options)

i just saw your post here...
whoo - 2013 ;-)


short 4-line code:

tell application "System Events" to tell process "TotalMix FX"
    set frontmost to true
    click menu item "Enable MIDI Control" of menu 1 of menu bar item "Options" of menu bar 1
end tell

PS: You have to allow access to accessibility features for the scripteditor in your privacy&security settings

But i would recommend, to realize this through the "Shortcuts App", just because its more flexible and Apples future-thing.
Although its quite buggy till now.
it has some advantages/and some disadvantages. You can even trigger your scrips/actions from an iPhone f. ex with additional SW without opening any remote access on yourr Mac...

--------------

@bsfreq:
(Another option would be if RME added a key command for enabling and disabling midi control, but I can see why this might not happen.)

-> its not an RME thing. Apple provides exacly what you want smile
dunno if it was possible in 2003.

i use Option-M for MIDI and Option-O for OSC every day for example. its quite easy:
You can assign almost every keyboard-command/combo-shortcut whether as a global command (for all apps) or as app-specific command in macOS in your keyboard settings.
(Tip: make sure that you do not assign the same combo as global - leads to wierd conflicts smile)

Key Assign

Afterwards, it looks like this:
TMFX Menu


Ask me, if you need further help.

“Do It For Her”
My Gear: Bontempi Magic light Keyboard

Re: Help needed with writing applescript (to select TMFX options)

Hi maggie,


I had totally forgotten about this post.. I've since moved on from using LcXmu, as it's no longer supported and doesn't work on current 64bit Mac OS's. And yes, the Shortcuts app was later released too, so this kind of automation became easier. I've succesfully used it for a few things myself too. Thanks anyway for your reply!

Fireface UFX+ | Fireface UFX | Babyface Pro | 12Mic