我有一个已编译的AppleScript应用程序,我已将其移至我的Windows服务器。我想,然后插入一个文本文件到应用程序(它看起来像Windows上的zip文件):从文件中读取的Applescript应用程序
myapplescript.app/Contents/Resources/MyNewDir/MyTxtFile.txt
所以,我的预编译的AppleScript来尝试从这个文本文件中读取并获得内容为一个字符串。这是我做的:
set theFolder to POSIX path of (the path to me)
set theFile to theFolder & "Contents/Resources/MyNewDir/MyTxtFile.txt"
open for access theFile
set fileContents to (read theFile)
close access theFile
但是这是我得到的错误:
不能使 “/Users/mike/Desktop/myapplescript.app/Contents/Resources/MyNewDir/ MyTxtFile.txt” 到类型的文件