Indigo Rose Software
  #1  
Old 09-23-2008
GalacTekM's Avatar
GalacTekM GalacTekM is offline
Indigo Rose Customer
 
Join Date: Sep 2005
Location: Spring Hill, FL
Posts: 28
Radio Selection - Jump to Last Screen

Have a project that contains radio selection box that im having some troubles with. This is what i am trying to accomplish.

If the user selects yes (CTRL_RADIO_BUTTON_01) then i would like the installer to continue on as normal.

If the user selects no (CTRL_RADIO_BUTTON_02) then i would like the installer to skip the next screen(s) and go the the "Finished Install" screen.

Is this a possibility or am i chasing my tail? Any help would be appreciated.

Thanks.
__________________
Matt Leach
GalacTek Corp.
www.galactek.com
Reply With Quote
  #2  
Old 09-23-2008
jassing's Avatar
jassing jassing is offline
Indigo Rose Customer
 
Join Date: Jan 2001
Location: Anderson Island, WA, USA
Posts: 1,899
Quote:
Originally Posted by GalacTekM View Post
Have a project that contains radio selection box that im having some troubles with. This is what i am trying to accomplish.

If the user selects yes (CTRL_RADIO_BUTTON_01) then i would like the installer to continue on as normal.

If the user selects no (CTRL_RADIO_BUTTON_02) then i would like the installer to skip the next screen(s) and go the the "Finished Install" screen.

Is this a possibility or am i chasing my tail? Any help would be appreciated.

Thanks.
The "stock" way of doing it would be to use an if/endif block on your OnNext

if the user selects radio#2 then
screen.jump("the screen you want them to go to")
else
screen.next()
end

a better way (IMHO) is to use the ConditionalScreens.lua script file (search for it in the forums) -- it allows you to skip screens.. so in the screen you want to "skip" you would put, in onpreload:

if RadioButton == 2 then
Screen.Skip();
end

this requires you to use different calls in your other screens.
Screen.GoNext() instead of Screen.Next()
Screen.GoBack() instead of Screen.Back()

this is better because if the user clicks "back" you don't have to deal with the skipped screen in a 2nd place....
__________________
Reply With Quote
  #3  
Old 09-23-2008
GalacTekM's Avatar
GalacTekM GalacTekM is offline
Indigo Rose Customer
 
Join Date: Sep 2005
Location: Spring Hill, FL
Posts: 28
I have tried the Screen.Jump ("Finished Install") with no prevail as well as Screen.End
__________________
Matt Leach
GalacTek Corp.
www.galactek.com
Reply With Quote
  #4  
Old 09-23-2008
jassing's Avatar
jassing jassing is offline
Indigo Rose Customer
 
Join Date: Jan 2001
Location: Anderson Island, WA, USA
Posts: 1,899
Quote:
Originally Posted by GalacTekM View Post
I have tried the Screen.Jump ("Finished Install") with no prevail as well as Screen.End
why don't you post your code -- becuase "it works" isn't going to help you
__________________
Reply With Quote
  #5  
Old 09-23-2008
GalacTekM's Avatar
GalacTekM GalacTekM is offline
Indigo Rose Customer
 
Join Date: Sep 2005
Location: Spring Hill, FL
Posts: 28
Code:
 if (nSelectedControl == CTRL_RADIO_BUTTON_02) then 
Screen.Jump ("Finished Install")
else 
Screen.Next ()
Im pretty sure this isnt correct, still trying to learn LUA. Thanks
__________________
Matt Leach
GalacTek Corp.
www.galactek.com
Reply With Quote
  #6  
Old 09-23-2008
jassing's Avatar
jassing jassing is offline
Indigo Rose Customer
 
Join Date: Jan 2001
Location: Anderson Island, WA, USA
Posts: 1,899
Quote:
Originally Posted by GalacTekM View Post
Code:
 if (nSelectedControl == CTRL_RADIO_BUTTON_02) then 
Screen.Jump ("Finished Install")
else 
Screen.Next ()
Im pretty sure this isnt correct, still trying to learn LUA. Thanks
1st off -- where do you set nSelectedControl?

Style is a bit odd (to me) usually you have the parens next to the method
Screen.Next() instead of Screen.Next () but I don't think that's your problem...

Here's code that works -- provided that you you are using the "stock" finish screen ID (didnt change it) and the "stock" session var on a radiobutton screen.

You may need to change the code if you altered either...
The code goes in "On Next" of the radio button screen...

Code:
if String.ToNumber(SessionVar.Get("%RadioSelection%")) == CTRL_RADIO_BUTTON_02 then
	Screen.Jump("Finished Install");
else
	Screen.Next();
end
__________________
Reply With Quote
  #7  
Old 09-23-2008
GalacTekM's Avatar
GalacTekM GalacTekM is offline
Indigo Rose Customer
 
Join Date: Sep 2005
Location: Spring Hill, FL
Posts: 28
This also does not work. Seems to ignore the Screen.Jump action. No matter which radio is selected, it continues to the next screen.
__________________
Matt Leach
GalacTek Corp.
www.galactek.com
Reply With Quote
  #8  
Old 09-23-2008
jassing's Avatar
jassing jassing is offline
Indigo Rose Customer
 
Join Date: Jan 2001
Location: Anderson Island, WA, USA
Posts: 1,899
Quote:
Originally Posted by GalacTekM View Post
This also does not work. Seems to ignore the Screen.Jump action. No matter which radio is selected, it continues to the next screen.
you're doing something wrong..
post your project file.
__________________
Reply With Quote
  #9  
Old 09-23-2008
GalacTekM's Avatar
GalacTekM GalacTekM is offline
Indigo Rose Customer
 
Join Date: Sep 2005
Location: Spring Hill, FL
Posts: 28
File is attached in RAR format. Forum does not accept .sf8
Attached Files
File Type: rar DBU_New.rar (6.7 KB, 11 views)
__________________
Matt Leach
GalacTek Corp.
www.galactek.com
Reply With Quote
  #10  
Old 09-23-2008
jassing's Avatar
jassing jassing is offline
Indigo Rose Customer
 
Join Date: Jan 2001
Location: Anderson Island, WA, USA
Posts: 1,899
you cannot jump sections from pre-install to post-install
__________________
Reply With Quote
  #11  
Old 09-23-2008
jassing's Avatar
jassing jassing is offline
Indigo Rose Customer
 
Join Date: Jan 2001
Location: Anderson Island, WA, USA
Posts: 1,899
not to mention you're issuing a screen.next before your if statement; so the if statement never gets executed...
__________________
Reply With Quote
  #12  
Old 09-23-2008
GalacTekM's Avatar
GalacTekM GalacTekM is offline
Indigo Rose Customer
 
Join Date: Sep 2005
Location: Spring Hill, FL
Posts: 28
I was able to get it to work with the following code:

Code:
if String.ToNumber(SessionVar.Get("%RadioSelection%")) == CTRL_RADIO_BUTTON_02 then
	Screen.End ()
else
	Screen.Next();
end
Problem was (which i stupidly did not realize) is that i had a Screen.Next variable before my if statement.

Thanks for you help.
__________________
Matt Leach
GalacTek Corp.
www.galactek.com
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Progress Bars screen, On Start code is skipped AxemanMK Setup Factory 7.0 Discussion 7 09-21-2006 03:15 PM
Jump to a Screen Patrik Setup Factory 6.0 4 09-10-2003 09:02 AM
HOWTO: Make a Media Player Object Go Full Screen Support AutoPlay Media Studio 4.0 Examples 0 10-23-2002 12:23 PM
HOWTO: Install a Screen Saver Support Setup Factory 6.0 Knowledge Base 0 09-27-2002 02:35 PM


All times are GMT -6. The time now is 07:32 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright © 2000 - 2009 Indigo Rose Corporation. All rights reserved.
Indigo Rose Software