tijiez Posted January 24, 2009 Share Posted January 24, 2009 Is there a way to read %tmp%\file.ext from an INI file in a way that AutoIt will understand it as @TempDir? For Example: If I used iniread of file (from below) and my string was equal to "%tmp%\file.ext", how could I then do FileDelete() on that string. It's not understanding %tmp% as the temporary directory... [sECTION] File=%tmp%\file.ext Link to comment Share on other sites More sharing options...
Authenticity Posted January 24, 2009 Share Posted January 24, 2009 Opt('ExpandEnvStrings', 1) Link to comment Share on other sites More sharing options...
tijiez Posted January 24, 2009 Author Share Posted January 24, 2009 Go figure that it was something ridiculously easy. I was scouring the help file in all of the wrong places. Now I'm embarrassed. Link to comment Share on other sites More sharing options...
EnigmaV8 Posted February 10, 2009 Share Posted February 10, 2009 Although, just be aware that it will then expand env variables for the rest of the script. In other words, if you needed to actually enter any string text with two % symbols such as "%tmp%" it will now treat it as an expandible variable nomatter what. You'd have to work around that if you needed to use it in a string elsewhere. (ex. "%" & "tmp" & "%") Just FYI. 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