Sumoman Posted April 18, 2004 Share 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? Link to comment Share on other sites More sharing options...
-TS- Posted April 18, 2004 Share 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. Link to comment Share on other sites More sharing options...
Sumoman Posted April 18, 2004 Author Share Posted April 18, 2004 What's the significance of an @var compared to a $var? Link to comment Share on other sites More sharing options...
-TS- Posted April 18, 2004 Share 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 Link to comment Share on other sites More sharing options...
Sumoman Posted April 18, 2004 Author Share Posted April 18, 2004 what i meant was, why is it: IF NOT @error instead of : IF NOT $error Link to comment Share on other sites More sharing options...
-TS- Posted April 18, 2004 Share Posted April 18, 2004 OOOk i see, i have no clue what the dif is Link to comment Share on other sites More sharing options...
-TS- Posted April 18, 2004 Share 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. Link to comment Share on other sites More sharing options...
Sumoman Posted April 18, 2004 Author Share Posted April 18, 2004 >.< oh well, thanks for the help anyway Link to comment Share on other sites More sharing options...
Sumoman Posted April 18, 2004 Author Share 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? Link to comment Share on other sites More sharing options...
-TS- Posted April 18, 2004 Share 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. Link to comment Share on other sites More sharing options...
Sumoman Posted April 18, 2004 Author Share Posted April 18, 2004 errrr nm that was a problem with my script itself, @error does reset itself. Link to comment Share on other sites More sharing options...
-TS- Posted April 18, 2004 Share Posted April 18, 2004 Lol, you should see my Problem 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