0
我试图启动与我的脚本位于同一目录中的文件夹的Finder窗口。当我运行下面的代码时,它将启动一个空白的Finder窗口设置为脚本路径而不是文件夹。相对于脚本位置的AppleScript路径
tell application "Finder"
tell application "Finder" to make new Finder window
set file_path to (path to me) as text
set target of Finder window 1 to file_path
end tell
如何获取脚本文件夹的路径,而不是脚本?
你不是已经问过同样的? http://stackoverflow.com/questions/30789060/play-sound-with-applescript-using-afplay-and-relative-file-path –