I wrote this script:
let ws = new Workspace();
ws.loadFolder = 'trash';
app.applyWorkspace(ws);
app.currentWindow.showDraftList();
But Trash is not loading. It worked for “inbox”, “flagged”, but not for “trash”.
If it’s a bug in Drafts, could you please fix it ?
I’ll think about it. It is intentional. Workspaces don’t support selected the trash (you’ll notice this is not an option in configuring them in the UI), but I see that’s not clarified in the scripting docs…and I suppose I’m not sure what that couldn’t be allowed. Seems like a odd workflow, but I’ll look at adding it.
1 Like
Thanks. The use case is simple: I clean the trash frequently and intentionally delete some trashed drafts, to be sure I don’t delete important ones. I’d like a script to load the trash of the default workspace instead of manually selecting it. It’s not urgent and not particularly important 