I have a running program and wish for it to close and a new program to open when a button is pressed.
I know of the Run Program action which would open the second program but how do I go about closing the first program?
Run Program?
- airsoftsoftwair
- Posts: 5443
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: Run Program?
That's not generally possible. If the program you want to close supports ARexx, you could send a close message to its ARexx port to make it shut down.
Re: Run Program?
So it's not possible to press a button in one Designer presentation to close it and automatically open a second presentation?
Re: Run Program?
What exactly do you want to do ?
Imagine you have two Presentations, let's call them Pres1 and Pres2.
Pres 1 has a Button. When you klick on it , Pres2 shall be started, and Pres11 should exit?
If you want to stop Pres1 before Pres2 starts, this is not possible that easily.
If it is ok for you, that Pres2 already begins to start while Pres1 is just shutting down, then it's easy:
Create Pres2. Save it as an executable.
Create Pres1. Add a button. In the context menue of your object choose event "when mouse button is released". ad an action of type "Run Code". As code put the following in the Editor:
Imagine you have two Presentations, let's call them Pres1 and Pres2.
Pres 1 has a Button. When you klick on it , Pres2 shall be started, and Pres11 should exit?
If you want to stop Pres1 before Pres2 starts, this is not possible that easily.
If it is ok for you, that Pres2 already begins to start while Pres1 is just shutting down, then it's easy:
Create Pres2. Save it as an executable.
Create Pres1. Add a button. In the context menue of your object choose event "when mouse button is released". ad an action of type "Run Code". As code put the following in the Editor:
Code: Select all
Run("Pres2")
End
Re: Run Program?
Gave it a go and couldn't get it to work
- airsoftsoftwair
- Posts: 5443
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: Run Program?
Did you use an absolute path when calling Run()?