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 stringfileまたはaliasオブジェクトを想定していますが、thePathはなぜこのエラーですか?

FYI、localized string referenceは言う:

Syntax 
localized string text required 
from table text optional 
in bundle fileSpecifier optional 

答えて

0

フォルダアプリケーションのサポートがファイルではありません。 fileキーワードを削除します。

set thePath to path to application support from user domain -- as alias is redundant 
set mystr to localized string "Add people to this note" in bundle thePath 

しかし、アプリケーションサポートフォルダーもバンドルではないので、コードは意味がありません。

関連する問題