Angoth Posted April 6, 2009 Share Posted April 6, 2009 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. Link to comment Share on other sites More sharing options...
Valuater Posted April 6, 2009 Share Posted April 6, 2009 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) Link to comment Share on other sites More sharing options...
Angoth Posted April 6, 2009 Author Share Posted April 6, 2009 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. 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