Jump to content

[UDF] AutoConfig


matwachich
 Share

Recommended Posts

This UDF contains functions that help managing the configuration of your scripts.

You can use either an *.ini file, or registry keys, the UDF manage for you all IniRead/IniWrite or RegRead/RegWrite calls.

Instructions

First, you must call _AutoCfg_Init to setup the system, which method will be used to stor the config (ini/reg), the path (ini file/reg key) and various options (data encryption, ini file section).

After that, you must add the configuration entries that will be used, with their respective default value (use _AutoCfg_AddEntry).

Next, you must call _AutoCfg_Update to update every entry with either it’s corresponding value on the disk (ini/reg) or with it’s default value if no value is present on the disk.

Finally, you can use in your script the function CFG to get the current value of an entry, or an array of all the entries and their values and default values. And the function _AutoCfg_SetEntry the set the value of an entry or set it to it’s default value.

UDF_autoCfg.zip

Edited by matwachich
Link to comment
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
 Share

×
×
  • Create New...