church_controller_rust/ahk_files/send_obs_back_to_propre.ahk

26 lines
736 B
AutoHotkey
Raw Normal View History

2021-12-30 14:23:40 -08:00
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#SingleInstance, force
SetTitleMatchMode, RegEx
SetTitleMatchMode, Fast
If WinExist(A_Args[2]) ;OBS
{ ; if obs isn't active, switch to it, and send the hotkey
If !WinActive(A_Args[2]) {
WinActivate
2021-12-30 22:56:50 -08:00
sleep 200
2021-12-30 14:23:40 -08:00
}
2021-12-30 22:56:50 -08:00
arg := A_Args[3]
Send {%arg%}
2021-12-30 14:23:40 -08:00
}
2021-12-30 22:56:50 -08:00
sleep 100
2021-12-30 14:23:40 -08:00
If WinExist(A_Args[1]) ; Propresenter
{ ; switch back to propresenter
If !WinActive(A_Args[1]) {
WinActivate
}
}