Relative file paths with Applescript
问题 I'm trying to make an Applescript that will open a file on a user's computer without knowing the hard drive or user name, presuming the file is in the same place in the user directory. tell application "Finder" to open "/Users/jim/Dropbox/Getting Started.pdf" as POSIX file works great, whereas tell application "Finder" to open "~/Dropbox/Getting Started.pdf" as POSIX file fails. Is there any way to accomplish this simply? 回答1: You can't use tilde paths in AppleScript basically because POSIX