Splitz Posted September 4, 2009 Posted September 4, 2009 (edited) While 1 Sleep(3000) MouseClick ( "Right", 895, 485,1, 10 ); part A Sleep(200) MouseClick ( "left", 227, 644 ,1, 10); part B Do PixelSearch( 812, 225, 820, 245, 0xD90C00); Part C Sleep(1) Until @error = 0 Sleep(300) MouseClick ("left", 816, 235, 1, 10); part C Do Sleep(4000) Send("{SPACE}") PixelSearch( 0, 0, 841, 733 , 0xCC0D00) Until @error = 0 MouseClick("Right",841, 733,1,0); wend So far in this script, Part A = it right clicks at the cordinates Part B = it left clicks at the cordinates But the error (Part C), is when its supposed to move to the 812, 225, 820, 245 rectangle, and search for the color 0xD90C00 you see what it does is, it moves to the area but then it just clicks 1 time without waiting, what i want it to do is i want it to wait until this red button appears (0xd90c00) and then once the button pops up, i want it to preform a left click Edited September 4, 2009 by Fenix`
demandnothing Posted September 4, 2009 Posted September 4, 2009 it looks like your telling your script to search for that color until it goes away, then to wait 3 seconds and click...
jvanegmond Posted September 4, 2009 Posted September 4, 2009 Do Sleep(1) PixelSearch( 812, 225, 820, 245, 0xD90C00); Part C Until @error = 0 Try with sleep in front of PixelSearch. Sleep might be resetting the @error flag to 0 so your test (@error = 0) will always succeed causing it to break the loop and stop immediately. github.com/jvanegmond
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