nicky40 Posted January 12, 2009 Share Posted January 12, 2009 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 More sharing options...
Pain Posted January 12, 2009 Share Posted January 12, 2009 $ZIP = "ATV" Run('explorer ' & "H:\Remote\Remot077\Labels\" & $ZIP) Link to comment Share on other sites More sharing options...
nicky40 Posted January 12, 2009 Author Share Posted January 12, 2009 $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 More sharing options...
Pain Posted January 12, 2009 Share Posted January 12, 2009 (edited) $ZIP = "ATV" $REM = "Remote077" Run('explorer ' & "H:\Remote\" & $REM & "\Labels\" & $ZIP) You missed some "&" Edited January 12, 2009 by Pain Link to comment Share on other sites More sharing options...
nicky40 Posted January 12, 2009 Author Share Posted January 12, 2009 $ZIP = "ATV"$REM = "Remote077"Run('explorer ' & "H:\Remote\" & $REM & "\Labels\" & $ZIP)You missed some "&" Thank you sir! Now I can keep truckin!Nick! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now