MajSlayer420 Posted March 11, 2007 Share Posted March 11, 2007 Hello, is there a way I can reset my programs flow to the start? Im having a problem with this reset button I'ive added. The function gets called but I always end up back in the function i was in before. Any way I can break this flow? Thanks MajSlayer420 Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 11, 2007 Moderators Share Posted March 11, 2007 Hello, is there a way I can reset my programs flow to the start? Im having a problem with this reset button I'ive added. The function gets called but I always end up back in the function i was in before. Any way I can break this flow?ThanksMajSlayer420Change line 24 and you'll be fine. 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...
MajSlayer420 Posted March 11, 2007 Author Share Posted March 11, 2007 Gee that helps allot:) lol So there is no way to reset my program without closing it and starting it again? MajSlayer420 Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 11, 2007 Moderators Share Posted March 11, 2007 Gee that helps allot:) lol So there is no way to reset my program without closing it and starting it again?MajSlayer420That was more information than what you provided buddy .... Of course there is a way, if you structure properly.Just make every single thing a function.... and when your ready to restart... call the _MainFunc(). 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...
MajSlayer420 Posted March 11, 2007 Author Share Posted March 11, 2007 Yeah see I did just that. I call main but the the script stops, The buttons quit working:( MajSlayer420 Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 11, 2007 Moderators Share Posted March 11, 2007 Yeah see I did just that. I call main but the the script stops, The buttons quit working:(MajSlayer420Fix line 24Turtles 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...
MajSlayer420 Posted March 11, 2007 Author Share Posted March 11, 2007 STFU MajSlayer420 Link to comment Share on other sites More sharing options...
MajSlayer420 Posted March 11, 2007 Author Share Posted March 11, 2007 Please smoke on I dont need your smart ass answers, keep'em to yourself pops MS420 Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 11, 2007 Moderators Share Posted March 11, 2007 Please smoke on I dont need your smart ass answers, keep'em to yourself popsMS420You're a dumb ass MajSlayer420... You ask for help with YOUR script, saying your GUI has issues when you try to restart your function... do you think we are mind readers idiot!? Post the f**king source that you are having issues with idiot. 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...
MajSlayer420 Posted March 11, 2007 Author Share Posted March 11, 2007 Well if anyone with any sense could tell if me there is a command to restart your script, I'd like to know. MS420 Link to comment Share on other sites More sharing options...
improbability_paradox Posted March 11, 2007 Share Posted March 11, 2007 (edited) Well if anyone with any sense could tell if me there is a command to restart your script, I'd like to know. MS420 The truth is that SmokeN has far more sense than you do. If you stick around long enough, you will find that he is one of the most knowledgeable posters on this forum. We cannot tell you how to fix your code unless we see it, as SmokeN pointed out. And a clearer description would be helpful as well. You want to start the script again from line one? If its a compiled script, just run it again. Func _Restart() run(@ScriptFullPath) exit endfunc If you want to be sure that your GUI is deleted first, (to be sure you don't have two of them for a split second... not likely, but it could happen I suppose) simply include the code to delete your GUI in the restart function, or put a delay at the beginning of your script. If your script is not compiled, consider using shellexecute() instead of run() EDIT: while this solution may work, a more elegant way would involve re-structuring your code so that running it again isn't necessary. But we can't even begin to help you there without your code Edited March 11, 2007 by improbability_paradox Link to comment Share on other sites More sharing options...
MajSlayer420 Posted March 11, 2007 Author Share Posted March 11, 2007 "Hello, is there a way I can reset my programs flow to the start? " Can I be any clearer??? Anyhow Thanks MS420 Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 11, 2007 Moderators Share Posted March 11, 2007 "Hello, is there a way I can reset my programs flow to the start? "Can I be any clearer???Anyhow ThanksMS420Could you be any more dense?Just make every single thing a function.... and when your ready to restart... call the _MainFunc(). 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...
MajSlayer420 Posted March 11, 2007 Author Share Posted March 11, 2007 Anyhow Thanks Improb! working perfect Really, Thanks man, been trying to get this to work for a few hours, I would have posted code if it was possible(it would take a long time 7000+ lines of code) MS420 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