Skip to main content
Participant
May 11, 2017
質問

Launch script with "Startup script" folder

  • May 11, 2017
  • 返信数 1.
  • 1041 ビュー

Hello,

I have a script that process, save and close some documents.

I'm having some problems when I launch it using the "startup script" folder: when the script tries to close documents using the standard function myDocument.close(SaveOptions.NO), the documents aren't closed.

But, if I launch the same script with ExtendScript Toolkit, documents are closed correctly.

Any thoughts?

Thank you

このトピックへの返信は締め切られました。

返信数 1

Jump_Over
Legend
May 11, 2017

Hi,

Paste a code pls.

How your code is calling/refering to myDocument?

Jarek

Danieled作成者
Participant
May 12, 2017

Hi Jarek,

it's difficult to paste the entire code because I'm including external libraries, but I'm using the app.open() function in this way:

var templateFullName = File("C:/template.indt");

var myDoc = app.open(templateFullName, false);

//Some stuff

//...

myDoc = myDoc.save(File("C:/output.indd"));

myDoc.close(SaveOptions.YES);