From 7c7df89c7550b2b5b66d4d47e402a28cca567530 Mon Sep 17 00:00:00 2001 From: Ben Smith Date: Wed, 22 Sep 2021 16:21:45 +0100 Subject: [PATCH] Add default location --- 00 Import all to library.applescript | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/00 Import all to library.applescript b/00 Import all to library.applescript index fc126f5..89a1422 100644 --- a/00 Import all to library.applescript +++ b/00 Import all to library.applescript @@ -1,13 +1,14 @@ -- @description Import all script to user library -- @author Ben Smith -- @link bensmithsound.uk --- @version 1.2 +-- @version 1.3 -- @testedmacos 10.14.6 -- @testedqlab 4.6.10 -- @about Run this script in MacOS's "Script Editor" to import all scripts in a folder (including within subfolders) to the user's "Library/Script Libraries" -- @separateprocess TRUE -- @changelog +-- v1.3 + add default location when choosing a folder -- v1.2 + creates "Script Libraries" folder if it doesn't already exist -- v1.1 + remove unnecessary declarations @@ -18,8 +19,11 @@ global scriptFiles set scriptFiles to {} -- Get user input: folder to import +tell application "Finder" + set currentPath to container of (path to me) as alias +end tell -set scriptFolder to choose folder with prompt "Please select the folder containing scripts to import" +set scriptFolder to choose folder with prompt "Please select the folder containing scripts to import" default location currentPath findAllScripts(scriptFolder)