Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2007
    Posts
    2

    Simple scripting question

    Hello

    Here's a script I wish to run at the "Ready to Install" stage to check some licensing parameters. The first few lines should get the value of the AppFolder, make sure that it does not already end with "\" or "/" and then add the rest of the path.

    But... the variable substitution doesn't work. What am I doing wrong?

    Also, where can I get a full list of variables such as "EXIT_REASON_USER_ABORTED"?

    Thanks!


    local Afolder = SessionVar.Get("%AppFolder%");

    Afolder = String.TrimLeft(Afolder,"/\\");

    local fullpath = SessionVar.Expand("%Afolder%\\etc\\progname\\progn ame.key");

    Dialog.Message("Debug",fullpath);

    if (File.DoesExist(fullpath))
    then
    local size=File.GetSize(fullpath);
    -- Dialog.Message("Size",size);
    if (size==999) then
    Dialog.Message ("Warning","Progname is already installed as an evaluation version. Please contact your reseller for information on extending your evaluation or purchasing the Progname software license. For further information please see http://www.sitename.com/progname");
    else
    Dialog.Message ("Warning","A licensed version of Progname is already installed. Please contact your reseller for information on upgrading to the latest version. For further information please see http://www.sitename.com/progname");
    end
    Application.Exit(EXIT_REASON_USER_ABORTED)
    else
    -- Do something else here
    end
    -- These actions are performed before the screen is shown.

  2. #2
    Join Date
    Mar 2005
    Location
    WA 'wait a while' - Australia
    Posts
    872
    Hi there..

    I think you solve things by using:

    Afolder = SessionVar.Expand("%AppFolder%");

    eg: Afolder = String.TrimRight(SessionVar.Expand("%AppFolder%"), "\\");
    Afolder = String.TrimRight(SessionVar.Expand("%AppFolder%"), "/\\");

    hth
    Last edited by Eagle; 03-13-2007 at 09:22 AM.

  3. #3
    Join Date
    Mar 2007
    Posts
    2
    Great, thanks!

Similar Threads

  1. Hope this is a simple question
    By TristanD in forum AutoPlay Media Studio 6.0
    Replies: 4
    Last Post: 11-21-2006, 03:30 AM
  2. TU scripting question
    By ICS in forum TrueUpdate 2.0
    Replies: 3
    Last Post: 09-20-2006, 09:34 AM
  3. Simple question from a simple mind
    By brdga in forum AutoPlay Media Studio 5.0
    Replies: 3
    Last Post: 06-24-2004, 08:00 AM
  4. Scripting Reference Question
    By Jim Smiley in forum AutoPlay Media Studio 5.0
    Replies: 2
    Last Post: 11-11-2003, 01:09 PM
  5. Simple Question
    By joesoap in forum AutoPlay Menu Studio 3.0
    Replies: 1
    Last Post: 02-23-2001, 12:28 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