Storing Persistent Values in Preferences

You keep referring to Script Editor. Do you mean that, or Script Debugger?

It should make no difference. I suspect something else is failing.

Use ((path to documents folder as text) & folderName) as «class furl»

Yes, I’m getting the error -45 in Script Editor when I try to save.

(It was my first time writing AppleScripts, and sadly I didn’t find out about Script Debugger until much later in the development process. It seems amazing and much more useful but I’m not comfortable transitioning in the middle of a project.)

If you’re getting the error when auto-saving, it’s probably because a global contains an ASObjC value, and re-compiling will fix it. Otherwise I have no idea.

Recompiling doesn’t do it, but I just tried Script Debugger and haven’t encountered the error -45 yet, so it looks like PrefsStorageLib is viable for me now. Is PrefsStorageLib Universal? (And if not, could I just recompile it as a .scptd in Big Sur to make it so?)

FYI, just tried Script Debugger because you mentioned it, and I’m totally sold on it, and not least because the error went away. Wow. Thanks for your help.

Universality only relates to executable binaries, not scripts.

1 Like