zykl0 Posted March 4, 2007 Share Posted March 4, 2007 Hello, Actually i made a script that craft for me, i made the sleep() before each step to work with my main computer. now that i try to make it work on my other comp the delay is not the same this is why i increased every sleep() by a few ms/sec but id like something more accurate than that. what i was thinking is creating a new command (is it possible?) to replace every sleep() function by something like Wait (x, y, 0x000000) so basically something like MouseClick ("left", 865, 716) ;click button begin 1 Sleep (1000) MouseClick ("left", 581, 500) ;click button begin 2 Sleep (2000) oÝ÷ Û .ÖÞrjëh×6 MouseClick ("left", 865, 716) ;click button begin 1 Wait (865, 716, 0x000000) ;replacing shadevariation by green or the real color MouseClick ("left", 581, 500) ;click button begin 2 Wait (581, 500, 0x000000) ;replacing shadevariation by green or the real color the Wait command would pause the script at this line until the color match at this x,y locs and continue when the color is matched (btw putting a max wait time in the Wait command like 10sec then redo from scratch would be nice) anyone can give me some sample code i am a basic scripter thank you. Link to comment Share on other sites More sharing options...
nfwu Posted March 4, 2007 Share Posted March 4, 2007 Here is a _PixelWait function: Func _PixelWait($x, $y, $col) While $col <> PixelGetColor( $x, $y ) Sleep(100) WEnd EndFunc #) TwitterOut of date stuff:Scripts: Sudoku Solver | Webserver | 3D library (Pure AutoIt) | Wood's GadgetsUDFs: _WoodUniqueID() | _DialogEditIni() | _Console*() | _GetIPConfigData() | _URLEncode/Decode() 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