View Full Version : Selective hide/show install screen?
kneighbour
08-24-2006, 10:19 PM
Can you selectively hide/show the install screens?
For example, I have one (Before Installing) screen that asks "Do you want to create program shortcuts".
I have a subsequent screen that asks "Do you want to place a shortcut in the Startup folder".
The thing is, I do not want to show the Startup shortcut screen if the user has already decided not to create shortcuts. So I need some way to bypass this screen depending on the value of some session variable.
I had thought to tap into the Previous and Next events of the two screens around the screen in question, but it seems a hard way to go.
Is there a simpler way to do this?
In the On Next script, put code like
if (bShortcutsOK) then
Screen.Next();
else
Screen.Jump("Some screen");
end;
You may also put all the shortcut related choices in one screen and keep all inactive in case the main one is not checked.
Dan from ECC
08-25-2006, 05:48 PM
A third way is use On preload for the screen in question. For example
In the preload tab
if whatever-triggers-this ==0
--- condition should not happen
then
Screen.Next();
end
kneighbour
08-27-2006, 06:16 PM
A third way is use On preload for the screen in question. For example
In the preload tab
if whatever-triggers-this ==0
--- condition should not happen
then
Screen.Next();
end
To me, this will not work - you could get into an endless loop. This will only work if you are going FORWARD through the install sequence. What if you are going backwards (ie hitting the PREV button). As soon as you ht this code, you will go into an endless loop that will lock the process.
kneighbour
08-27-2006, 06:19 PM
In the On Next script, put code like
if (bShortcutsOK) then
Screen.Next();
else
Screen.Jump("Some screen");
end;
You may also put all the shortcut related choices in one screen and keep all inactive in case the main one is not checked.
Yes, this wil lwork, I guess. But then you also have to tie into the On Previous screen of the screen following the one in question. It can get complicated, which is why I asked if there is a better way.
Laslie Toth
08-28-2006, 02:38 AM
Try this http://www.indigorose.com/forums/showpost.php?p=83461&postcount=4
Yes, this wil lwork, I guess. But then you also have to tie into the On Previous screen of the screen following the one in question. It can get complicated, which is why I asked if there is a better way.
Why?
If you put the code which computes bShortcutsOK also in the On Next script, you will jump to the correct screen any time you go through this screen and click Next - no need to put anything in the On Previous script of the screen that follows.
A problem may possibly arise only if you go back through screens, then go forward and jump over the screen with shortcuts - but I doubt this will be the case.
You may also set a global variable that keeps the last screen, in case there are many possible screen sequences.
kneighbour
08-28-2006, 08:31 PM
Why?
A problem may possibly arise only if you go back through screens, then go forward and jump over the screen with shortcuts - but I doubt this will be the case.
You WILL have a problem going back through the screens - your hidden one will now appear. So you must have code in the On Previous event to skip the screen.
The previous poster linked to a whole lot of code that fixes the problem, as far as I can see. It looks as though it would work.
kneighbour
08-28-2006, 08:34 PM
You may also put all the shortcut related choices in one screen and keep all inactive in case the main one is not checked.
This is a great idea - except that I do not think that SF7 will allow this. There are only a limited number of screen types available, and this is not one of them.
You WILL have a problem going back through the screens - your hidden one will now appear. So you must have code in the On Previous event to skip the screen.
well I've always assumed that Previous & Next work like in browsers - that is, Previous goes to the previous screen in the history of screens - not in the list of screens, as it appears in the design environment.
Isn't it like that ? (I'm away from my PC with SF for a couple of days and can't test right now)
Dan from ECC
08-29-2006, 05:50 PM
To me, this will not work - you could get into an endless loop. This will only work if you are going FORWARD through the install sequence. What if you are going backwards (ie hitting the PREV button). As soon as you ht this code, you will go into an endless loop that will lock the process.
Good point. I only use it on a screen that appears right before the installation complete screen and then only appears in very few cases. So this is case it isn't an issue.
kneighbour
08-29-2006, 06:55 PM
well I've always assumed that Previous & Next work like in browsers - that is, Previous goes to the previous screen in the history of screens - not in the list of screens, as it appears in the design environment.
Isn't it like that ? (I'm away from my PC with SF for a couple of days and can't test right now)
No - it goes to the next/prev screen in the Screen list. As it should, I suggest.
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.