Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 8 of 8
  1. #1
    Join Date
    Mar 2006
    Posts
    20

    Lightbulb Allow user to set command line arguments

    Does anyone know of a way to allow the users of the program to enter their own custom command line arguments when i.e. pressing a button to launch something. Either by typing it into a field at first, then pressing a launch button, or preferably by pressing the launch button, then type the arguments into a new field that appears then..

    Just something like that, no specific needs but just that they can enter their own arguments, or at least modify a part or add something to it?

    Any help would be greatly appriciated!

  2. #2
    Join Date
    Dec 2003
    Posts
    891
    Maybe something like this would work if the user knew what arguments to use

    Button On Click
    Code:
    sCommand = Dialog.Input("Enter Argument", "Your answer:", "", MB_ICONQUESTION);
    if sCommand ~= "CANCEL" then
    result = File.Run("AutoPlay\\Docs\\MyProg.exe", sCommand, "", SW_SHOWNORMAL, false);
    end

  3. #3
    Join Date
    Mar 2006
    Posts
    20
    It got me a little closer at least

    Would there be a way to allow users to enter the command line arguments using a batch file?

    i.e. having it say something like
    app.exe +connect
    before the user enters anything, and when the user enter an ip, it would be as if you wrote app.exe +connect 12.34.56.78 in it?

  4. #4
    Join Date
    Dec 2003
    Posts
    891
    You could just add it as a string plus variable.
    (use a space before and after + connect).See in red

    CODE]sCommand = Dialog.Input("Enter Argument", "Your answer:", "", MB_ICONQUESTION);
    if sCommand ~= "CANCEL" then
    result = File.Run("AutoPlay\\Docs\\MyProg.exe", " +connect "..sCommand.."", "", SW_SHOWNORMAL, false);
    end[/CODE]

  5. #5
    Join Date
    Mar 2006
    Posts
    20
    Got it working now, thanks a whole lot
    I think at least Will post if I get more trouble
    Last edited by D0M1N0R; 10-01-2006 at 08:59 AM.

  6. #6
    Join Date
    Mar 2006
    Posts
    20
    Never mind,, GOT IT WORKING
    Code:
    sCommand = Dialog.Input("Connect to server", "Server IP:", "defualtdisplaytext", MB_ICONQUESTION);
    if sCommand ~= "CANCEL" then
    Folder.SetCurrent("AutoPlay\\Docs\\appfolderifneeded")
    result = File.Run("AutoPlay\\Docs\\app.exe", " +connect "..sCommand.."", "", SW_SHOWNORMAL, false);
    end
    Just in case someone else would need something like this
    Last edited by D0M1N0R; 10-01-2006 at 09:08 AM.

  7. #7
    Join Date
    Dec 2003
    Location
    Location! Location!
    Posts
    6,137

    End-user - Command-line - Arguments - Startup

    Quote Originally Posted by D0M1N0R View Post
    Never mind,, GOT IT WORKING
    Code:
    sCommand = Dialog.Input("Connect to server", "Server IP:", "defualtdisplaytext", MB_ICONQUESTION);
    if sCommand ~= "CANCEL" then
    Folder.SetCurrent("AutoPlay\\Docs\\appfolderifneeded")
    result = File.Run("AutoPlay\\Docs\\app.exe", " +connect "..sCommand.."", "", SW_SHOWNORMAL, false);
    end
    Just in case someone else would need something like this
    Nice one there.
    Intrigued

  8. #8
    Join Date
    Feb 2001
    Location
    Indigo Rose Software
    Posts
    2,728
    You can also get the command line arguments that were given to your AutoPlay application by using _CommandLineArgs.

    From the help file:
    _CommandLineArgs
    A numerically indexed table that contains the command line arguments passed into the AutoPlay application.
    --[[ Indigo Rose Software Developer ]]

Similar Threads

  1. Setup Factory and VS 2005
    By vazir786 in forum Setup Factory 7.0
    Replies: 4
    Last Post: 01-13-2006, 08:47 PM
  2. User set keys
    By RodB in forum AutoPlay Media Studio 6.0
    Replies: 1
    Last Post: 01-11-2006, 06:03 PM
  3. HOWTO: Set up an MP3 Playlist
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-24-2002, 11:57 AM
  4. HOWTO: Prompt the User for Confirmation Before Exiting
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-03-2002, 09:50 AM
  5. INFO: How to Set the Default Application Directory
    By Support in forum Setup Factory 6.0 Knowledge Base
    Replies: 0
    Last Post: 09-25-2002, 12:02 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