From 4c36bcf46a921d12e8fdcf5547a8ac30d7bbe6ec Mon Sep 17 00:00:00 2001 From: WoosterInitiative Date: Fri, 7 Feb 2020 13:16:32 -0800 Subject: [PATCH] Allow for configuration of keys for Quick Status Change --- QI Tools/Product.wxs | 7 +++-- Quick Status Change.ahk | 67 ++++++++++++++++++++++++++++++++--------- README.md | 3 +- 3 files changed, 58 insertions(+), 19 deletions(-) diff --git a/QI Tools/Product.wxs b/QI Tools/Product.wxs index af0abe8..072f072 100644 --- a/QI Tools/Product.wxs +++ b/QI Tools/Product.wxs @@ -1,9 +1,10 @@ - + @@ -19,7 +20,7 @@ + Maximum="0.0.38.0" IncludeMaximum="no" /> diff --git a/Quick Status Change.ahk b/Quick Status Change.ahk index ca3bfc6..b6725ad 100644 --- a/Quick Status Change.ahk +++ b/Quick Status Change.ahk @@ -23,6 +23,13 @@ iniProps["onCallColors"] := "0x0000FF,0x575757,0xC1C1C1,0xFF0000" iniProps["codeIndex"] := 3 iniProps["changeTeams"] := 1 iniProps["change3CX"] := 1 +iniProps["availKey"] := "^F1" +iniProps["awayKey"] := "^F2" +iniProps["dndKey"] := "^F3" +iniProps["busyKey"] := "^F4" +iniProps["lunchKey"] := "^F6" +iniProps["qLoginKey"] := "^F7" +iniProps["qLogoutKey"] := "^F8" iniProps := QIFunctions_readINI(pathINI, iniProps, iniSection) @@ -40,23 +47,53 @@ codeF8 = % "*63" ; Queue log out teamsSleep := iniProps["teamsSleep"] changeTeams := iniProps["changeTeams"] change3CX := iniProps["change3CX"] +availKey := iniProps["availKey"] +awayKey := iniProps["awayKey"] +dndKey := iniProps["dndKey"] +busyKey := iniProps["busyKey"] +lunchKey := iniProps["lunchKey"] +qLoginKey := iniProps["qLoginKey"] +qLogoutKey := iniProps["qLogoutKey"] ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Main Code ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -^F1::StatusChange("available", codeF1, "green", changeTeams, change3CX) - -^F2::StatusChange("brb", codeF2, "yellow", changeTeams, change3CX, 1) - -^F3::StatusChange("dnd", codeF3, "red", changeTeams, change3CX) - -^F4::StatusChange("busy", codeF3, "red", changeTeams, change3CX) - -^F5::StatusChange("available", codeF5, "yellow", changeTeams, change3CX) - -^F6::StatusChange("brb", codeF6, "red", changeTeams, change3CX) - -^F7::StatusChange("", codeF7, , 0, change3CX) - -^F8::StatusChange("", codeF8, , 0, change3CX) +Hotkey, %availKey%, availLabel +Hotkey, %awayKey%, awayLabel +Hotkey, %dndKey%, dndLabel +Hotkey, %busyKey%, busyLabel +Hotkey, %lunchKey%, lunchLabel +Hotkey, %qLoginKey%, qLogin +Hotkey, %qLogoutKey%, qLogout +return + +availLabel: +StatusChange("available", codeF1, "green", changeTeams, change3CX) +return + +awayLabel: +StatusChange("brb", codeF2, "yellow", changeTeams, change3CX, 1) +return + +dndLabel: +StatusChange("dnd", codeF3, "red", changeTeams, change3CX) +return + +busyLabel: +StatusChange("busy", codeF3, "red", changeTeams, change3CX) +return + +lunchLabel: +StatusChange("brb", codeF6, "red", changeTeams, change3CX) +return + +; ^F5::StatusChange("available", codeF5, "yellow", changeTeams, change3CX) + +qLogin: +StatusChange("", codeF7, , 0, change3CX) +return + +qLogout: +StatusChange("", codeF8, , 0, change3CX) +return ;############### Actual work being done ################### StatusChange(keysTeams, pos3CX, icoColor := "default", teams := 1, 3CX := 1, winLock := 0) ; The function that actually does the window switching and change of status diff --git a/README.md b/README.md index f95a5c9..2fd6ff6 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,8 @@ Changes status in both MS Teams and 3CX Desktop. Teams doesn't seem to be perfec 3CX actually dials a number (e.g. **\*30** for *Available*) to change its status. That makes it slow and it "announces" the change over your headset, but it should be almost perfectly reliable. +The shortcuts below are editable in the **Settings**. See me for tips on changing these. + + Ctrl+F1 - *Available* + Ctrl+F2 - *Away* + Ctrl+F3 - *Do Not Disturb* (**NO** notifications in MS Teams) @@ -16,7 +18,6 @@ Changes status in both MS Teams and 3CX Desktop. Teams doesn't seem to be perfec Copies selected text into 3CX. **Must** have text copied to clipboard. + NumLock - Dials number on clipboard (must copy number using ctrl+c *before* pressing numlock) -+ F12 - Brings 3CX into focus (does not copy anything) _See below for notes on modifying Settings (INI file)_