Jump to content

Do, for, no worky ;)


 Share

Recommended Posts

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.
Link to comment
Share on other sites

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.
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...