Skip to content

Instantly share code, notes, and snippets.

@eashi
Last active August 8, 2020 15:06
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
Twitch Stream AppleScript
tell application "Firefox"
activate
end tell
tell application "System Events"
keystroke "n" using command down
set size of front window of application process "Firefox" to {1564, 1057}
set position of front window of application process "Firefox" to {0, 23}
keystroke "0" using command down
key code 24 using command down
key code 24 using command down
end tell
tell application "OBS"
activate
end tell
tell application "System Events"
set size of front window of application process "OBS" to {1860, 1057}
set position of front window of application process "OBS" to {1920, 23}
end tell
tell application "iTerm"
activate
end tell
tell application "System Events"
keystroke "0" using command down
key code 24 using command down
key code 24 using command down
key code 24 using command down
set size of window 1 of application process "iTerm2" to {1564, 1057}
set position of window 1 of application process "iTerm2" to {0, 23}
end tell
tell application "Visual Studio Code"
activate
end tell
tell application "System Events"
key code 82 using command down
delay 0.5
key code 24 using command down
set size of front window of application process "Code" to {1564, 1057}
set position of front window of application process "Code" to {0, 23}
end tell
tell application "System Preferences"
reveal anchor "output" of pane id "com.apple.preference.sound"
activate
end tell
tell application "System Events"
tell application process "System Preferences"
tell tab group 1 of window "Sound"
select (row 1 of table 1 of scroll area 1 where value of text field 1 is "Multi-Output Device")
end tell
end tell
end tell
quit application "System Preferences"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment