Orgins Posted October 16, 2006 Share Posted October 16, 2006 (edited) I'm makeing a simple script I got it all done but one part when it reads a bar (some times it moves so I want it to read 3 spots). This is what I have the x and y are rite I've cheacked them 4 times. What it does is it doesnt stop looping when 16448766 is at one of the 3. what I'm I doning worng? Its prolby way worng $var1 = 16448766;bar pos 1 $var2 = 16448766;bar pos 2 $var3 = 16448766;bar pos 3 While 1 IF $var1 = PixelGetColor( 276,268 ) Then Sleep(1000) Elseif $var2 = PixelGetColor( 276,276 )Then Sleep(1000) Elseif $var3 = PixelGetColor( 276,290 )Then Sleep(1000) EndIf Send ("^G") Sleep(1000) Send ("{ENTER}") Sleep(3000) WEnd Or should I take all that out and try something else? If so like what? Edited October 16, 2006 by Orgins I'm a newbie.Sorry if I don't reposed to your replays very fast. Link to comment Share on other sites More sharing options...
Kohr Posted October 16, 2006 Share Posted October 16, 2006 Try this. You may want to add some way to exit in case it never finds the color. Kohr $color = 16448766 $found = 0 While 1 $var = PixelGetColor( 276,268 ) If $var = $color Then $found = 1 EndIf $var = PixelGetColor( 276,276 ) If $var = $color Then $found = 1 EndIf $var = PixelGetColor( 276,290 ) If $var = $color Then $found = 1 EndIf Sleep(1000) If $found = 1 Then Send ("^G") Sleep(1000) Send ("{ENTER}") Sleep(3000) ExitLoop ;It exits the loop here if it is found EndIf WEnd AutoIt LinksAutoIt CrapsGrid_PixelSearchAdvancedPixelGrab Link to comment Share on other sites More sharing options...
Orgins Posted October 16, 2006 Author Share Posted October 16, 2006 I try that but It doesn't seem to work rite. The script gets to that part and just stops doesn't do the ctrl G or anything. Thxs for the help tho. I'm a newbie.Sorry if I don't reposed to your replays very fast. Link to comment Share on other sites More sharing options...
Orgins Posted October 17, 2006 Author Share Posted October 17, 2006 Bump Any help would be nice even some small info. I'm a newbie.Sorry if I don't reposed to your replays very fast. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now