我已经搜索了几个小时,每次我尝试推荐的修复。我仍然无法到达任何地方。我觉得我错过了一些如此明显的东西,我的 Mac 正在嘲笑我糟糕的尝试。
这是脚本:
tell application "System Events"
set the_folder to path to folder "dropbox" from user domain as string
set the_file to "ToDo.txt" of (POSIX path of the_folder)
set the_text to (do shell script "cat " & quoted form of (POSIX path of the_file))
return the_text
end tell
结果:
无法获取(the_folder 的 POSIX 路径)的“ToDo.txt”。不允许访问。
文件夹是什么也没关系。我已经尝试过使用 Documents/Library,但仍然总是遇到访问问题。