I very much have plenty of elements in variable type Record.
It is how possible to write value of this with variable in Plist and quickly load
It is possible somehow to use “raw data”?
Hi,
record is the AppleScript equivalent to NSDictionary, you can read and write records easily through user defaults.
I haven’t tested it, but I think it’s also possible to write raw data into user defaults using «class data».
At least it’s possible in ObjC
You could also store it in a separate script and load that which would eliminate any need for parsing the information to get it back into the form that you need for the script. Another route would be to use the read/write commands to create a text file to store the data.
I have an application that I am working on that has a script file that I load which contains certain handlers that do not need global data. In this there is a set of 2 handlers which read and store some user defined data sets to a plain text file inside the bundle. They are called to load data defining user presets into two properties in the application. I will later create an import/export feature so that they can be moved around to other computers. I have user defaults as well to store global data, but the text file stores things like user defined page sizes, margins, and grids. Since I wanted to have a way to export these for portability it was worth it to create the routines for moving the records in and out of a plain text file. An added benefit to this is that it is easy for me to read and edit the settings in a text editor if I wanted to.