From 94d1f30724dfeb3bb3c4410b037ab11a5d2198a4 Mon Sep 17 00:00:00 2001 From: WoosterInitiative Date: Wed, 9 Jan 2019 08:26:25 -0800 Subject: [PATCH] make more reliable if text is selected --- HipChat Scripts.ahk | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/HipChat Scripts.ahk b/HipChat Scripts.ahk index ffca396..c72f0e0 100644 --- a/HipChat Scripts.ahk +++ b/HipChat Scripts.ahk @@ -12,7 +12,9 @@ StatusChange(keysHC, keysTeams) ; The function that actually does the window MsgBox, 8208, Error, HipChat Timed Out, cancelling return } - SendInput, ^a%keysHC%{Enter} + SendInput, ^{Tab} ; Switch room to clear selection + SendInput, ^+{Tab} ; Switch back to original room + SendInput, ^a%keysHC%{Enter} ; Select all existing text and send command } if WinExist("ahk_exe teams.exe") ; Check to make sure Teams is running @@ -35,6 +37,8 @@ StatusChange(keysHC, keysTeams) ; The function that actually does the window WinActivate, ahk_id %winid% ; Switch back to original active window } +#SingleInstance, force ; Forces only one instance, allows to re-run script without reloading + ^F1:: StatusChange("/back", "/available") return