Is there a spot that unsaved (autosaved?) scripts go? I was pretty far into a script when my Mac locked up and I had to do a hard reboot. Unfortunately, I had a lot of ASOBJC going on, so the script might not have been autosaving. It’s my own fault, I suppose for not saving more regularly, but is there a spot I should look for it since it didn’t reopen along with my raft of untitled scripts? Thanks, very frustrating and I’m kicking myself.
Each time you run or compile your script, Script Debugger will try to auto-save.
If you are working on an existing script document, the auto-save file should be in the same directory as the script document. If you are working on an unsaved (new) script, the auto-save file can be found in the ~/Library/Autosave Information
folder.
I found most of my unsaved scripts in the ~/Library/Autosave Information
folder, but not that one. I don’t know what happened, I guess. I’m suspecting that sometimes it won’t save if it has the ASOBJC stuff filled up, so it has to compile the script?
I’m rewriting the script, so
Yes, scripts that use ASObjC may not auto-save because AppleScript cannot persist ASObjC object references retained in top-level global variables and properties. You can work around this by keeping object references local
but it’s hard to remember this and it makes debugging awkward at times.