Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2005
    Posts
    3

    File properties, Conditions, Script condition

    Hello

    I need to evaluate two different variables to decide if I install certain file

    I usually use this for one variable, strcombobox == "ACAPULCO" but now I have to include another variable so I don't know the correct syntax, I used strcombobox == "ACAPULCO" AND strcombobox =="MANAGER" but it's not working


    thx

  2. #2
    Join Date
    Dec 2005
    Location
    Las Vegas
    Posts
    5

    2 different variables?

    pmoncayo,

    You say you need to check 2 different variables but your example is referencing only 1 variable: strcombobox. i.e.:

    "strcombobox == "ACAPULCO" AND strcombobox =="MANAGER"

    If you are checking for either value within the same variable the syntax should be:

    "if strcombobox == "ACAPULCO" or strcombobox == "MANAGER" then..."

    On the other hand, if you are checking 2 separate variables the syntax would be something like this (note that 2 completely different variables are being used):

    "if strcombobox1 == "ACAPULCO" and strcombobox2 == "MANAGER" then..."

    Lastly, if, by any chance, the variables you're checking are session variables, then you must use the following syntax to expand the session variable values:

    "if SessionVar.Expand("%strcombobox%") == "ACAPULCO" or SessionVar.Expand("%strcombobox%") == "MANAGER" then..."

    Hope this advice proves helpful...

    rv
    Last edited by drpepper; 02-07-2006 at 09:49 AM.

  3. #3
    Join Date
    Dec 2005
    Location
    Las Vegas
    Posts
    5

    Additional info...

    I've reviewed some of your other posts and it appears that you are really interested in the boolean conditional statement used in Conditions/Script Condition section used with a specific archive file to set/check, at run-time, whether or not a file should be installed.

    The script condition must be a LUA statement that EVALUATES to a boolean true/false consdition...so....

    in the statement you place in this input box, DO NOT include the "if"...in other words do not use a statment like this:

    if stcombobox == "ALCAPULCO" or strcombobox == "MANAGER" then...

    Instead, simply place a statement that will evaluate to a boolean result:

    strcombobox == "ALCAPULCO" or strcombobox == "MANAGER"

    Note there is no if...and there is no then either; SUF will evaluate the statement and determine if it is true or false. If true, the file will be installed; if it evaluates to false, the file will not be installed.

    I hope this gets closer to the answer you're looking for

Similar Threads

  1. Cannot get File Properties / Conditions working
    By David Wellman in forum Setup Factory 7.0
    Replies: 6
    Last Post: 01-13-2005, 09:01 AM
  2. Audio Tracks Project
    By Michael in forum AutoPlay Media Studio 5.0
    Replies: 7
    Last Post: 03-18-2004, 10:58 PM
  3. Replies: 0
    Last Post: 11-26-2001, 04:02 AM
  4. Can search allow manual browse even if file is found?
    By RichardShaw in forum Setup Factory 5.0
    Replies: 2
    Last Post: 08-28-2000, 06:08 PM
  5. Replies: 0
    Last Post: 08-17-2000, 02:29 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