Insolence 2 Posted December 25, 2003 Do for $y = 358 To 445 Step 29 $PixelCheck = PixelGetColor($x, $y) $IniRead = IniRead ( "logs/pixels.ini", "Pixels", "InventorySlot" & $ColumnNumber & "x" & $RowNumber, "0" ) SEND("{ENTER}" & $IniRead & " / " & $PixelCheck & "{ENTER}") Sleep(200) If $PixelCheck <> $IniRead THEN IniWrite("logs/stash.ini", "Need_To_Stash", "InventorySlot" & $ColumnNumber & "x" & $RowNumber, "1") ;EXITLOOP(2) ELSE IniWrite("logs/stash.ini", "Need_To_Stash", "InventorySlot" & $ColumnNumber & "x" & $RowNumber, "0") ENDIF $RowNumber = $RowNumber + 1 Next $Rows = $Rows - 1 $RowNumber = 1 $x = $x - 29 $ColumnNumber = $ColumnNumber + 1 Until $Rows = 0 It gets the first 4 pixels perfectly (the first execution of the loop) every loop after, the pixel it gets is '0'.. very weird, i tried adding mouse moves with it, and it checks where it should, but it still returns 0 "I thoroughly disapprove of duels. If a man should challenge me, I would take him kindly and forgivingly by the hand and lead him to a quiet place and kill him." - Mark TwainPatient: "It hurts when I do $var_"Doctor: "Don't do $var_" - Lar. Share this post Link to post Share on other sites
PerryRaptor 1 Posted December 25, 2003 I think your problem is with the statement $Rows = $Rows - 1 I'm thinking the DO...UNTIL Loop will only run once because of the last line Until $Rows = 0 Try this...Before the DO...UNTIL Loop, add $Rows = "29" Share this post Link to post Share on other sites
Insolence 2 Posted December 26, 2003 thats not it, because the entire until loop runs fine. Meh, i have no idea what it could be "I thoroughly disapprove of duels. If a man should challenge me, I would take him kindly and forgivingly by the hand and lead him to a quiet place and kill him." - Mark TwainPatient: "It hurts when I do $var_"Doctor: "Don't do $var_" - Lar. Share this post Link to post Share on other sites
Jos 2,168 Posted December 26, 2003 What is $x set to before you begin ? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Share this post Link to post Share on other sites
PerryRaptor 1 Posted December 26, 2003 I was thinking there was an issue with the DO...UNTIL portion of your script. It must be the IF...ENDIF construct. There are four steps between 358 to 445 so the FOR...NEXT loop will run four times. I don't know the startup values for $x, $ColumnNumber, $RowNumber, and $rows. Additionally, I don't know the value for "InventorySlot" you're reading from the Logs\pixel.ini file. Also, I don't know what you've set the parameter for AutoItSetOption ( "PixelCoordMode", <parameter> ). 0 or 1. Share this post Link to post Share on other sites