Skip to content

Instantly share code, notes, and snippets.

@Rycieos
Created July 7, 2018 02:31
Show Gist options
  • Save Rycieos/aad349b54f73e0633a70e1aaf23e5261 to your computer and use it in GitHub Desktop.
Save Rycieos/aad349b54f73e0633a70e1aaf23e5261 to your computer and use it in GitHub Desktop.
gameInFocus() {
; Add games that you will stream
return WinActive("Rocket League") or WinActive("Rainbow 6")
}
; Specify streaming window order if game is active
layer = 0
while (True) {
if (gameInFocus()) {
if (layer == 0) {
Winset, AlwaysOnTop, On, Twitch
Winset, AlwaysOnTop, On, OBS
}
layer = 1
} else {
if (layer == 1) {
Winset, AlwaysOnTop, Off, Twitch
Winset, AlwaysOnTop, Off, OBS
}
layer = 0
}
sleep, 100
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment