Hello,
I've been using AutoIt off and on since I was about 13 years old, but this is the first time I've been really stumped about a bug in one of my scripts.
This is the part of my code that isn't running as I intended. It is supposed to get the number of rows in a table (up to a max of 9).
Each row is 40 pixels apart on the y axis. And sometimes a row will be skipped if it isn't the color I'm looking for.
No matter what I do, the output in tooltip is always 9. The variable $pc shouldn't be increasing unless the $hparr variable matches one of two colors.
AutoIt
#RequireAdmin Global $i = 0 Global $hparr[10] Global $p[2] Global $pc $dt = TimerInit() While 1 ;; Check Table Size $pc = 1 $i = 1 $p[0] = 64 ;49 $p[1] = 106 ;93 Do $i += 1 $p[1] += 40 $hparr[$i] = PixelGetColor($p[0],$p[1]) If $hparr[$i] = 16768669 or 15849372 Then $pc += 1 Until $i = 9 $i = 0 ;; delay at random $delay = Random ( 150, 355 ) $dtt = TimerDiff($dt) While $dtt < $delay $dtt = TimerDiff ($dt) WEnd $dt = TimerInit() ToolTip ("This section is showing: " & $pc & " rows") Wend