Jump to content
Sign in to follow this  
nicky40

Question about opening files with variables!

Recommended Posts

nicky40

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

Share this post


Link to post
Share on other sites
Pain

$ZIP = "ATV"

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

Share this post


Link to post
Share on other sites
nicky40

$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 :\

Share this post


Link to post
Share on other sites
Pain

$ZIP = "ATV"

$REM = "Remote077"

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

You missed some "&" :)

Edited by Pain

Share this post


Link to post
Share on other sites
nicky40

$ZIP = "ATV"

$REM = "Remote077"

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

You missed some "&" :)

Thank you sir! Now I can keep truckin!

Nick!

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  

×