0
(이 경우, 그것은 적용된 스타일 빈 문서이다).
InDesign CS5 스크립트 : 문서 열기가 응답하지 않고 오류가 발생하지 않습니까? 내가 프로그래밍 방식으로 InDesign 문서를 열 방법 <code>myFile.execute()</code> 을 사용하고
문서 때로는 열리고 다른 시간에이 하지입니다 ... 그것은 스크립트가 완료되기 전에 파일을 열 수있는 충분한 시간이없는 것처럼 보인다.
이 그것을은 내가 찾고 파일 이름을 표시 않습니다 및
File(template).execute()
(변수를 적용 할 때 스크립트가 가는 오류가 발생하지 않습니다 alert(template.name)
으로 인해 시험에 나에게 발생 template
자체는 이미 File
개체이지만 단순히 template.execute()
도 작동하지 않습니다. 그래서 function openStylesTemplate()
{
var templateFolder = getScriptFolder(); // with the function below
var fileArray = templateFolder.getFiles("*.indd"); // an array of all InDesign documents in this script's same folder
try
{
var template = fileArray[0]; // the ONLY InDesign document in the folder
File(template).execute(); // open the InDesign template document
}
catch(e)
{
alert("Error: " + e.message + "\n\n" +
"Make sure the InDesign styles document is in the same folder as this script,\n" +
"and that it is the ONLY InDesign document in this folder, and try again.\n\n" +
"This script is in this folder: " + templateFolder + ".");
exit();
}
} // end of function openStylesTemplate
, 스크립트가 가능한 문서를로드 할 수있는 충분한 시간이 없습니다 : 여기
는 관련 코드? 그렇다면이 함수를 호출하기 전에 타이머를 만들어야합니까? 아니면 프로그래밍 방식으로 InDesign 문서를 여는 더 좋은 방법이 있습니까?
아, 오류가 없으므로 잘못된 방법을 사용하고 있습니다. 이러한 방법의 차이점을 명확히 해 주셔서 감사합니다. –