Skip to content

Commit 7c7df89

Browse files
committed
Add default location
1 parent a8e2292 commit 7c7df89

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

00 Import all to library.applescript

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
-- @description Import all script to user library
22
-- @author Ben Smith
33
-- @link bensmithsound.uk
4-
-- @version 1.2
4+
-- @version 1.3
55
-- @testedmacos 10.14.6
66
-- @testedqlab 4.6.10
77
-- @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"
88
-- @separateprocess TRUE
99

1010
-- @changelog
11+
-- v1.3 + add default location when choosing a folder
1112
-- v1.2 + creates "Script Libraries" folder if it doesn't already exist
1213
-- v1.1 + remove unnecessary declarations
1314

@@ -18,8 +19,11 @@ global scriptFiles
1819
set scriptFiles to {}
1920

2021
-- Get user input: folder to import
22+
tell application "Finder"
23+
set currentPath to container of (path to me) as alias
24+
end tell
2125

22-
set scriptFolder to choose folder with prompt "Please select the folder containing scripts to import"
26+
set scriptFolder to choose folder with prompt "Please select the folder containing scripts to import" default location currentPath
2327

2428
findAllScripts(scriptFolder)
2529

0 commit comments

Comments
 (0)