Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 7 of 7
  1. #1
    Join Date
    May 2006
    Posts
    3

    Grin Multiple Variables in a string

    Code:
    inputuser = pie1;
    inputpass = pie2;
    inputfile = pie3;
    Dialog.Message("Notice", inputuser inputpass inputfile );
    To make the dialogue say "pie1 pie2 pie3"
    so one string (or whatever you call it) is using not 1 but 3 variables, if you don't undestand please tell me, i am not that good at explaining things

  2. #2
    Corey is offline Indigo Rose Staff Alumni
    Join Date
    Aug 2002
    Posts
    9,746
    Hi, check out "concatenation" in the user's guide, i.e.

    Dialog.Message("Notice", inputuser.." "..inputpass.." "..inputfile );

  3. #3
    Join Date
    May 2006
    Posts
    3
    thank you, but when i bulid the project and click the button, it gives me the message
    "On Click, Line 4: attempt to concatenate global `inputfile' (a nil value)"
    why does it say that?

  4. #4
    Corey is offline Indigo Rose Staff Alumni
    Join Date
    Aug 2002
    Posts
    9,746
    Because you didn't set your variable.

  5. #5
    Join Date
    Aug 2003
    Posts
    2,427
    If you're using the code shown in your original post, then you need to assign values to each string by enclosing each one in quotes. Try something like -

    Code:
    inputuser = "pie1";
    inputpass = "pie2";
    inputfile = "pie3";
    Dialog.Message("Notice", inputuser.." "..inputpass.." "..inputfile );

  6. #6
    Join Date
    May 2006
    Posts
    3
    its a bit too late i used a more complex way
    Code:
    create = "-c -b";
    user = Input.GetText("user");
    pass = Input.GetText("pass");
    out = "output.txt";
    userout = out .. " " .. user;
    useroutc = create .. " " .. userout;
    b = useroutc .." " .. pass;
    result = File.Run("AutoPlay\\Docs\\htpasswd.bat", b, "AutoPlay\\Docs", SW_SHOWNORMAL, false);
    thanks anyway

  7. #7
    Corey is offline Indigo Rose Staff Alumni
    Join Date
    Aug 2002
    Posts
    9,746
    Well the main thing is that now you know how to concatenate.

Similar Threads

  1. how to add two string variables?
    By ishopper in forum AutoPlay Media Studio 6.0
    Replies: 2
    Last Post: 04-01-2006, 09:21 AM
  2. attempt to index a string value
    By csd214 in forum AutoPlay Media Studio 5.0
    Replies: 8
    Last Post: 08-08-2004, 01:23 AM
  3. INFO: Setting Environment Variables
    By Support in forum Setup Factory 6.0 Knowledge Base
    Replies: 0
    Last Post: 10-10-2002, 12:07 PM
  4. Default text in edit field - Multiple edit screen
    By Romahe in forum Setup Factory 6.0
    Replies: 1
    Last Post: 12-18-2001, 01:01 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