PDA

Click to See Complete Forum and Search --> : Launching a VB app with command line options


dandono
Jun 26th, 2005, 04:29 AM
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.
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"

half flung pie
Jun 26th, 2005, 10:57 PM
Wow, that's pretty neat. So what does it do for multiple commands? like App.exe /blah /hello /kittenfood ???

dandono
Jun 27th, 2005, 06:57 AM
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".

manavo11
Jun 27th, 2005, 09:43 AM
You can use Split or InStr to find every "/" or "-" that you use to put every parameter.

dandono
Jun 27th, 2005, 01:07 PM
you could make it so it finds the text between "/command " and " /" so it gets the variable and does something.