Results 1 to 7 of 7

Thread: Write to the command line

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Feb 2000
    Location
    Dallas,Tx,USA
    Posts
    30
    What i want to do is write back to the comamnd line.


    type into command line: program.exe -options
    return to the command line: "-save(save file). "-more option (some text)"

  2. #2
    Member
    Join Date
    Oct 2000
    Posts
    47

    what?

    i dont understand what exactly you want to do...
    do you want to open a program from your application to other application and sending it a certain parameter??or what?
    DealMan

  3. #3
    Guest
    Code:
    Private Sub Form_Load()
    
        Select Case Command
            Case "-options"
                MsgBox "-save(save file)" & vbCrLf & "-more option (some text)"
        End Select
        
    End Sub

  4. #4

    Thread Starter
    Junior Member
    Join Date
    Feb 2000
    Location
    Dallas,Tx,USA
    Posts
    30

    I want to call my program on the command line an pass it parameters.

    Ex: program.exe -options


    Then if the parameter passed to my program is "-options" list all of my options back to the user on the command line from which they executed my program.

    So now the user has a list of all the parameters they can pass to my vb program.

    I know how to do all the above except for "printing" or "writing" back to the command line that the user called my application from. I do not want to use a msgbox or text file. I just want to write back to the command line.

    Thanks
    Mark S

  5. #5
    Addicted Member Shrog's Avatar
    Join Date
    Aug 1999
    Location
    Darkest Africa
    Posts
    186

    Question Return Value

    I think, if I understand you correctly, that you want your program to return a value.

    Forget about the commandline. It is just some text that is passed to your program. It does not exist as a space where you can do things like writing to it. You cannot do anything with it. You cannot use it to pass data back to the calling program.

    It sounds to me like you are running this program from a DOS command line. What language is it written in? What kind of data do you want to write back, and what do you want to do with the data that is send back?

    Shrog

  6. #6

    Thread Starter
    Junior Member
    Join Date
    Feb 2000
    Location
    Dallas,Tx,USA
    Posts
    30
    I want to return to the command line some text.


    The user will launch the program from a command line (most likely from the dos commmand line) and pass the program a parameter. If the parameter passed to the program is = "-options" then the program will will write back to the command line the various parameters they may call the program with.

    So does anyone know how to write back "some text" to the command line from which the program was executed.

    So as a user if i am in dos and i launch the program but i dont know all of the parameters i can pass the program, so i type -options Example: "C:\whatever\whatever\program.exe -options"

    So as a user i expect to see "-save,-delete,-update,-full,-options" on the next line of the command line.

    So does anyone know how to write back "some text" to the command line from which the program was executed.


  7. #7
    Guest
    I don't think VB can do what you want. You'd have to use C++. Actually, the only way VB can do it is if you create a bat file and then Shell it and give the commands that way. --Suggestion

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