Sign in to follow this  
Followers 0
MajSlayer420

Resetting program flow? possible?

14 posts in this topic

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

Share this post


Link to post
Share on other sites



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

Change line 24 and you'll be fine.

[center]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.[/center]

Share this post


Link to post
Share on other sites

Gee that helps allot:) lol So there is no way to reset my program without closing it and starting it again?

MajSlayer420

Share this post


Link to post
Share on other sites

Gee that helps allot:) lol So there is no way to reset my program without closing it and starting it again?

MajSlayer420

That was more information than what you provided buddy :whistle: .... 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().


[center]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.[/center]

Share this post


Link to post
Share on other sites

Yeah see I did just that. I call main but the the script stops, The buttons quit working:(

MajSlayer420

Share this post


Link to post
Share on other sites

Yeah see I did just that. I call main but the the script stops, The buttons quit working:(

MajSlayer420

Fix line 24

Turtles


[center]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.[/center]

Share this post


Link to post
Share on other sites

STFU

:whistle:

MajSlayer420

Share this post


Link to post
Share on other sites

Please smoke on I dont need your smart ass answers, keep'em to yourself pops

MS420

Share this post


Link to post
Share on other sites

Please smoke on I dont need your smart ass answers, keep'em to yourself pops

MS420

You'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.

[center]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.[/center]

Share this post


Link to post
Share on other sites

Well if anyone with any sense could tell if me there is a command to restart your script, I'd like to know.

MS420

Share this post


Link to post
Share on other sites

#11 ·  Posted (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 by improbability_paradox

Share this post


Link to post
Share on other sites

"Hello, is there a way I can reset my programs flow to the start? "

Can I be any clearer???

Anyhow Thanks

MS420

Share this post


Link to post
Share on other sites

"Hello, is there a way I can reset my programs flow to the start? "

Can I be any clearer???

Anyhow Thanks

MS420

Could you be any more dense?

Just make every single thing a function.... and when your ready to restart... call the _MainFunc().


[center]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.[/center]

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0