Timeline for How can I specify a drive in Applescript without the drive name?
Current License: CC BY-SA 4.0
4 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jul 13, 2020 at 16:07 | vote | accept | Tango | ||
Jul 13, 2020 at 15:41 | comment | added | CJK |
Your two paths are indeed equivalent, but to access the folder in question, you need to reference it through System Events, i.e. tell app id "com.apple.systemevents" to set scptdir to folder "~/Documents/Dev/AppleScript" . load script is a Standard Additions command, all of which understand posix paths without needing to be qualified. Therefore, if pathMyUtil has the value "/Users/me/Documents/Dev/AppleScript/utils.scpt" (or whatever the file is called), then load script pathMyUtil is all good. (Although note that use of the tilde only works in a SystemEvents context.)
|
|
Jul 13, 2020 at 15:18 | comment | added | Tango | I tried changing "Macintosh HD:Users:me:Documents:Dev:AppleScript:" to "/Users/me/Documents/Dev/Applescript" and it won't work. I'm adding more. This is for a utility library of mine and I think part of the problem is I'm trying to load this library as a script. The line that seems to be a problem is "set MyUtil to load script pathMyUtil." | |
Jul 13, 2020 at 6:54 | history | answered | CJK | CC BY-SA 4.0 |