TheNewDeal 0 Posted February 8, 2004 this is my code: func start() ;click start mouseclick("left",718,572) ;awaits game creation sleep(3000) ;suicide $s = timerstart() While Timerstop($s) < 4000 send("{left down}") wend send("{left up}") send("{f8}") ;win mouseclick("left",705,464) $s = timerstart() While Timerstop($s) < 4000 send("{left down}") wend send("{left up}") send("{f8}") ;win mouseclick("left",705,464) $s = timerstart() While Timerstop($s) < 4000 send("{left down}") wend send("{left up}") send("{f8}") ;win mouseclick("left",705,464) $s = timerstart() While Timerstop($s) < 4000 send("{left down}") wend send("{left up}") send("{f8}") ;win mouseclick("left",705,464) ;awaits the ready up screen again sleep(3000) start() endfunc is there any other way i could go about doing this? any help would be very greatful thanks. Share this post Link to post Share on other sites
Jos 2,165 Posted February 8, 2004 (edited) You need to let the function end before calling it again... In your script function start(), you keep on calling start() and none of those calls end... try the below logic and see if that works for you... do while 1 Start() Wend func start() ; your script without the start() at the end endfunc Edited February 8, 2004 by JdeB SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Share this post Link to post Share on other sites
TheNewDeal 0 Posted February 8, 2004 Thanks, that seems logical to me. I'l test it and see if it works or not. Share this post Link to post Share on other sites
TheNewDeal 0 Posted February 8, 2004 this is my code now: HotKeySet("{ESC}", "Terminate") sleep(3000) while 1 Start() Wend func start() mouseclick("left",718,572) sleep(1000) send("{f8}") mouseclick("left",705,464) sleep(1000) endfunc Func Terminate() Exit endfunc i am still getting the error btw. Any other ideas? Share this post Link to post Share on other sites
Valik 478 Posted February 8, 2004 What does the error message say? Share this post Link to post Share on other sites
Jos 2,165 Posted February 8, 2004 Are you getting a recursion error on this script ? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Share this post Link to post Share on other sites
TheNewDeal 0 Posted February 8, 2004 yea, its a recursion error at line 0 sleep(1000) or something of the sort Share this post Link to post Share on other sites
Valik 478 Posted February 8, 2004 yea, its a recursion error at line 0 sleep(1000) or something of the sortLine 0? That means you're using a compiled script. Are you sure you aren't using an older version of your script with the error? You don't have to run a compiled script to test, you can run the script file itself by double-clicking it if you installed AutoIt via the installer, or you can double-click the AutoIt3.exe and select your script. There are no errors in the code that you posted, so you either aren't showing us everything or you're not running the right script. Share this post Link to post Share on other sites
Jos 2,165 Posted February 8, 2004 yea, its a recursion error at line 0 sleep(1000) or something of the sort.. and you didn't define a "Func Sleep()" somewhere in your script ?Just ran a similar script and let it run more than 1.5 milion times the Start() function without any error... SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Share this post Link to post Share on other sites
TheNewDeal 0 Posted February 8, 2004 lol, i am having people run it for me but, as you stated they could be running the old version instead of this version. Thanks for checking it out though. I'l run it myself and find out. Share this post Link to post Share on other sites