Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 7 of 7
  1. #1
    Join Date
    May 2007
    Location
    New Jersey
    Posts
    144

    Grin Dialog Box with Buttons

    I made a setup and at the end I want it to ask them if they want to restart their computer now or later. I want to do this by having a dialog box that says something like "Sorry, but you have to restart your computer" and then there will be two buttons, "restart now" and "restart later". How do I do this? I know how to do that they have a dialog box that says something with only one button and when they press it, it restarts their computer. How do I do two buttons? HELP! Thank you in advance.

  2. #2
    Join Date
    Jun 2005
    Posts
    470
    most simple would be with a message box that asks '.... do you want to restart now?' and has Yes and No buttons.

    In case you need custom buttons text, modify some of the available screens.
    Add a new screen in the "After Installing" section, or simply modify the "Finished Install" screen , I think it's added by default - uncheck 'Visible' for the Cancel button, and change texts of Back and Finish buttons to Restart Now & Restart Later. Then edit the action associated with the Restart Now button.

  3. #3
    Join Date
    May 2007
    Location
    New Jersey
    Posts
    144
    Thank you very much but, how to I write the script so I tell it that if they press the yes button, it will restart? do I put:

    if buttoname then
    ....
    end

    ????

    I don't think so... How do I do it?

  4. #4
    Join Date
    Jun 2005
    Posts
    470
    for a message box, sort of this

    Code:
    q = Dialog.Message("Reboot now?", "Do you want to reboot now?", MB_YESNO, MB_ICONQUESTION, MB_DEFBUTTON2);
     if q == IDYES then
     	--reboot
     	System.Reboot();
     else
     	--quit
     	Application.Exit();
     end;
    You may put this code in the On Next script of your last screen, or simply remove After Installing screen(s) and put it in the On Post Install script

  5. #5
    Join Date
    May 2007
    Location
    New Jersey
    Posts
    144
    What if I want to use radio buttons? I added a screen with radio buttons one says restart now and the other one says restart later. How do I tell him what to do for different buttons? How do I give them names? Thanks!

  6. #6
    Join Date
    Jun 2005
    Posts
    470
    then put this in the On Next script

    Code:
    uChoice = String.ToNumber(SessionVar.Expand("%RadioSelection%"));
    if uChoice == CTRL_RADIO_BUTTON_01 then
    	--if the first option is selected, reboot
    	--assumes the first radio button is 'Reboot now', second is 'Reboot later'
    	System.Reboot();
    else
    	--otherwise quit
    	Application.Exit();
    end;

  7. #7
    Join Date
    May 2007
    Location
    New Jersey
    Posts
    144
    Thank you very much! I'm kind of new to this business so sorry for the stupid questions! Thanks

Similar Threads

  1. dialog box
    By elhuevon in forum AutoPlay Media Studio 4.0
    Replies: 1
    Last Post: 09-30-2003, 09:29 AM
  2. Yes\No Dialog Box Autoplay 3.0
    By Architek in forum AutoPlay Media Studio 4.0
    Replies: 1
    Last Post: 02-25-2003, 11:00 AM
  3. MDAC dialog box pops up. How to remove it ?
    By weld in forum Setup Factory 6.0
    Replies: 0
    Last Post: 12-11-2002, 07:14 AM
  4. HOWTO: Display Conditional Text Based Upon a List Box Selection
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-15-2002, 10:54 AM
  5. Packages and If Statements
    By Medlir in forum Setup Factory 6.0
    Replies: 4
    Last Post: 05-09-2002, 03:51 PM

Posting Permissions

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