Script to select workspace

Re Suggestion: add workspaces to sidebar, make dynamic for flagging the loaded workspace, there is an easy method that only required creating one dummy file for only once (I think).

(1) Create a dummy file anywhere in any database, and gets its uuid, but never delete it. (2) Also drag and drop the dummy to the “Favorites”. (3) Add two more lines of script to ur workspace-loading script.

Every time you change the workspace, the dummy filename changes accordingly.

Just a suggestion.

tell application id "DNtp"
	try
		set theWorkspaces to workspaces
        -- get the dummy that is under "Favorites", I just make-up an arbitrary uuid here
        set wsFlag to get record with uuid "3874ABCB-2073-46A9-ABA4-730A8BF70C40"

		set mychoice to (choose from list theWorkspaces with prompt "Load this workspace" default items "None" OK button name {"Load"} cancel button name {"Cancel"})
		if mychoice is not false then
			set theSelection to item 1 of mychoice
			close every think window
			load workspace theSelection
            -- or any naming format you'd like to use
            set name of wsFlag to "*Workspace: " & theSelection
		end if
	end try
end tell