hispeed_mike Posted November 22, 2006 Share Posted November 22, 2006 Hi, Having trouble sending this variable as text to the command prompt window, thanks for the help here is the code... #include "ControlSendPlus.au3" $var1 = InputBox("Machine ID", "Enter Machine ID ( EG: Computer Number 01 to 32") Run (@COMSPEC) Sleep (500) ControlSendPlus ("C:\WINDOWS\system32\cmd.exe", "", "", "mkdir c+;\PrintJob{ENTER}", 0) Sleep(1000) ControlSendPlus ("C:\WINDOWS\system32\cmd.exe", "", "", "net use & $var1 &=c+;\Printjob{ENTER}", 0) No problems sending the text but just problems with varaible just not being replaced with the sharename. Thanks Mike Link to comment Share on other sites More sharing options...
Paulie Posted November 22, 2006 Share Posted November 22, 2006 Hi, Having trouble sending this variable as text to the command prompt window, thanks for the help here is the code... #include "ControlSendPlus.au3" $var1 = InputBox("Machine ID", "Enter Machine ID ( EG: Computer Number 01 to 32") Run (@COMSPEC) Sleep (500) ControlSendPlus ("C:\WINDOWS\system32\cmd.exe", "", "", "mkdir c+;\PrintJob{ENTER}", 0) Sleep(1000) ControlSendPlus ("C:\WINDOWS\system32\cmd.exe", "", "", "net use & $var1 &=c+;\Printjob{ENTER}", 0) No problems sending the text but just problems with varaible just not being replaced with the sharename. Thanks MikeControlsend doesn't work with command prompt. Try this Run(@ComSpec & " /c " & 'command', "", @SW_HIDE) Link to comment Share on other sites More sharing options...
hispeed_mike Posted November 22, 2006 Author Share Posted November 22, 2006 Controlsend doesn't work with command prompt. Try this Run(@ComSpec & " /c " & 'command', "", @SW_HIDE) Hi, I am using ControlSendPlus with command prompt, which works great. You will need the include to test. All I need to understand is how inside of a block of text that is needed to be sent do I declare the variable I input by the InputBox?ControlSendPlus.au3 Link to comment Share on other sites More sharing options...
hispeed_mike Posted November 22, 2006 Author Share Posted November 22, 2006 Hi,I am using ControlSendPlus with command prompt, which works great. You will need the include to test. All I need to understand is how inside of a block of text that is needed to be sent do I declare the variable I input by the InputBox?Just tried to break down the delivery of the $var1 to it own ControlSendPlus line and it works...Thanks for the reply...Sorry I didn't think of this one sooner....Mike Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now