Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Join Date
    Jun 2006
    Posts
    29

    IF THEN statements?

    I'm trying to build something that will a) ask me "Do you want to install, YES OR NO?" with either a Yes button or a No button.

    If I click on yes, I want it to go on to the next action which will be installing several programs.

    How do I accomplish this? I've already got the dialog box down. Thanks!

  2. #2
    Join Date
    Mar 2007
    Location
    HeaveN
    Posts
    534
    this will get you started...

    Code:
    result = Dialog.Message("Installation", "Do you want to install ?", MB_YESNO, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
        --if they choose yes 
        if result == IDYES then
            --install app
            return true;
        else
            --dont install
            return false;
        end

  3. #3
    Join Date
    Jul 2007
    Posts
    1,512
    Quote Originally Posted by Nocturnal View Post
    I'm trying to build something that will a) ask me "Do you want to install, YES OR NO?" with either a Yes button or a No button.

    If I click on yes, I want it to go on to the next action which will be installing several programs.

    How do I accomplish this? I've already got the dialog box down. Thanks!
    if you look the dialog as options to be able to yes no, ok & Concel and so on

    Good luck.

  4. #4
    Join Date
    Apr 2009
    Posts
    2
    so I have the following:

    result = Dialog.Message("Installation", "Did you remove any existing antivirus software via ADD/REMOVE PROGRAMS in Control Panel?", MB_YESNO, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
    --if they choose yes
    if result == IDYES then
    --install AutoPlay\\Docs\\SophosHomeInstall.EXE
    return true;
    else
    --dont install
    return false;
    end

    I get the dialog box but when I hit YES, it doesnt launch the executable. What did I miss?

  5. #5
    Join Date
    Mar 2007
    Location
    HeaveN
    Posts
    534

    Arrow

    Try like that ;

    Code:
    result = Dialog.Message("Installation", "Did you remove any existing antivirus software via ADD/REMOVE PROGRAMS in Control Panel?", MB_YESNO, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
    if result == IDYES then
    File.Run("AutoPlay\\Docs\\SophosHomeInstall.EXE", "", "", SW_SHOWNORMAL, false);
    else
    return false;
    end

  6. #6
    Join Date
    Apr 2009
    Posts
    2
    that worked man. thanks

Similar Threads

  1. Multiple IF statements
    By Gabis in forum AutoPlay Media Studio 6.0
    Replies: 10
    Last Post: 12-31-2005, 09:24 PM
  2. Small problem with if statements
    By Sooty in forum Setup Factory 6.0
    Replies: 1
    Last Post: 03-18-2005, 08:47 AM
  3. if statements and paragraphs
    By palmmed in forum AutoPlay Media Studio 5.0
    Replies: 7
    Last Post: 08-10-2004, 06:00 PM
  4. if else statements and paragraphs
    By palmmed in forum AutoPlay Media Studio 5.0
    Replies: 0
    Last Post: 08-10-2004, 04:42 PM
  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