Jump to content
Sign in to follow this  
Angoth

Best way to restart?

Recommended Posts

Angoth

I'm looking for some suggestions for how to restart the application I have.

For example:

While $Stop_Running = 0
_Startup_Function1()
_Startup_Function2()
   While $Restart = 0
        _Function1()
        _Function2()
        _Function3()
        _Function4()
       .
       .
       .
       .
   Wend
Wend

Exit

Without putting in a giant If....Endif loop in each function, I'd like to call for an app restart if certain conditions are met. I'd like to avoid an If....EndIf in each function or around each _FunctionX() line in the main body of the code, there are just too many, and it seems as if there's a better way I just don't know it. What I'm trying to do is restart the application I have scripted every 2 hours. It's easy if I don't hit a restart condition while the main functions are running, but, there are a few tests where a restart of the application is called for in a _FunctionX(). Without the If....EndIf's I don't see how I can do it.

Is there a more efficient way that I am missing?

Thanks.

Share this post


Link to post
Share on other sites
Valuater

If's are almost always needed to test the conditions. If you show the code, possibly we can help you eliminate some of the conditions or suggest select/case for them, or ?????

But we are not mind readers and cannot fix what we can't see!!

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites
Angoth

While $Stop_Running = 0
_Startup_Function1()
_Startup_Function2()
   While $Restart = 0
        _Function1()
        _Function2()
        _Function3()
        _Function4()
       .
       .
       .
       .
   Wend
Wend

ExitoÝ÷ Ûú®¢×Ú)ºØ­jz-êðk"j{^²ÛayÊ'v+b¢{+z«¢®)àj·¬µªí¡ûayªi'¶*'NjȲÜÊÚ,zÛaȬ¶·MúEë-j»

Either one of those just strike me as completely inefficient. Hence the question.

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.