Automates clicking inside an OBS browser source by opening the Interact window and sending a programmatic mouse click. Triggered from an Elgato Stream Deck via Automator (macOS). Main idea is to automate clicking a spinwheel on a site like wheeldecide.com.
| File | Purpose |
|---|---|
obs-interact-click.lua |
OBS Lua script — opens the Interact window and sends a click |
obs-interact-trigger.mjs |
Node script — triggers the click hotkey over obs-websocket |
- Open OBS → Tools > Scripts, click +, and select
obs-interact-click.lua - In the Scripts panel, configure:
- Browser Source — select the browser source to interact with
- Click X / Click Y — pixel coordinates within the browser source canvas (e.g. for a 1920×1080 source, values range from 0–1920 and 0–1080)
Tip: Use the "Interact & Click" button in the Scripts panel to test without Stream Deck.
Runs obs-interact-trigger.mjs via Node.js, which sends a TriggerHotkeyByName request over obs-websocket (built into OBS 28+). This bypasses OS-level keyboard focus — the click fires regardless of which app is active.
Install via nvm, so Automator keeps working across Node version upgrades instead of pointing at a hardcoded binary path:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.6/install.sh | bash
\. "$HOME/.nvm/nvm.sh"
nvm install 24Enable the WebSocket server in OBS
- OBS → Tools > obs-websocket Settings
- Check Enable WebSocket server (default port
4455) - The password is read automatically from
~/Library/Application Support/obs-studio/plugin_config/obs-websocket/config.json— no manual configuration needed
Create an Automator app
- Open Automator (
/Applications/Automator.app) - File > New → choose Application
- Search for
Run Shell Scriptin the action library and drag it into the workflow - Set Shell to
/bin/zsh, Pass input toto stdin - Replace the default script body with the following, substituting the actual path to this repo:
export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" node "$HOME/git/obs-interact-click/obs-interact-trigger.mjs"
- File > Save — name it
OBS Interact Triggerand save it anywhere convenient (e.g.~/Applications/)
Add to Stream Deck
- Add an Open action to a button
- Set the path to the
OBS Interact Trigger.appyou saved above
Finds the OBS Interact window (any window titled "Interacting with …") and closes it using macOS Accessibility APIs via AppleScript.
Create an Automator app
- Open Automator (
/Applications/Automator.app) - File > New → choose Application
- Search for
Run Shell Scriptin the action library and drag it into the workflow - Set Shell to
/bin/zsh, Pass input toto stdin - Replace the default script body with:
osascript <<'SCRIPT' tell application "System Events" tell process "OBS" repeat with w in windows if name of w starts with "Interacting with " then click button 1 of w exit repeat end if end repeat end tell end tell SCRIPT
- File > Save — name it
OBS Interact Closeand save it anywhere convenient (e.g.~/Applications/)
Grant Accessibility permission
The AppleScript needs permission to control OBS window buttons.
- Open System Settings > Privacy & Security > Accessibility
- Click + and add the
OBS Interact Close.appyou saved above
Troubleshooting: If you see
osascript is not allowed assistive access. (-25211), the app is not in the Accessibility list — add it as above. Re-saving the Automator app can revoke the grant; re-add it if the error reappears.
Add to Stream Deck
- Add an Open action to a button
- Set the path to the
OBS Interact Close.appyou saved above



