Page 1 of 1

If the game shuts down, shut down OBS too

Posted: 29 Apr 2024, 11:46
by Datrik
I can't make a macro that also stops OBS when a game is closed, can anyone help Please?

Re: If the game shuts down, shut down OBS too

Posted: 04 May 2024, 01:51
by Rohwedder
Hallo,
start Wordpad, Notepad and this script:

Code: Select all

#Requires AutoHotkey v2.0
Persistent
Timer := () => !WinExist("ahk_exe wordpad.exe")
	And WinExist("ahk_exe notepad.exe")?WinClose():""
SetTimer Timer, 1000 ; every second
If you exit Wordpad, the script also exits Notepad.
Replace Wordpad with your game and Notepad with OBS