Open command behavior with a user template bug

I’ve noticed there’s an issue (bug) when setting the “For New Documents” preference to a user template.

Rather than opening the template selected (and whose name is displayed in the preferences) SD opens the template chooser, with the designated template selected. Then, when the script opens, SD immediately shows the save dialog. I’d rather not have that come up until I’m ready to save.

The behavior should be the same whether you’re opening using default template, or built in template or a user template. It should simply open a new script based on the template without showing the save dialog. Right? (FWIW, the user template I’m trying to open has debugging on, and is saved as a script bundle.)

So, just to see if I needed to relaunch SD to make the preference change go through I relaunched (crash reporter came up, BTW). When I opened the preferences, the name of the template I had selected was no longer there and SD showed the template chooser.

I tried again setting the preference, and got the same behavior: Showing the template chooser and the name disappearing after relaunching sd.

→ Script Debugger 8.0.4 (8A50)
→ Mac OS 11.6.3 (20G415)

Two more related issues:

When it first happened and the save dialog came up, the dialog was pointing at the Autosave Information folder in the User/Library. I navigated to a different folder and next time it was pointed at the folder I had navigated to, but, after relaunching SD, it was pointing again to the Autosave Information folder.

Also, when opening from a built in template, SD seems to ignore the Save Window size and position changes made in the UI. The templates each open with their own position and settings.

The changes seem to work with a user template.

Tried the same thing on my mac mini and got slightly different results.

Setting a user template did work. I set this template by saving an edited but unsaved document as template using the Save as template… menu.

I tried saving a new template with the same name, and a few changes. SD warned me before saving that I would replace an existing template. I saved but when I tried to use it I got an error message that the template could not be found. I tried relinking in preferences to the new one, but got the same error message. I resaved as template again, but with a different name and it worked.

When doing a new document with a user template it’s still opening a save dialog right away pointed to the Autosave information folder. And, just as with my laptop, if I navigate away from that folder it will remember, until the next SD relauch.

→ Script Debugger 8.0.4 (8A50)
→ MacOS 11.6.4

EDIT: Also none of the templates open with size and position setting set from the Window menu.

On my laptop, if I save as template, it does open the user template without showing the template chooser. I think I just dragged and dropped a file into the templates folder before.

But all other aspects of this but are still an issue. It opens a save as pointed to the Autosave information folder; it does not follow the window size and position set in the UI.

Shouldn’t a file dropped into the template folder work?

It’s unavoidable because of the way bundle documents work – there has to be a bundle somewhere.

I was afraid of that. I was hoping there was some kind of flag telling SD to save as bundle when it’s saved.

But it still shouldn’t be pointing to the Autosave info folder, right?

That’s the OS’s doing. I’ll see if we can do something about it.

I would have thought that Apps behave the same way, but they don’t require saving as soon as you open.

My dilemma is I’m starting to prefer script bundles, and want to save all new scripts that save as bundles by default, but I don’t want to have to save a script as soon as I open it. Is there a way to set the save dialog to default to bundles?

Templates allow you to include other assets in bundles (including in applets), not just “empty” documents.

Are you including any assets in your templates? If not, just make them .scpt files, and choose .scptd format when you eventually save.