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:
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"
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 ???
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".
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.
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.