Skip to content

Commit

Permalink
add ability to copy-paste from selected field
Browse files Browse the repository at this point in the history
  • Loading branch information
WoosterInitiative committed Jan 8, 2019
1 parent 2fe53a0 commit 1b95d08
Show file tree
Hide file tree
Showing 4 changed files with 92 additions and 40 deletions.
59 changes: 41 additions & 18 deletions 3CX Dude Edition.ahk
Original file line number Diff line number Diff line change
@@ -1,27 +1,50 @@
F12:: ; F12 switches to 3CX and readies it for number entry (if on number page)
#SingleInstance, force

if WinExist("ahk_exe 3CXWin8Phone.exe")
3CXFocus(paste:=0)
{
winid := WinExist("ahk_exe 3CXWin8Phone.exe")
}
if WinExist("ahk_exe 3CXWin8Phone.exe")
{
winid := WinExist("ahk_exe 3CXWin8Phone.exe")
}

if winid
{
WinActivate
WinActivate
WinWaitActive, , , 1
If ErrorLevel
if winid
{
MsgBox, 8208, Error, WinWaitActive Timed Out, cancelling
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
}
} else {
MsgBox, 8208, Not Running, 3CX is not running, cancelling
return

Click, 280, 120 ; clicks in textbox
SendInput, ^a{Delete} ; selects all and clears text

if paste
{
SendInput, ^v
}

return
}

Click, 280, 120 ; clicks in textbox
SendInput, ^a{Delete} ; selects all and clears text
#SingleInstance, force

F12:: ; F12 switches to 3CX and readies it for number entry (if on number page)

3CXFocus()

return

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

SendInput, {End}+{Home}^c

Sleep, 500

3CXFocus(1)

return
59 changes: 41 additions & 18 deletions 3CX.ahk
Original file line number Diff line number Diff line change
@@ -1,27 +1,50 @@
^!\:: ; ctrl+alt+\ switches to 3CX and readies it for number entry (if on number page)
#SingleInstance, force

if WinExist("ahk_exe 3CXWin8Phone.exe")
3CXFocus(paste:=0)
{
winid := WinExist("ahk_exe 3CXWin8Phone.exe")
}
if WinExist("ahk_exe 3CXWin8Phone.exe")
{
winid := WinExist("ahk_exe 3CXWin8Phone.exe")
}

if winid
{
WinActivate
WinActivate
WinWaitActive, , , 1
If ErrorLevel
if winid
{
MsgBox, 8208, Error, WinWaitActive Timed Out, cancelling
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
}
} else {
MsgBox, 8208, Not Running, 3CX is not running, cancelling
return

Click, 225, 95 ; clicks in textbox
SendInput, ^a{Delete} ; selects all and clears text

if paste
{
SendInput, ^v
}

return
}

Click, 225, 95 ; clicks in textbox
SendInput, ^a{Delete} ; selects all and clears text
#SingleInstance, force

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

3CXFocus()

return

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

SendInput, {End}+{Home}^c

Sleep, 500

3CXFocus(1)

return
5 changes: 1 addition & 4 deletions QI Tools.aip
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,11 @@
<ROW Property="ARPCOMMENTS" Value="This installer database contains the logic and data required to install [|ProductName]." ValueLocId="*"/>
<ROW Property="ARPNOMODIFY" MultiBuildValue="DefaultBuild:1"/>
<ROW Property="ARPNOREPAIR" Value="1"/>
<ROW Property="CTRLS" Value="2"/>
<ROW Property="Manufacturer" Value="Quest Integration"/>
<ROW Property="ProductCode" Value="1033:{2D8889B3-EBC3-4948-BC5C-7A6D3025DB8B} " Type="16"/>
<ROW Property="ProductLanguage" Value="1033"/>
<ROW Property="ProductName" Value="QI Tools"/>
<ROW Property="ProductVersion" Value="0.0.4" Type="32"/>
<ROW Property="RUNAPPLICATION" Value="1" Type="4"/>
<ROW Property="ProductVersion" Value="0.0.5" Type="32"/>
<ROW Property="SecureCustomProperties" Value="OLDPRODUCTS;AI_NEWERPRODUCTFOUND"/>
<ROW Property="UpgradeCode" Value="{99474B2B-9AF8-43B4-AC8F-8BAE77F237B5}"/>
<ROW Property="WindowsType9X" MultiBuildValue="DefaultBuild:Windows 9x/ME" ValueLocId="-"/>
Expand Down Expand Up @@ -120,7 +118,6 @@
<ROW Action="AI_DpiContentScale" Type="1" Source="aicustact.dll" Target="DpiContentScale"/>
<ROW Action="AI_EnableDebugLog" Type="321" Source="aicustact.dll" Target="EnableDebugLog"/>
<ROW Action="AI_InstallModeCheck" Type="1" Source="aicustact.dll" Target="UpdateInstallMode" WithoutSeq="true"/>
<ROW Action="AI_LaunchApp" Type="1" Source="aicustact.dll" Target="[#CX.exe]"/>
<ROW Action="AI_PREPARE_UPGRADE" Type="65" Source="aicustact.dll" Target="PrepareUpgrade"/>
<ROW Action="AI_RESTORE_LOCATION" Type="65" Source="aicustact.dll" Target="RestoreLocation"/>
<ROW Action="AI_ResolveKnownFolders" Type="1" Source="aicustact.dll" Target="AI_ResolveKnownFolders"/>
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@ This is a compiled [AutoHotKey](https://autohotkey.com/ "AutoHotKey's Homepage")

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.

__Dude Edition__ uses F12 instead for this command is designed to work on a 1920x1080 display with 125% scaline.

### New Functionality
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:
Expand Down

0 comments on commit 1b95d08

Please sign in to comment.