Last active
December 8, 2023 22:07
-
-
Save iamkirkbater/ba6278d0ac6d695cb8c6c5fc309ba210 to your computer and use it in GitHub Desktop.
Launches OBS, starts the virtual camera, and then minimizes the window.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on run {input, parameters} -- remove this line if running in Script Editor and not with Automator | |
tell application "OBS" to activate | |
tell application "System Events" | |
tell process "OBS" | |
set frontmost to true | |
if name of every menu item of menu "Tools" of menu bar 1 contains "Start Virtual Camera" then | |
click menu item "Start Virtual Camera" of menu "Tools" of menu bar 1 | |
end if | |
click (first button of window 1 whose role description is "minimize button") | |
end tell | |
end tell | |
end run -- remove this line if running in Script Editor and not with Automator |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
^ Using this method locked the Option key on my Mac -- required the virtual keyboard to get unstuck
Try this method instead: https://stackoverflow.com/questions/3690167/how-can-one-invoke-a-keyboard-shortcut-from-within-an-applescript