About this plugin
With this plugin you can work with INI files and the Windows registry, saving system resources thanks to the plugin approach. You can manage multiple INI files or Registry objects too.
You can read and write INI files values, get entire INI sections, etc. For the other hand, you can read Windows registry integer, strings and multi strings values, and many more.
The plugin is fast and save system resources, because you not need to open and write INI files for every value you read or write, but maintain one object instance with the appropiate INI file ready to use.
The same thing around the Windows registry part. You not need to open and close the Windows registry for every read/write values, but maintain one object instance with the appropiate Windows registry ready to use.
Thirparty
This plugin are imposible without the aid of this people:
Thanks a lot!
Create a new Ini object instance. If you specify a local INI file and this do not exists, the plugin create it for you when you call some of the write actions, for example, npIniWriteValue. Note that this action also support for publication embedded files, however, if you use an embedded file you only can read the INI file using actions like npIniReadValue, but obviously you cannot write an embedded INI file.
The result variable store the ID of the object instance, wich you can use on others plugin actions. Also the result variable can store "False" if an error occur. In this last case In this last case the [LastError] variable contain information about the error.
Destroy a previosly created Ini object instance. The result variable store "True" if every is OK, or "False" if not, for example, because no instance is found with the provided ID. In this last case the [LastError] variable contain information about the error.
Write a Ini file value on the specified section/key. The result variable store "True" if every is OK, or "False" if not, for example, because no instance is found with the provided ID. In this last case the [LastError] variable contain information about the error.
Read a Ini file value from the specified section/key. The result variable store the INI file value if exists, or the default provided value if not exists, or "False" if an error occur, for example, because no instance is found with the provided ID. In this last case the [LastError] variable contain information about the error.
Delete a key from the specified section of an Ini file. The result variable store "True" if every is OK, or "False" if not, for example, because no instance is found with the provided ID. In this last case the [LastError] variable contain information about the error.
Retrieve the key names of an Ini file section onto an NeoBook array. The result variable store the names of the keys on the specified section. The result count variable store the number of items stored on the result variable, so is easy to iterate over the result array using native "Loop" statement.
If an error occur the result variable store "False", and [LastError] variable contain information about the error.
Erase an entire Ini file section. The result variable store "True" if every is OK, or "False" if not, for example, because no instance is found with the provided ID. In this last case the [LastError] variable contain information about the error.
Retrieve the section names of an Ini file section onto an NeoBook array. The result variable store the section names on the INI file. The result count variable store the number of items stored on the result variable, so is easy to iterate over the result array using native "Loop" statement.
If an error occur the result variable store "False", and [LastError] variable contain information about the error.
Find if a value exists on the specified section/key of an Ini file. The result variable store "True" if the value exists, or "False" if not; also can store "False" if an error occur. In this last case the [LastError] variable contain information about the error.
Find if a section exists on a Ini file. The result variable store "True" if the section exists, or "False" if not; also can store "False" if an error occur. In this last case the [LastError] variable contain information about the error.
Retrieve all section values of an Ini file onto an NeoBook array. The result variable store the section values on the specified section. The result count variable store the number of items stored on the result variable, so is easy to iterate over the result array using native "Loop" statement.
If an error occur the result variable store "False", and [LastError] variable contain information about the error.
Create a new Reg object instance. The result variable store "True" if every is OK, or "False" if not, for example, because no instance is found with the provided ID. In this last case the [LastError] variable contain information about the error.
Destroy a previosly created Reg object instance. The result variable store "True" if every is OK, or "False" if not, for example, because no instance is found with the provided ID. In this last case the [LastError] variable contain information about the error.
Set a new Windows registry root key to an Reg object instance. Specify the Windows registry root key to use. The supported Windows registry rook keys can be one of the following: HKEY_USERS, HKEY_DYN_DATA, HKEY_CLASSES_ROOT, HKEY_CURRENT_USER or HKEY_LOCAL_MACHINE.
The result variable store "True" if every is OK, or "False" if not, for example, because no instance is found with the provided ID. In this last case the [LastError] variable contain information about the error.
Set a new Windows registry access key to an Reg object instance. You can use three diferent constants values: KEY_READ, KEY_WRITE and KEY_ALL_ACCESS. Use the first if you want only to open keys with read access. The second if you plain to write on keys. And the third if you want to get all access. Note, however, that you cannot write read only registry keys or values in any case, you can only read this kind of keys, so use KEY_READ instead of KEY_ALL_ACCESS.
The result variable store "True" if every is OK, or "False" if not, for example, because no instance is found with the provided ID. In this last case the [LastError] variable contain information about the error.
Open a registry key in order to read, write, delete values, etc. Once you open a Windows registry key, for example "Software\My Program Name", you can begi to read, write and use other plugin Windows registry keys related actions. Although it is not neccesary, is a good practice to use npRegCloseKey action after end working with the opened Windows registry key.
The result variable store "True" if every is OK, or "False" if not, for example, because no instance is found with the provided ID. In this last case the [LastError] variable contain information about the error.
Close the Windows registry key currently open. The result variable store "True" if every is OK, or "False" if not, for example, because no instance is found with the provided ID. In this last case the [LastError] variable contain information about the error.
Create a non existing Windows registry key. The result variable store "True" if every is OK, or "False" if not, for example, because no instance is found with the provided ID. In this last case the [LastError] variable contain information about the error.
Delete an existing Windows registry key and all the keys and values stores in the key. The result variable store "True" if every is OK, or "False" if not, for example, because no instance is found with the provided ID. In this last case the [LastError] variable contain information about the error.
Retrieve all subkey names of the current opened Windows registry key. The result variable store the names of the keys on the specified section. The result count variable store the number of items stored on the result variable, so is easy to iterate over the result array using native "Loop" statement.
If an error occur the result variable store "False", and [LastError] variable contain information about the error.
Find if the currently open Windows registry key has subkeys or not. The result variable store "True" if the key has subkeys, or "False" when not. Also can store "False" if an error occur. In this last case the [LastError] variable contain information about the error.
Find if a Windows registry key exists or not. The result variable store "True" if the key exists, or "False" when not. Also can store "False" if an error occur. In this last case the [LastError] variable contain information about the error.
Get all value names of the currently opened Windows registry key. The result variable store the names of the key values. The result count variable store the number of items stored on the result variable, so is easy to iterate over the result array using native "Loop" statement.
If an error occur the result variable store "False", and [LastError] variable contain information about the error.
Find if a value exists on the currently opened Windows registry key. The result variable store "True" if the value exists, or "False" when not. Also can store "False" if an error occur. In this last case the [LastError] variable contain information about the error.
Write a value on the currently opened Windows registry key. The result variable store "True" if every is OK, or "False" if not, for example, because no instance is found with the provided ID. In this last case the [LastError] variable contain information about the error.
Read a value stored on the currently opened Windows registry key. Note that the plugin can read Windows registry values of type: integer, strings and multi strings. In this last case the result variable store an Array with the strings saved on the value. You can use "GetArrayInfo" native NeoBook function to determine the number of items on the result variable. Most commonly you get a string value on the result variable, also in case of integers value types.
The result variable can also store "False" on errors, for example, because no instance is found with the provided ID. In this last case the [LastError] variable contain information about the error.
Delete a value stored on the currently opened Windows registry key. The result variable store "True" if every is OK, or "False" if not, for example, because no instance is found with the provided ID. In this last case the [LastError] variable contain information about the error.
Rename a value stored on the currently opened Windows registry key. Provide the name of the value to be renamed and the new name for the value. The result variable store "True" if every is OK, or "False" if not, for example, because no instance is found with the provided ID. In this last case the [LastError] variable contain information about the error.
All the NeoPlugins deal with errors in the same way that NeoBook does: when the plugin found an action error the [LastError] variable store information about the error, so you can take care about this variable when execute an action.
But all the NeoPlugins also incorporate an advanced way to deal with possible action errors. You can define a subroutine named OnNeoPluginActionError in order to be executed when some action error are found and you can use this variables inside:
Note that this error handling subroutine are shared for all the NeoPlugins, so you no need to specify a subroutine for every plugin you use in your publication because the same subroutine are recognized and automagically used by every NeoPlugin. Below you can view a sample of this subroutine code:
:OnNeoPluginActionError AlertBox "NeoPlugin Error" "Error [LastError] in plugin: [PluginName]" Return
Also note that the use of this NeoPlugins error handling subroutine is completelly optional. You can continue using the [LastError] variable as usual and even use the both methods at the same time.