I have included comments attempting to understand what each mouse movement and click is suppose to do based on the screenshot you posted. See if it looks accurate.
Code: Select all
loop, 9
{
c := a_index
while (strlen(c) < 3) ; this can be changed to use format
c := "0" c ; 001, 002, 003... 009
; the following will execute with each loop iteration, but not with the while loop.
SendInput, % c
sleep, 250
MouseMove 400, 1110 ; move to continue button?
Sleep, 500
Click ; click continue. I suspect this is not happening?
Sleep, 100
Click ; click something on next screen? Does this happen?
sleep, 2000
MouseMove, 300, 770 ; next screen?
Sleep, 500
Click
Sleep, 500
SendInput, {Backspace 3} ; this is obviously where the backspace (erase) is coming from. Should the keypad still be visible here?
Sleep 500
}
The comments in the code are just a guess based on your description, screenshot, and numbers in the spy app. If this is incorrect please post your code with comments that describe what each movemove and click is supposed to activate (sudo code). Without that, we can only estimate by doing the math.
Also based on your stated screen resolution of 3840×2400, the size and location of the keypad window don't seem to jive to me. For instance... 2400-1728 = 672. I don't see 672 pixels below the keypad window (roughly 30% more screen). I see more like 80px below the window to bottom of Taskbar. I see a discrepancy with the width also. So something doesn't seem to add up... literally.
My suggestion would be to perform one step at a time in the loop, watching the exact location that the mouse moves to in each step. Using a sleep of like 2-3 seconds between steps. Don't do the clicks until the mouse moves to the proper spots, in the proper amount of time. Then add the clicks in one at a time, until all perform as expected. In other words, slow everything down to a crawl so the steps can be inspected one by one.
Andy