Skip to content

Instantly share code, notes, and snippets.

View verbiate's full-sized avatar

Hans van de Bruggen verbiate

View GitHub Profile
-- Create a dialog for the user to choose from
choose from list {"Create a New Folder", "Clear an Existing Folder"} with title "Tag Folders" with prompt "Warning: selecting 'Clear an Existing Folder' will delete all folder contents." default items "Create a New Folder" OK button name "OK" cancel button name "Cancel" multiple selections allowed "false" empty selection allowed "false"
-- Set a variable called listanswer to the result of the selection as text
set listanswer to result as text
if listanswer = "Create a New Folder" or listanswer = "Clear an Existing Folder" then
tell application "Finder"
set loc to choose folder "Choose Folder Location" with prompt "Choose Output Location"
if listanswer = "Clear an Existing Folder" then