Any leading or trailing spaces are trimmed from the key. If no value is found, it simply returns an empty string. It expects a list containing INI data, the name of a section, and the name of the key. GetINIKey returns the value of a section’s key. string GetINIKey(list ini, string inisection, string inikey) The notecard must, of course, reside in the contents of the same prim as the script using this function. You’ll probably want this list to be assigned to a global variable, as many of the other functions require this list to be passed to it, and return it. This state simply takes a notecard with INI formatted data, reads it, and returns a list that contains the INI data. A description of this state and each function follows. A state for reading the notecard is also provided. The following functions are provided: GetINIKey, SetINIKey, GetINISectionList, GetINIKeyList, DeleteINISection, DeleteINIKey, and KeyExists. I have used modified versions there, so they’re usable on Aurora-Sim if you’re up to tracking down the different ways scripts function there. As written, these functions also will not function properly on Aurora-Sim. ![]() In addition, SL imposes limits on lists that XEngine does not. These may work over in SL, but have not been tested there. These functions were written and tested with OpenSimulator’s XEngine in mind. Unless you go nuts, this should still be sufficient for most uses. This is important because a notecard line is limited to 255 characters, so you must keep in mind that any values you store share those 255 characters with the name of the section, the key, and two null characters. Each list element is composed of a section, key, and value delimited by a null character. Within a script, the INI data is stored in a single list. They do not store them, and comments will not be preserved when the notecard is written. They cannot be appended to the end a key/value pair. Comments must start with a semicolon and occupy a notecard line of their own. These functions have some limited support for INI style comments within the notecard. ![]() I want to provide a full description of the functions available, but if you’re in a hurry to simply grab them, scroll down to the bottom of this page for the full code. Another version of these functions that uses OSSL functions is available, and has to ability to write data to a notecard. UUIDs referenced by code and notecards refer to assets on the OsGrid.This page contains code from a script that enables a scripter to read and manipulate notecards that contain data in the INI File format. High quality grids already have set YEngine as default, or at least give simowners the option to enable it. Note that as soon as YEngine becomes the default in a forthcoming OpenSim release, we will drop XEngine support. XEngine or YEngine (YEngine strongly recommended!) > spares: Spares and snippets for research and development. > remote: The source code for the remote control HUD. > installer: The source code for the updater aka patch > extensions: Enhanced features that can be added to a device > device: Everything you need for a full featured device > apps: Fun features you can add to your device > ao: The source code for the animation overrider. ![]() > src: Source code of the OsCollar role play device. doc: Useful information and documentation
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |