TheNewDeal Posted February 8, 2004 Share 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. Link to comment Share on other sites More sharing options...
Developers Jos Posted February 8, 2004 Developers Share 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. Link to comment Share on other sites More sharing options...
TheNewDeal Posted February 8, 2004 Author Share Posted February 8, 2004 Thanks, that seems logical to me. I'l test it and see if it works or not. Link to comment Share on other sites More sharing options...
TheNewDeal Posted February 8, 2004 Author Share 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? Link to comment Share on other sites More sharing options...
Valik Posted February 8, 2004 Share Posted February 8, 2004 What does the error message say? Link to comment Share on other sites More sharing options...
Developers Jos Posted February 8, 2004 Developers Share 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. Link to comment Share on other sites More sharing options...
TheNewDeal Posted February 8, 2004 Author Share Posted February 8, 2004 yea, its a recursion error at line 0 sleep(1000) or something of the sort Link to comment Share on other sites More sharing options...
Valik Posted February 8, 2004 Share 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. Link to comment Share on other sites More sharing options...
Developers Jos Posted February 8, 2004 Developers Share 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. Link to comment Share on other sites More sharing options...
TheNewDeal Posted February 8, 2004 Author Share 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. 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