Sign in to follow this  
Followers 0
SlimShady

Execute question

6 posts in this topic

I would like to parse strings that contain AutoIt macros.

The following does not work. Does anyone have a solution?

$Cmd = '@SystemDrive & "\Directory"'
$val = Execute('String(' & $Cmd & ')')
MsgBox(64, Default, $val)

Share this post


Link to post
Share on other sites



I would like to parse strings that contain AutoIt macros.

The following does not work. Does anyone have a solution?

$Cmd = '@SystemDrive & "\Directory"'
$val = Execute('String(' & $Cmd & ')')
MsgBox(64, Default, $val)
Is this what you want

$Cmd = "@SystemDrive & '\Directory'"
$val = Execute("String(' & $Cmd & ')")
MsgBox(64, Default, $val)

All I did was change the quotes around.



Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

I believe this is what you want

$Cmd = '@SystemDir & "\Directory"'
$val = Execute('String(' & $Cmd & ')')
MsgBox(64, Default, $val)

I check the help file I didn't see any macro call @SystemDrive so I change it to @SystemDir and work fine...


AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

I believe this is what you want

$Cmd = '@SystemDir & "\Directory"'
$val = Execute('String(' & $Cmd & ')')
MsgBox(64, Default, $val)

I check the help file I didn't see any macro call @SystemDrive so I change it to @SystemDir and work fine...

Shit I was so hell bent on getting something to appear in the msgbox I missed that. Edited by BigDod


Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

this seems to get the same results

$Cmd = '@SystemDir & "\Directory"'
$val = Execute(String( $Cmd ))
MsgBox(64, Default, $val)

???

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

This too.

$Cmd = '@SystemDir & "\Directory"'
$val = Execute($Cmd)
MsgBox(64, Default, $val)

So it is possible!

Thank you all B)

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