I do a lot of cross platform work, and I’m porting a Windows project I’ve made over to the mac …
On Windows, a very common way of storing data is in INI files… I know over on the mac side we’re a bit more posh and we use XML , but is there a way of reading INI files into AS?
I would be surprised if there wasn’t some kind of pre-scripted class or something we could just pop in to our projects …
For those of you who don’t know what INI files look like, the data layout looks like this:
As you can see, it’s a lot easier to read and understand than XML, and in a lot of cases would suit smaller projects way better.
Whenever I need to read INI files on the Mac, I am using Python’s ConfigParser module. Of course, you can also rewrite it in AppleScript, but its rather painful as AppleScript does not support dictionaries containing key-value pairs.