I've used Loop read very successfully to read the numbers from text files.
For some reason when trying to read an edit field and trying to send this to notepad this isn't working.
Code: Select all
winTitle := "Customer Complaint - Occurrence Details - Q-Pulse"
winClass := "ahk_class WindowsForms10.Window.8.app.0.2eed1ca_r9_ad1"
editControl := " WindowsForms10.EDIT.app.0.2eed1ca_r9"
hWnd1 := WinExist(winTitle)
DllCall("ShowWindow", A_PtrSize ? "Ptr" : "UInt", hWnd1, "Int", 3) ; Maximize window
ControlClick, WindowsForms10.EDIT.app.0.2eed1ca_r9_ad114
sleep, 1000
Loop, Read, WindowsForms10.EDIT.app.0.2eed1ca_r9_ad114
%newcomplaint%:= RegExReplace(A_LoopReadLine, "\D")
sleep, 100
Run, Notepad.exe
sleep, 1000
Send %newcomplaint%