지난 주에이 스크립트의 일부에 대해 질문을하고 올바른 방향으로 나를 보내준 몇 가지 정말 유용한 답을 받았습니다. 나는 스크립트의 끝 부분에 조금 더 추가 할 수 있다는 것을 깨달았습니다. 여기에 제가 가지고있는 것이 있습니다. 이 스크립트는 80 %의 시간 동안 완벽하게 작동합니다. 오류가 발생했을 때 문서 1의 속성을 찾을 수 없다고 말하면서 문서 1에 mydoc 행 세트를 추가하여이 문제를 해결할 수 있다고 생각했습니다. 추가 된 곳은 아직 생각합니다. 때로는 정의되지 않은 변수로 간주됩니다. 이것을 설명하는 더 좋은 방법이 있습니까? 한 가지 다른 문제는 때때로 다운로드 폴더에 2 ~ 3 개의 파일이있을 수 있다는 것입니다. 각 문서마다 반복이 필요합니까? 목표는 일러스트 레이터 문서를 열 때 3 가지 별색을 추가하는 것입니다. 여기 내가 현재오류 : 문서 1의 속성을 찾을 수 없습니다.
tell application "Finder"
set JobName to text returned of (display dialog "Please enter Job Name:" default answer "Job_Name")
set loc to desktop
set newfoldername to JobName
set newfo to make new folder at loc with properties {name:newfoldername}
make new folder at newfo with properties {name:JobName & "_Seps"}
make new folder at newfo with properties {name:JobName & "_DTG"}
set the clipboard to JobName
end tell
tell application "Finder"
open folder JobName
move (files of alias "Macintosh HD:Users:username:Downloads") to newfo
end tell
tell application "Adobe Illustrator"
open files in newfo
end tell
tell application "Adobe Illustrator"
set mydoc to document 1
set docColorSpace to color space of document 1
if (docColorSpace is CMYK) then
set SpotColor to {cyan:21.0, magenta:0, yellow:100.0, black:0.0}
else
set SpotColor to {red:206.0, green:219.0, blue:41.0}
end if
make new spot in document 1 with properties {name:"Highlight White", color type:spot color, color:SpotColor}
end tell
tell application "Adobe Illustrator"
set docColorSpace to color space of document 1
if (docColorSpace is CMYK) then
set SpotColor to {cyan:11.0, magenta:100, yellow:30.0, black:0.0}
else
set SpotColor to {red:215.0, green:23.0, blue:111.0}
end if
make new spot in document 1 with properties {name:"Under Base", color type:spot color, color:SpotColor}
end tell
tell application "Adobe Illustrator"
set docColorSpace to color space of document 1
if (docColorSpace is CMYK) then
set SpotColor to {cyan:0.0, magenta:0, yellow:0.0, black:100.0}
else
set SpotColor to {red:35.0, green:34.0, blue:33.0}
end if
make new spot in document 1 with properties {name:"Spot Black", color type:spot color, color:SpotColor}
end tell
제목은 질문을 설명해야합니다. –
코드를 다시 포맷 해 주시겠습니까? 그것은 거의 읽을 수 없습니다. – Mark
절름발이의 제목과 형식에 대해 유감스럽게 생각합니다. 처음으로 형식을 올바르게 지정하지 않았지만 직장에서 나에게 전자 메일로 보내고 전화에서 게시했습니다. – jamthelows