Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2009
    Posts
    3

    Help with skipping screens based on user input

    Hello,
    I am new to Setup Factory and I am in the evaluation process prior to purchasing. I am not a programmer so I am learning as I go. While I have figured out some items I am stuck.

    Here is my situation:
    I have a project with several Before Install screens.

    One of these is a custom screen that has 2 Radio buttons and some text.

    When the user clicks the Next button on this screen I want the install to skip to a screen that is not next in the Before Install list based on the Radio button that is selected.

    I have figured out how to use the Jump.Screen function to move to the desired screen when I click on the Radio button. But I want the screen jump to occur only when the user clicks on the Next button. How can I accomplish this? Is there any sample code that can be posted that I can use as a starting point?

    Thanks

  2. #2
    Join Date
    Apr 2005
    Location
    São Paulo, Brazil
    Posts
    2,539
    Hello,

    in the On Next event handler of your screen, you should check the state of your radio buttons, and determine which one was selected. Based on the outcome, them jump to one screen or another.

    You can retrieve the properties of each radio button with
    Code:
    props = DlgRadioButton.GetProperties(NAME_OF_CONTROL);
    then check if it is checked with
    Code:
    if (props.Checked) then
        -- do something
        Screen.Jump("OtherPage");
    else
        -- do something else
        Screen.Next();
    end
    This is just an example, of course.

    Ulrich

  3. #3
    Join Date
    Jul 2009
    Posts
    3
    Thank you for your help. I entered the following code and it appears to work.

    props = DlgRadioButton.GetProperties(CTRL_RADIO_BUTTON_01) ;
    props2 = DlgRadioButton.GetProperties(CTRL_RADIO_BUTTON_02) ;

    if (props.Checked) then
    -- do something
    Screen.Jump("Ready to Install Workstation");
    end

    if (props2.Checked) then
    -- do something else
    Screen.Next();
    end

    This prevents the user from cliking the Next button until a selection is made. Would this be the correct way to accomplish this or is there a better way?

    On a similar note Screen.Next function moves the instalelr to the Select Packages screen (I use the default pre-built screen). I have 3 packages that are just files and each one can be installed in different locations. So I added 3 Folder Selection screens in a row and edited the text one each one.

    Would I use the same concept as above to dictate what happens when the Next button is clicked? If the user selects all three than I have no problem. But if they select only package 2 I think I can figure out how to skip the first Folder Install screen but how would I get it to skip screen three? Or if the user selects only package 1 how do I get it to skip Folder Install screens 2 and 3?

    Do I have to work with the Preload tabs on the Folder Install Screens to make this happen?

    Again - thanks for your assistance.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts