첫째, 정말 애플 스크립트 그래서 이것이 내가 포토샵으로 지정된 폴더의 모든 파일에 대한 행동하려고하고 바보 같은 질문이지만 ...법
수 있습니다 모른다 (그러나 스크립트는 그 부분에 도달하지 않기 때문에 관련성이 있다고 생각하지는 않습니다). 이렇게하려면 방금 Adobe's PS AppleScript Reference (pp. 242-243)에서 내가 원하는 것보다 더 많거나 적은 스크립트를 복사했습니다. (몇 가지 변경을해야하지만 개념적으로 이것은 내가 원하는 것입니다.)하지만 스크립트 (Adobe에서 수정되지 않은 잘라내어 붙여 넣기)는 작동하지 않습니다. 문제는이 라인으로 나타납니다
"폴더를 선택"에 의해 반환 "anItem는"폴더와 "작성자 유형"8BIM "입니다set fileList to (every file of anItem whose creator type is "8BIM") as alias list
을 실행하면 포토샵
입니다 스크립트는 죽는다 이 오류와 라인 :
error "Can’t make every file of item 1 of
{alias \"Macintosh HD:Users:me:Desktop:PS Resave Test In:\"}
whose «class fcrt» = \"8BIM\" into type alias list." number -1700
from every file of item 1 of {alias "Macintosh HD:Users:me:Desktop:
PS Resave Test In:"} whose «class fcrt» = "8BIM" to «class alst»
나는 애플 스크립트 오류 번호 -1700 검색 무엇을 켤 수 없었다
사람이 어쩌면 그래서 c는 무슨 일이 일어나고 있는지 말해 줄 수. 고쳐? 도움이된다면 스크립트의 나머지 부분을 게시하거나 Adobe 참조에 대한 이전 링크를 볼 수 있습니다.
감사합니다. 아래
는----------------- 부록 1 --------------------
adayzdone의 대답 이 문제 (! 감사합니다) 고정하지만, 스크립트는 지금이 줄에서 실패 :
repeat with aFile in fileList
tell application "Finder" to set fileName to name of aFile
을이 오류와 함께 :
error "Finder got an error: Can’t get alias
\"Macintosh HD:Users:me:Desktop:PS Resave Test In:Image 1.tif\"."
number -1728 from alias
"Macintosh HD:Users:me:Desktop:PS Resave Test In:Image 1.tif"
다시 말하지만, 어떤 도움을 크게 감상 할 수있다.
----------------- 부록 2 --------------------
요청에 따라, 여기에 전체 스크립트는 다음과 같습니다
-- Process all files in folders dropped on this script
-- (when saved as an applet)
-- Save each Adobe Photoshop CC file as a PDF file.
on run
tell me to open {choose folder}
end run
on open droppedItems
set destFolder to choose folder with prompt "Destination folder?"
repeat with anItem in droppedItems
tell application "Finder"
-- Make sure each item processed by this script is a folder
if class of item anItem is not folder then
-- Not a folder, notify the user of the error
display dialog "Please drop only folders on this script"
else
-- A folder, get the Adobe Photoshop CC files and process them
set fileList to (every file of folder anItem whose creator type is "8BIM") as alias list
end if
end tell
SaveFilesAsPDF(fileList, destFolder)
end repeat
end open
-- fileList is a list of aliases to Photoshop files
-- destFolder is an alias to a folder where the PDF files are to be saved
on SaveFilesAsPDF(fileList, destFolder)
set destPath to destFolder as string
repeat with aFile in fileList
tell application "Finder" to set fileName to name of aFile
set newFilePath to destPath & fileName & ".pdf"
tell application "Adobe Photoshop CC"
open aFile
save current document in file newFilePath as Photoshop PDF ¬
with options {class:PDF save options, PDF compatibility:PDF 15, preserve editing:true} ¬
close current document saving no
end tell
end repeat
end SaveFilesAsPDF
고마워요, 그 문제가 해결되었지만 지금은 스크립트가 약간 실패한 것입니다. 코드 및 오류 메시지에 대한 위의 원래 질문을 참조하십시오. (코드 및 오류를 주석에 넣을 방법을 찾을 수 없으므로이 질문을 편집하여 잘못했을 경우 미안하지만 수정하십시오.) – notMyScreenName
코드를 전체적으로 게시하십시오. – adayzdone
전체 코드가 원래 질문에 게시되었습니다. 이 변경 사항은 귀하가 권고하지만 그렇지 않으면 Adobe에서 잘라 붙여 넣습니다. – notMyScreenName