I’m writing a bot for ircle and I’ve got it writng it’s prefs and user data to five different files in the prefs folder and that works but I want it to create a folder in the prefs folder and write it’s prefs files in there. I don’t like having all 5 files scattered around in the prefs folder. I figure there’s got to be a way to make it make a new folder in the prefs folder and keep all if it’s data files together. Originally I had this:
set prefPath to path to preferences as string
set prefPath to prefPath & “SkyBot Config Prefs”
set prefFile to open for access file prefPath with write permission
write configData & return to prefFile
close access prefFile
I do this 5 different times for 5 different files and that works but then I tried something like this:
set prefPath to path to preferences as string
set prefPath to prefPath & folder “SkyBot Prefs”
set prefPath to prefPath & “SkyBot Config Prefs”
set prefFile to open for access file prefPath with write permission
write configData & return to prefFile
close access prefFile
But that doesn’t even compile. I tired putting new line in a tell to the finder which gets it to compile but throws an error “Can’t make prefrences in to an item”. I’ve tried several different ways but I can’t seem to get it to write to a file in a folder in the Prefrences folder. Any ides?