这是我现在的代码:
tell application "Finder"
get some file of (folder (POSIX file "Desktop/musics"))
end tell
答案1
tell application "Finder" to open some file in the folder ¬
(POSIX file "/Users/%you%/Desktop/musics")
需要%you%
用用户主目录的名称替换(它看起来像发现者)。
答案2
这是另一种选择。
tell application "Finder"
set someFile to some file of folder ((path to desktop as text) & "musics")
open someFile
end tell