Skip to main content
Participant
May 11, 2017
Question

Launch script with "Startup script" folder

  • May 11, 2017
  • 1 reply
  • 1041 views

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

This topic has been closed for replies.

1 reply

Jump_Over
Legend
May 11, 2017

Hi,

Paste a code pls.

How your code is calling/refering to myDocument?

Jarek

DanieledAuthor
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);