Skip to content

Commit

Permalink
Merge pull request #8 from WoosterFromWA/fix_selection
Browse files Browse the repository at this point in the history
make more reliable if text is selected
  • Loading branch information
WoosterInitiative authored Jan 9, 2019
2 parents e7a4b14 + 94d1f30 commit 33fb06b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion HipChat Scripts.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 33fb06b

Please sign in to comment.