Results 1 to 5 of 5

Thread: Launching a VB app with command line options

  1. #1

    Thread Starter
    Hyperactive Member dandono's Avatar
    Join Date
    Aug 2004
    Location
    Cornwall, UK
    Posts
    485

    Launching a VB app with command line options

    hi, i just found out how to do this my self and thought i should share it with the internet. I was reading a document about making screen savers with vb and found out how to use command line options.
    VB Code:
    1. msgbox "You used command " & Command$
    so when you open the app and call the function then a message box will say "You used command " if you just opened the app or if you opened it with command /Blah then it will say "You used command /Blah"
    If there is only one perfect person in the universe, does that make them imperfect?

  2. #2
    Hyperactive Member half flung pie's Avatar
    Join Date
    Jun 2005
    Location
    South Carolina, USA
    Posts
    317

    Re: Launching a VB app with command line options

    Wow, that's pretty neat. So what does it do for multiple commands? like App.exe /blah /hello /kittenfood ???

    Base 2
    Fcnncu"Nqxgu"Lguug##

  3. #3

    Thread Starter
    Hyperactive Member dandono's Avatar
    Join Date
    Aug 2004
    Location
    Cornwall, UK
    Posts
    485

    Re: Launching a VB app with command line options

    I have no idea. I only found it the other day. I'm still playing around with the code. I don't know how to pass values through it like "/word1 blah".
    If there is only one perfect person in the universe, does that make them imperfect?

  4. #4
    Super Moderator manavo11's Avatar
    Join Date
    Nov 2002
    Location
    Around the corner from si_the_geek
    Posts
    7,171

    Re: Launching a VB app with command line options

    You can use Split or InStr to find every "/" or "-" that you use to put every parameter.


    Has someone helped you? Then you can Rate their helpful post.

  5. #5

    Thread Starter
    Hyperactive Member dandono's Avatar
    Join Date
    Aug 2004
    Location
    Cornwall, UK
    Posts
    485

    Re: Launching a VB app with command line options

    you could make it so it finds the text between "/command " and " /" so it gets the variable and does something.
    If there is only one perfect person in the universe, does that make them imperfect?

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