Results 1 to 3 of 3

Thread: Receiving command line arguments

  1. #1
    Guest

    Question

    OK, I'm too lazy to dig this up....
    How do I load a passed argument(s) into a variable in my program?

    Lest say my program is NukeWhales.exe and the user runs my program

    NukeWhales 3:00pm, Thursday

    How do I get "3:00pm" and "Thursday" into my program.

    Thanx
    Elrey



  2. #2
    Guest

    Smile Get command params

    Use variable Command$ to get the string passed into the app from the command promt.
    You can then user the split command to move the data into an array and get it from there.

    ie.
    X = split(Command$, "'")

    msgbox X(1) etc......


    Hope this helps,


    John.

  3. #3
    Fanatic Member
    Join Date
    Aug 2000
    Posts
    736
    Use the "Command" function in your program to read the variables that are passed.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width