tbaror Posted April 21, 2011 Posted April 21, 2011 Hello, i am trying to use RUN command with following but cant get it correctly , i am sure this is easy $cmd = Run(@ComSpec & " /c typeperf -qx | findstr /C:"Network Interface" | findstr /C:"Bytes Total" ", @SystemDir, @SW_SHOW, $STDERR_CHILD + $STDOUT_CHILD) Please Advice Thanks
wakillon Posted April 21, 2011 Posted April 21, 2011 And like this ?$cmd = Run(@ComSpec & ' /c typeperf -qx | findstr /C:"Network Interface" | findstr /C:"Bytes Total"', @SystemDir, @SW_SHOW, $STDERR_CHILD + $STDOUT_CHILD) AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts
Mallie99 Posted April 21, 2011 Posted April 21, 2011 I usually use chr(34)... It can sometimes get a little messy, but I always know where I am. For example: $cmd = Run(@ComSpec & " /c typeperf -qx | findstr /C:" & chr(34) & "Network Interface" & chr(34) & " | findstr /C:" & chr(34) & "Bytes Total" & chr(34), @SystemDir, @SW_SHOW, $STDERR_CHILD + $STDOUT_CHILD) You can usually use & _ to signify a new line, for example: $String = "This is some text " & _ "That sits on one line" Will give you "This is some text That sits on one line" Are you telling me something I need to know or something I want to know?
tbaror Posted April 22, 2011 Author Posted April 22, 2011 And like this ?$cmd = Run(@ComSpec & ' /c typeperf -qx | findstr /C:"Network Interface" | findstr /C:"Bytes Total"', @SystemDir, @SW_SHOW, $STDERR_CHILD + $STDOUT_CHILD) works thanks
wakillon Posted April 22, 2011 Posted April 22, 2011 works thanks Glad to help you ! AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts
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