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이 오류 인 이유는 무엇입니까?

참고로, 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 

응용 프로그램 폴더가 번들이 아니기 때문에 코드는 의미가 없습니다.

관련 문제