AppleScript를 통해 iPhoto와 통신하는 내 스크립트 사용자가이 오류를 받고 있는데,이 오류는 재현 할 수 없습니다. 918:955: execution error: iPhoto got an error: "4.294967323E+9Mahabalipuram" doesn’t understand the “write” message. (-1708)
오류를 생성하는 AppleScript는 다음과 같습니다.
set nul to character id 0
set text item delimiters to nul
set albumsFile to "/Users/[user]/Downloads/blah.blah"
set fp to open for access (POSIX file albumsFile) with write permission
tell application "iPhoto"
repeat with anAlbum in albums
if anAlbum's type is regular album then
set albumName to anAlbum's name
if albumName is not "Last Import" then
set albumPhotoIds to (id of every photo of anAlbum) as Unicode text
if length of albumPhotoIds is greater than 0 then
set currentAlbum to anAlbum
repeat while currentAlbum's parent exists
set currentAlbum to currentAlbum's parent
set albumName to currentAlbum's name & " > " & albumName
end repeat
set albumId to anAlbum's id
set albumData to {"", albumId, albumName, ""} as Unicode text
write albumData to fp as Unicode text
write albumPhotoIds to fp as Unicode text
write nul to fp as Unicode text
end if
end if
end if
end repeat
end tell
close access fp
누구든지 여기서 무엇이 잘못되고 있는지에 대한 아이디어가 있습니까? 이 Github 문제에 대한 배경 지식이 조금 더 있습니다 : https://github.com/jawj/iphoto-flickr/issues/7
이것은 작동 할 수 있습니다 (예상되지 않음). 일반적으로 이런 종류의 오류가 발생합니다. 그러나 adayzone이 지적했듯이 스크립트를 재구성하는 것이 가장 좋습니다.
tell me to write albumData to fp as Unicode text
tell me to write albumPhotoIds to fp as Unicode text
tell me to write nul to fp as Unicode text
tell 작동 방식을 설명하는 것도 좋습니다 (때로는 "방해가되는"경우도 있음).
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다