Jump to content

Recommended Posts

Posted

Is it possible to save variables after exit and recall them on the next run?

I am currently just saving vars to an INI File, however, I would like to do this without saving a file. Is there any way to do this?

I've looked at EnvSet(), however, it deletes the env var after autoit exit.

Thanks,

Eric

  • Moderators
Posted

ericnail,

You can put them into the registry - if you are brave enough! ;)

Look at RegWrite and RegRead in the Help file. :graduated:

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

  Reveal hidden contents

 

Posted

  On 9/30/2011 at 5:08 PM, Melba23 said:

ericnail,

You can put them into the registry - if you are brave enough! ;)

Look at RegWrite and RegRead in the Help file. :graduated:

M23

I might try.. What do you mean brave enough??

  • Moderators
Posted

ericnail,

  Quote

What do you mean brave enough??

Just my little joke - personally I try not to use the registry having had corruption problems in the distant past. :graduated:

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

  Reveal hidden contents

 

Posted

Register problems should not be that big of a problem now a days. Considering there are now all those nice virtual system tools.

"Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions."
"The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014)

"Believing what you know ain't so" ...

Knock Knock ...
 

Posted (edited)

The Registry is a good idea as long as you follow namespace conventions within it. I recommend using HKEY_CURRENT_USERSoftware{Vendor}{App} as your key, where {Vendor} and {App} are whatever you make them.

HKEY_CURRENT_USERSoftware avoids permission problems as any user (admin or otherwise) should have write access to it. Secondly it's the Microsoft-approved area for application-specific configuration, which helps to minimize introducing any incompatibilities with future editions of Windows (provided you follow the {Vendor}{App} convention as well.)

Edited by Unsigned

.

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...