Jump to content

Doudle Quote Single Quote with Variable


 Share

Recommended Posts

Hallo to every AutoIt User

I have a little problem using the run command

When I m typing the command like this

run("explorer.exe c:\temp")

everything is ok

But When I m giving

$temp = "C:\temp"

run("explorer.exe" & $temp) or many combinations with single or double quotes I cannot have the same result as the first run hardcoded ...

Any Help Appreciated

Sorry if this is very easy for someone i tried many things before asking

Thaks a Lot

Link to comment
Share on other sites

The way you have it written would return run("explorer.exec:\temp") instead of run("explorer.exe c:\temp")

What you want is

$temp = " C:\temp" < note the space

run("explorer.exe" & $temp)

or

$temp = "C:\temp"

run("explorer.exe " & $temp) < space here

Edit, typo

Edited by youknowwho4eva

Giggity

Link to comment
Share on other sites

My Friend youknowwho4eva thanks for your quick answer but

It's still not working even i tried the clever thing you proposed

run("explorer.exe c:\temp") opens me the contents of c:\temp directory

$temp = " c:\temp" leaving a space as you said

run("explorer.exe" & $temp) is not working at all

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...