TraumFabriK Posted May 8, 2009 Share Posted May 8, 2009 Func XXX() $m = 0 While $m <= 19 MouseClick("left", 400, 640) Sleep (3000) Send ("{space}") Sleep (1000) Send ("{space}") Sleep (1000) MouseClick("left", 560, 940) Sleep (Random(2000, 3000, 1)) MouseClick("left", 520, 285) Sleep (Random(310000, 330000, 1)) $m = $m + 1 WEnd EndFunc Hi guys, I need to add a "check" to this function to restart the function itself after a mouse click (the first random sleep). I've got the check working: If $PixC = 0xD5864E Then but I'm stuck 'cause i don't know how to restart the function. Is what I'am trying to achieve possible? Ty in advance to any one willing to help Link to comment Share on other sites More sharing options...
GEOSoft Posted May 8, 2009 Share Posted May 8, 2009 If $PixC = 0xD5864E Then XXX() George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
WideBoyDixon Posted May 8, 2009 Share Posted May 8, 2009 Eek. Recursion alert! If your check is true then set a flag and exit the loop. Outside of the loop, check the flag to know whether to re-start the function or not. Probably needs another While/Wend to check it. WBD [center]Wide by name, Wide by nature and Wide by girth[u]Scripts[/u]{Hot Folders} {Screen Calipers} {Screen Crosshairs} {Cross-Process Subclassing} {GDI+ Clock} {ASCII Art Signatures}{Another GDI+ Clock} {Desktop Goldfish} {Game of Life} {3D Pie Chart} {Stock Tracker}[u]UDFs[/u]{_FileReplaceText} {_ArrayCompare} {_ToBase}~ My Scripts On Google Code ~[/center] Link to comment Share on other sites More sharing options...
TraumFabriK Posted May 9, 2009 Author Share Posted May 9, 2009 Eek. Recursion alert! If your check is true then set a flag and exit the loop. Outside of the loop, check the flag to know whether to re-start the function or not. Probably needs another While/Wend to check it.WBDTy Link to comment Share on other sites More sharing options...
FinalVersion Posted May 9, 2009 Share Posted May 9, 2009 Ty Something Like; While 1 If $PixC = 0xD5864E Then XXX() Sleep(100) Wend Func XXX() $m = 0 While $m <= 19 MouseClick("left", 400, 640) Sleep (3000) Send ("{space}") Sleep (1000) Send ("{space}") Sleep (1000) MouseClick("left", 560, 940) Sleep (Random(2000, 3000, 1)) MouseClick("left", 520, 285) Sleep (Random(310000, 330000, 1)) $m = $m + 1 WEnd EndFunc [center][+] Steam GUI [+][+] Clipboard Tool [+][+] System :: Uptime [+][+] StarCraft II Mouse Trap [+][/center] Link to comment Share on other sites More sharing options...
GEOSoft Posted May 9, 2009 Share Posted May 9, 2009 Post what you have now and we can fix any recursion problems quickly George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" 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