church_controller_rust/ahk_files/propre_send.ahk

26 lines
852 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[1]) ; propresenter
{ ; if propresenter isn't active, switch and send clicker forward
2021-12-31 19:35:04 -08:00
if (A_Args[3]) { ; 1 for from_hotkey 0 for from app
if !WinActive(A_Args[1]){
WinActivate
sleep 200
arg := A_Args[2]
Send {%arg%}
}
} else {
if !WinActive(A_Args[1]){
WinActivate
sleep 200
}
arg := A_Args[2]
Send {%arg%}
2021-12-30 14:23:40 -08:00
}
}