I'm attempting to print to pdf an online service manual for my truck. Due to javascript limitations, I am only able to access these pages via the browser. I need to recursively detect an icon in the browser window, click the icon, and then click a button which enables me to print the page to pdf.
I can successfully print the parsed loop to a msgbox, one coordinate pair at a time. However, I need to pass each coordinate, separated into x and y, into the function which allows me to mouseclick the print button. I assume this is done via StrSplit but can't seem to get it to work?
Code: Select all
#Include findclick.ahk
f12::
results := FindClick("C:\users\jl\desktop\icon.png", "e n")
;msgbox,,, %results% ;msgbox of complete list of coordinate pairs
Loop, parse, results, `n
;msgbox,,, %A_Loopfield% ; msgbox of each coordinate pair row
SplitArray := ""
SplitArray := StrSplit(results, "`n")
msgbox,,, %SplitArray%
print2PDF(xin, yin)
{
mouseclick, l, xin, yin ;click on tree item
Sleep 2000
MouseClick, l, 2052, 135 ;click on print button
Sleep 500
Send {enter}
WinWait, Save As
Sleep 1500
Send {enter}
Sleep 2000
}
return
esc::Pause
Thank you for any help or ideas you might have.