#Persistent CoordMode, Pixel, Screen CoordMode, Mouse, Screen F1:: ; hotkey to start Loop, read, data.csv
Click 500, 200 Sleep 3000 ; wait for dialog Click 500, 250 Use:
Click 150, 300 Sleep 100 Send Enter ImageSearch, foundX, foundY, 0, 0, A_ScreenWidth, A_ScreenHeight, button_ok.png if ErrorLevel = 0 Click %foundX%, %foundY% else MsgBox Button not found – stopping
; Wait for form window WinWaitActive, Data Entry Form, , 5 if ErrorLevel MsgBox Form not found break ; Fill name field ControlClick, Edit1, Data Entry Form Send %field1% ; Fill age field ControlClick, Edit2, Data Entry Form Send %field2% ; Click submit button using image search ImageSearch, btnX, btnY, 0, 0, A_ScreenWidth, A_ScreenHeight, submit_btn.png if ErrorLevel = 0 Click %btnX%, %btnY% else MsgBox Submit button not visible continue ; Wait for confirmation image Loop, 10 ImageSearch, , , 0, 0, 500, 200, confirm_icon.png if ErrorLevel = 0 break Sleep 500
MsgBox Finished all records return
StringSplit, field, A_LoopReadLine, CSV
Advanced tools let you choose. For game automation, avoid SendInput – use ControlSend or kernel drivers. a) Avoid static delays – use synchronization Instead of:
Loop 10

