S
Shooter4Life8
Hi, I am having trouble figureing out the best way to open a command
prompt then write lines to it in VB.NET. Currently I have this code,
but it execute's too fast I think because
Dim psi As Object = New ProcessStartInfo
psi.FileName = "cmd.exe"
System.Diagnostics.Process.Start(psi)
SendKeys.Send("abcdefg" & "{enter}")
SendKeys.Send("12345678" & "{enter}")
SendKeys.Send("!@#$%^^&" & "{enter}")
The SendKeys.Send()s seem to be executing so fast that the command
prompt only catches say efg 78 and & in the commmand prompt. And
another thing it seems to do is execute this code twice once for the
down mouse click and one for the up maybe? The effect of the program
running its code twice varies with how long you hold the button down. I
think i need some sort of delays added in but I don't know the function
to do that. And I have no clue how to fix the code running twice. Any
help reguarding any of these issues is much appreciated!
Thank you very much!
prompt then write lines to it in VB.NET. Currently I have this code,
but it execute's too fast I think because
Dim psi As Object = New ProcessStartInfo
psi.FileName = "cmd.exe"
System.Diagnostics.Process.Start(psi)
SendKeys.Send("abcdefg" & "{enter}")
SendKeys.Send("12345678" & "{enter}")
SendKeys.Send("!@#$%^^&" & "{enter}")
The SendKeys.Send()s seem to be executing so fast that the command
prompt only catches say efg 78 and & in the commmand prompt. And
another thing it seems to do is execute this code twice once for the
down mouse click and one for the up maybe? The effect of the program
running its code twice varies with how long you hold the button down. I
think i need some sort of delays added in but I don't know the function
to do that. And I have no clue how to fix the code running twice. Any
help reguarding any of these issues is much appreciated!
Thank you very much!