Jump to content

Question about opening files with variables!


nicky40
 Share

Recommended Posts

Hey guys,

I'm trying to declare a variable and use it in my directory that I wish autoit to open.

So this is currently how I would open the folder:

Run('explorer ' & "H:\Remote\Remot077\Labels\atv")

I'd like the last part to be a variable that I declare earlier in the script.

So lets say:

$ZIP = ATV

Run('explorer ' & "H:\Remote\Remot077\Labels\$ZIP")

Obviously don't work, does anybody have a soltion to this?

Thanks,

Nicholas

Link to comment
Share on other sites

$ZIP = "ATV"

Run('explorer ' & "H:\Remote\Remot077\Labels\" & $ZIP)

I love you!

One more question, what if I wanted to declare two variables?

$ZIP = "ATV"

$REM = "Remote077"

Run('explorer ' & "H:\Remote\" & $REM "\Labels\" & $ZIP)

Doesn't work :\

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