Skip to content

Commit

Permalink
Merge pull request #11 from WoosterFromWA/no_hang_up_and_rename
Browse files Browse the repository at this point in the history
No hang up and rename
  • Loading branch information
WoosterInitiative authored Jan 24, 2019
2 parents c6ad115 + 3fd0818 commit 87653cf
Show file tree
Hide file tree
Showing 11 changed files with 299 additions and 51 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
*.exe
*.msi
50 changes: 50 additions & 0 deletions 3CX.ahk
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
3CXFocus(paste:=0) ; function that actually does stuff... defaults to just clearing any existing input
{
if WinExist("ahk_exe 3CXWin8Phone.exe")
{
winid := WinExist("ahk_exe 3CXWin8Phone.exe")
}

if winid
{
WinActivate
WinActivate
WinWaitActive, , , 1
If ErrorLevel
{
MsgBox, 8208, Error, WinWaitActive Timed Out, cancelling
return
}
} else {
MsgBox, 8208, Not Running, 3CX is not running, cancelling
return
}

Sleep, 500

SendInput, {Esc} ; clear text from 3CX window

if paste
{
SendInput, ^v ; send copied text if 'paste' value is set
}

return
}

#SingleInstance, force

^!\:: ; ctrl+alt+\ switches to 3CX and readies it for number entry (if on number page)
F12::

3CXFocus()

return

F11:: ; copy text in active window and paste into 3CX

SendInput, {End}+{Home}^c ; select all text in active box

3CXFocus(1)

return
31 changes: 31 additions & 0 deletions GMSearch.ahk
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#SingleInstance, force

^!=:: ; ctrl+alt+= clears search in GM
; winid := WinExist()
if WinExist("ahk_exe gmw.exe")
{
winid := WinExist("ahk_exe gmw.exe")
}
if WinExist("ahk_exe mstsc.exe")
{
winid := WinExist("ahk_exe mstsc.exe")
}
; MsgBox %winid% ; debugging only
if winid
{
InputBox, var, Name, Name to Search For
WinActivate
WinActivate
WinWaitActive, , , 1
If ErrorLevel
{
MsgBox, 8208, Error, WinWaitActive Timed Out, cancelling
return
}
} else {
MsgBox, 8208, Not Running, GoldMine is not running, cancelling
return
}
Click, 200, 90 ; clicks in search field of GM
SendInput, ^a%var%{Enter} ; selects all and clears text
return
185 changes: 185 additions & 0 deletions QI Tools.aip

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions HipChat Scripts.ahk → Quick Status Change.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ StatusChange(keysHC, keysTeams, pos3CX) ; The function that actually does the w
MsgBox, 8208, Error, 3CX Timed Out, cancelling
return
}
SendInput, {Esc}
; SendInput, {Esc} ; Removed because this will hang up a call
Click, 30,45 ; Click on availability button
Sleep, 20 ; Seems to need to wait for the menu to be built, improves reliability
Sleep, 50 ; Seems to need to wait for the menu to be built, improves reliability
Click, %pos3CX% ; Click on appropriate menu item based on coordinates below
}

Expand All @@ -68,7 +68,7 @@ posDND := "30,155"
return

^F2::
StatusChange("/dnd On Phone", "/dnd", posAway)
StatusChange("/dnd On Phone", "/dnd", posDND)
return

^F3::
Expand Down
26 changes: 25 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# AutoHotKey
# Quest Tools

## HipChat Script
This is a compiled [AutoHotKey](https://autohotkey.com/ "AutoHotKey's Homepage") script that makes it easy to change HipChat status. Automatically switches back to active window.
Expand All @@ -14,6 +14,30 @@ Now *also* changes 3CX status. 3CX **does** support messages, but that adds a lo
+ Ctrl+F5 - Away {prompt for message} [Away]
+ Ctrl+F6 - Do Not Disturb {prompt for message} [Do Not Disturb]

## 3CX Script
This is a compiled [AutoHotKey](https://autohotkey.com/ "AutoHotKey's Homepage") script that makes it easy to switch to 3CX and enter a number.

Simply press CTRL+ALT+\ (the one above the Enter key) to switch to the open 3CX window and clear any existing number and get ready to input a number.

Ability to copy-paste text into 3CX. Same restrictions apply (see below)

__Usage__
+ Click in a number field in GM
+ Press _F11_

Make sure to have 3CX running or you'll get an error message

Also, a real limitation is that it must be on the screen that allows direct number entry:

![only 3CX screen that this works for](images/3CX_screen.png)

## GMSearch Script
This is a compiled [AutoHotKey](https://autohotkey.com/ "AutoHotKey's Homepage") script that makes it easy to search for a contact in GM.

Simply press CTRL+ALT+= to get a message box asking for the contact's name (same as you would in the search field in the upper left corner of GM). It will then do the search for you and return the results in GM.

Make sure to have GM running or you'll get an error message

## Window Switching Script
Quick switching to commonly open windows

Expand Down
42 changes: 0 additions & 42 deletions Teams Scripts.ahk

This file was deleted.

Binary file added images/3CX_screen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/qonly.ico
Binary file not shown.
5 changes: 0 additions & 5 deletions remap win key.ahk

This file was deleted.

4 changes: 4 additions & 0 deletions run all.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Start "" "C:\Program Files (x86)\Quest Integration\QI Tools\3CX.exe"
rem Start "" "C:\Program Files (x86)\Quest Integration\QI Tools\GMSearch.exe"
Start "" "C:\Program Files (x86)\Quest Integration\QI Tools\Quick Status Change.exe"
rem Start "" "C:\Program Files (x86)\Quest Integration\QI Tools\Window Switching.exe"

0 comments on commit 87653cf

Please sign in to comment.