Jump to content

Recommended Posts

Posted

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

Posted

Go figure that it was something ridiculously easy. I was scouring the help file in all of the wrong places. Now I'm embarrassed. :)

  • 3 weeks later...
Posted

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.

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
×
×
  • Create New...