It is currently Fri Jan 22, 2021 4:45 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Procedure to force "restart" of application...
PostPosted: Fri Nov 01, 2019 4:57 pm 
Offline
User
User

Joined: Sat Oct 26, 2019 6:48 pm
Posts: 16
Does anyone know of either a built-in PB procedure, or possibly even a custom procedure, to force a restart of an application? Say... for when the end-user changes an application option that will require a restart for that change to take effect.


Top
 Profile  
Reply with quote  
 Post subject: Re: Procedure to force "restart" of application...
PostPosted: Fri Nov 01, 2019 5:09 pm 
Offline
Addict
Addict
User avatar

Joined: Tue Mar 02, 2004 1:20 pm
Posts: 1162
Location: Amphibios 9
Code:
RunProgram(ProgramFilename())
End

_________________
Hygge


Top
 Profile  
Reply with quote  
 Post subject: Re: Procedure to force "restart" of application...
PostPosted: Fri Nov 01, 2019 9:20 pm 
Offline
User
User

Joined: Sat Oct 26, 2019 6:48 pm
Posts: 16
Just to be clear before I do anything which might prove how unskilled I truly am...

Is the 'RunProgram()' procedure for executing an external program, or for restarting the current program? Or, perhaps both?


Top
 Profile  
Reply with quote  
 Post subject: Re: Procedure to force "restart" of application...
PostPosted: Fri Nov 01, 2019 9:54 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Mon May 09, 2011 9:36 am
Posts: 546
Dudemeister wrote:
Just to be clear before I do anything which might prove how unskilled I truly am...

Is the 'RunProgram()' procedure for executing an external program, or for restarting the current program? Or, perhaps both?


Code:
 RunProgram(ProgramFilename()) : End ;<<--- will completely restart your program


RunProgram() can also execute external programs + other things


in my program , i use this below to restart my program , but not from scratch
because i just want to clear all [ClearAll(0) procedure] choices and variables
and because i have EULA Agreement Window + License Window that pops up
when i 1st run my Program ... so to stop those 2 Windows from starting up if i just want to simply Restart with "New File" choice
i use this method instead :
Code:
Case 5 ;-[ 5 ] New File - Restart Program to clear everything
          ClearAll(0) : MainWindow()  ;<<--- RunProgram(ProgramFilename()) : End ; another way to restart entire program



MainWindow() ... can be like calling your Window_0 or Window_1 main Procedure to start all over again without actually ending your Program

_________________
 
PureBasic .... making tiny electrons do what you want !

"With every mistake we must surely be learning" - George Harrison


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 26 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye