Jump to content

Execute question


 Share

Recommended Posts

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.


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

Link to comment
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
Link to comment
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...

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


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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...