Sign in to follow this  
Followers 0
tbaror

run with multiple ""

5 posts in this topic

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

Share this post


Link to post
Share on other sites



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.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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 :unsure:

Share this post


Link to post
Share on other sites

works thanks :unsure:

Glad to help you ! Posted Image


AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0