A1VBCode Forums

Help passing string to command line parameter


http://a1vbcode.com/vbforums/Topic32247.aspx

By jamms - 12/21/2014

Hi guys.. I'm having so many issues with this.



What I need to do is:

1. Have a form with:

A: 1 button

B: 1 text box



When I click on the button I should be able to get this in a command prompt: "livestreamer (string from textbox) best"



I've tried:

Process.start ("cmd","/k  "livestreamer"  & Textbox1.Text & "base")




So this "works", but I get: "livestreamer stringbase"

So string and "base" are together. No space.



I've tried using
 ("cmd","/k  "livestreamer"  & Textbox1.Text " &  """" & "base")


but it's still together.



I've also tried





Dim TestString As String

TestString = Space(1)

Process.start ("cmd","/k "livestreamer" & Textbox1.Text & Space(1) & "base")





But I still get nothing.

This is driving me crazy.



Can anyone help me with this code?

Thanks


By Joey - 1/22/2015

Hey,



Try, ("cmd","/k "livestreamer" & Textbox1.Text " & """" & " base") 'space before "base"



Or ("cmd","/k "livestreamer" & Textbox1.Text & "" "" & "base") 'space between the double quotes