So I've managed to bootlet a manual version of this. Even though its a simulation of what I would do manually to get the info from the PDF file its still pretty damn fast.
All I had to do is grab each field in then PDF file and assign it a variable, then send each variable to the other window of interest by doing SendRaw %
Code: Select all
^#3::
WinMinimizeAll
Sleep, 800
SetTitleMatchMode 2
winTitle := "Compl - Internet Explorer"
winClass := "ahk_class IEFrame"
hWnd1 := WinExist(winTitle) ; Get open PTC hWnd
ptrS := A_PtrSize ? "Ptr" : "UInt"
winTitle2 := "<Assigned On Save> - - Occurrence Details - Q-Pulse"
winClass := "ahk_class WindowsForms10.Window.8.app.0.2eed1ca_r9_ad1"
hWnd2 := WinExist(winTitle2) ; Get open complaint hWnd
ptrS := A_PtrSize ? "Ptr" : "UInt"
if (hWnd1) {
DllCall("ShowWindow", ptrS, hWnd1, "Int", 3) ; Maximize the PTC window
DllCall("ShowWindow", ptrS, hWnd2, "Int", 6) ; Minimize the complaint window
}
Sleep, 1000
Click, 679, 942 ;get complaint id
sleep, 100
Send ^{a}
sleep, 100
Send ^{c}
sleep, 100
caseID := clipboard
sleep, 10
send {TAB 2} ;get country
sleep, 100
Send ^{a}
sleep, 100
Send ^{c}
sleep, 100
country := clipboard
sleep, 10
send {TAB 9} ;get complaint details
sleep, 100
Send ^{a}
sleep, 100
Send ^{c}
sleep, 100
details := clipboard
sleep, 10
send {TAB} ;get incident report details
sleep, 100
Send ^{a}
sleep, 100
Send ^{c}
sleep, 100
incident := clipboard
;2. paste variables into relevant Q-pulse fields
if (hWnd2)
{
DllCall("ShowWindow", ptrS, hWnd2, "Int", 3) ; Maximize the complaint window
DllCall("ShowWindow", ptrS, hWnd1, "Int", 6) ; Minimize PTC window
}
Sleep, 1000
ControlClick, WindowsForms10.EDIT.app.0.2eed1ca_r9_ad18
SendRaw % caseID
sleep, 2000
ControlClick, WindowsForms10.EDIT.app.0.2eed1ca_r9_ad116
send {end}
SendRaw % caseID
sleep, 2000
ControlClick, WindowsForms10.EDIT.app.0.2eed1ca_r9_ad15
SendRaw % country
sleep, 2000
ControlClick, WindowsForms10.EDIT.app.0.2eed1ca_r9_ad110
SendRaw % incident
sleep, 2000
ControlClick, WindowsForms10.EDIT.app.0.2eed1ca_r9_ad16
SendRaw % details
sleep, 2000
return