Thatsgreat2345 Posted August 10, 2005 Author Share Posted August 10, 2005 i was wondering if i could send an @error so that if it didnt find it it would hold the w key and make it walk for like 10 seconds then stop do the pixel search then send the a key for like 15 seconds and then do the pixel search again and then loop back and start the thing all over so would this work??? ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;Pixel Search for Monster ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; While 1 $Coord = PixelSearch ( 9, 147, 1019, 717, 0x32331E, 5, 2 ) If Not @error Then MouseClick ( "Left" , $Coord[0], $Coord[1] , 2 , 0 ) sleep(12000) For $a = 1 to 6 Send("{f2}") Sleep(4000) If not @error Then $Coord = PixelSearch ( 9, 147, 1019, 717, 0x32331E, 5, 2 ) If Not @error Then send("{w down}") sleep(8000) send("{w up}") MouseClick ( "Left" , $Coord[0], $Coord[1] , 2 , 0 ) sleep(12000) For $a = 1 to 6 Send("{f2}") Sleep(4000) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; send("{a down}") sleep(15000) send("{a up}") MouseClick ( "Left" , $Coord[0], $Coord[1] , 2 , 0 ) sleep(12000) For $a = 1 to 6 Send("{f2}") Sleep(4000) Next EndIf Wend Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted August 10, 2005 Moderators Share Posted August 10, 2005 Dunno really, never tried this: guessing it would be about 8 seconds but I guess you could test it: Send("{w 200}") Maybe 15 seconds? Send("{a 380}") Of course I'm sure someone has a better way of doing it. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted August 10, 2005 Moderators Share Posted August 10, 2005 Hmmm.... The Help File of all things. Thanks for the post though... I had never used the TimerInit() before, and probably wouldn't have searched for it until I desperately needed it.$TIME = TimerInit() Do Send("{w}") Until (TimerDiff($TIME) / 1000) > 8 Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
VicTT Posted August 10, 2005 Share Posted August 10, 2005 SendKeyDelay Alters the the length of the brief pause in between sent keystrokes.Time in milliseconds to pause (default=5). Sometimes a value of 0 does not work; use 1 instead. SendKeyDownDelay Alters the length of time a key is held down before released during a keystroke. For applications that take a while to register keypresses (and many games) you may need to raise this value from the default.Time in milliseconds to pause (default=1).Pressing a key once by default takes 1 second to hold down, and 5 to pause..that means 6 ms/key..so if you wanted to press a key for 6 seconds, you would (normally) send it 1000 times.. Quote Together we might liveDivided we must fall Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted August 11, 2005 Author Share Posted August 11, 2005 Yaye it worked it didnt do to well since there was yellow in the grass but that can be fixed also the auto heal didnt work i dont know why but ill just change the pixel but thanks for all the help 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