Question / Help AppleScript control


New Member
I'm trying to use AppleScript to control OBS. Currently send key codes to System Events via AppleScript and execute hot keys but I'm being bitten by the bug where OBS has to be in the foreground to execute the command. I can bring OBS to the foreground just fine and execute a command but that's suboptimal while broadcasting.

Is there a way to control OBS with AppleScript without having to use the hot key function?

My only other option I have thought of is to use the websocket-js plugin and control the JavaScript with AppleScript but that feels like a round about way to get access. Thanks.


New Member
Reviving and old topic here... sorry.

Did you find a solution for this? I'm currently using hotkeys to trigger Keyboard Maestro, which in turn triggers OBS with more hotkeys (Keyboard Maestro simulates the keystrokes). The result is a preset series of events triggered by a single key press - ie start stream, wait a minute, start recording, preview a scene, stinger transition, audibly cue presenter etc. It's so an unskilled operator can run a quite high-production value looking stream.

But the whole simulated keystrokes and OBS keyboard shortcuts is clunky. I've notice OBS misses keypresses intermittently. Haven't figured out why.

At the very least I see the web socket as a workaround. Can I ask what AppleScripts you are running?