Sumoman Posted April 18, 2004 Posted April 18, 2004 I was wondering if you can use the pixelsearch command in an IF THEN statement. something like: IF Pixelsearch(12,40,100,200)=1677555 THEN If not, then would: DO PixelSearch(1,1,100,100,1556765) IF NOT @error THEN dfaefdasfesdageaefd EndIF @error=0 UNTIL 1=2 reset @error everytime it goes through the loop? would that work?
-TS- Posted April 18, 2004 Posted April 18, 2004 DO PixelSearch(1,1,100,100,1556765) IF NOT @error THEN dfaefdasfesdageaefd EndIF @error=0 UNTIL $1=2 make sure you use a $var in the until statment yes that should work, not 100% sure, never use the search command.
Sumoman Posted April 18, 2004 Author Posted April 18, 2004 What's the significance of an @var compared to a $var?
-TS- Posted April 18, 2004 Posted April 18, 2004 DO PixelSearch(1,1,100,100,1556765) IF NOT @error THEN dfaefdasfesdageaefd EndIF @error=0 UNTIL 1=2; you dont have a $ for 1***** that what i was pointing out
Sumoman Posted April 18, 2004 Author Posted April 18, 2004 what i meant was, why is it: IF NOT @error instead of : IF NOT $error
-TS- Posted April 18, 2004 Posted April 18, 2004 i red alittle about it, @ is a micro and $ is a var, so there are treated diffenly. Im not 100% sure, i just started relearning autoit last week.
Sumoman Posted April 18, 2004 Author Posted April 18, 2004 hmmmm @error=0 is invalid, and if i don't reset it to 0 it always hits true in a loop... any ideas on how to reset it?
-TS- Posted April 18, 2004 Posted April 18, 2004 The @error code is only valid until the next function is called. Consequently, you may need to backup the status of @error in a variable if you are testing it in a While-WEnd loop. Try SetError ( 0 ) maybe that will help.
Sumoman Posted April 18, 2004 Author Posted April 18, 2004 errrr nm that was a problem with my script itself, @error does reset itself.
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