0
繼AppleScript的拋出錯誤:爲什麼applescript不接受本地化字符串命令中的文件對象?
set thePath to path to application support from user domain as alias
set mystr to localized string "Add people to this note" in bundle file thePath
和錯誤是
error "Can’t make file (alias \"Macintosh HD:Users:shakes:Library:Application Support:\") into type file." number -1700 from file (alias "Macintosh HD:Users:shakes:Library:Application Support:") to file
這個錯誤是什麼意思嗎? localized string
預計會出現一個file
或alias
對象,其中thePath
爲何會出現此錯誤?
僅供參考,localized string
reference說:
Syntax
localized string text required
from table text optional
in bundle fileSpecifier optional