mrbig1479 Posted May 11, 2007 Share Posted May 11, 2007 here is the code $coord = PixelSearch( 0, 0, 1024, 700,0x78D07E) while $coord = @error sleep (500) wend MouseClick ( "left" ,$coord[0],$coord[1] ,1) sleep (1000) i want the program to wait untill the right pixel appers and when it does apper press the pixel coordinates Link to comment Share on other sites More sharing options...
Zedna Posted May 11, 2007 Share Posted May 11, 2007 while 1 $coord = PixelSearch( 0, 0, 1024, 700,0x78D07E) If Not @error Then ExitLoop sleep (500) wend MouseClick ( "left" ,$coord[0],$coord[1] ,1) sleep (1000) Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
PsaltyDS Posted May 11, 2007 Share Posted May 11, 2007 (edited) I think you misunderstand @error. Functions that set @error only set it in the AutoIt macro '@error'. They don't return it as data. So this line is pretty broke: while $coord = @erroroÝ÷ Ø l£*.Á©í¶zhx-êbÅéç$ ÔL¨º¼!W¥¢S¯+aÆ®¶sevÆR b33c¶6ö÷&BÒVÅ6V&6ÂÂ#BÂsÂsCtR bæ÷BW'&÷"FVâWDÆö÷ 6ÆVWS¥tVæ@¤Ö÷W6T6Æ6²gV÷C¶ÆVgBgV÷C²Âb33c¶6ö÷&E³ÒÂb33c¶6ö÷&E³Ò Edit: Hmm. Zedna's AnswerBot is evidently slightly faster than mine... Edited May 11, 2007 by PsaltyDS Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
mrbig1479 Posted May 11, 2007 Author Share Posted May 11, 2007 thank you very much Link to comment Share on other sites More sharing options...
Zedna Posted May 11, 2007 Share Posted May 11, 2007 Edit: Hmm. Zedna's AnswerBot is evidently slightly faster than mine... Zedna's AnswerBot is optimized for small simple tasks Resources UDF ResourcesEx UDF AutoIt Forum Search 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