我試圖在已創建的TextEdit文件中編寫。 該文件處於rwxrwxrwx模式,因此沒有權限問題。AppleScript:試圖在TextEdit文件中編寫
但是,當我執行我的代碼,這裏是錯誤:
error "Network file permission error." number -5000 from file "/Users/me/Desktop/A directory/file.txt" to «class fsrf»
我的代碼在這裏:
-- Writing in the TextEdit file
set file_URLs_content to "HEEEELLOOOOOO"
tell application "TextEdit"
set theFile to "/Users/me/Desktop/A directory/file.txt"
set file_ref to (open for access file theFile with write permission)
set eof file_ref to 0
write file_URLs_content to file_ref
close access file_ref
end tell
我的file.txt的仍然是空的,我如何才能避免這個錯誤?