From 284a3ef82ee14f890e1ba29c1a356fb1045c2e0b Mon Sep 17 00:00:00 2001 From: Nickiel12 <35903114+Nickiel12@users.noreply.github.com> Date: Thu, 30 Dec 2021 14:23:40 -0800 Subject: [PATCH] added some ahk files --- src/ahk_files/propre_send.ahk | 15 +++++++++++++++ src/ahk_files/send_obs_back_to_propre.ahk | 22 ++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 src/ahk_files/propre_send.ahk create mode 100644 src/ahk_files/send_obs_back_to_propre.ahk diff --git a/src/ahk_files/propre_send.ahk b/src/ahk_files/propre_send.ahk new file mode 100644 index 0000000..6189205 --- /dev/null +++ b/src/ahk_files/propre_send.ahk @@ -0,0 +1,15 @@ +#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 + if !WinActive(A_Args[1]){ + WinActivate + Send A_Args[2] + } +} \ No newline at end of file diff --git a/src/ahk_files/send_obs_back_to_propre.ahk b/src/ahk_files/send_obs_back_to_propre.ahk new file mode 100644 index 0000000..1f014df --- /dev/null +++ b/src/ahk_files/send_obs_back_to_propre.ahk @@ -0,0 +1,22 @@ +#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 + Send A_Args[3] + } +} + +If WinExist(A_Args[1]) ; Propresenter +{ ; switch back to propresenter + If !WinActive(A_Args[1]) { + WinActivate + } +} \ No newline at end of file