Copy link to clipboard
Copied
Hi,
one of the scripts that we use have save and close commands for InDesign doc, and it usually works good, but for some big files the save command doesn't work for some reason. What I discovered that doc.saved returns as true when the doc is not saved, so it doesn't do the save command. What can I do.
Thank you for your help.
Yulia
Copy link to clipboard
Copied
Hey!
Saving bigger documents is slower, so maybe your document is saved but not immediately. Maybe you can check if document is saved like this:
if(app.activeWindow.name.indexOf('*') != -1)alert("Document is not saved");
--
tomaxxi
http://indisnip.wordpress.com/
Copy link to clipboard
Copied
Yes, this alert tells me that it's not saved, but save command still get stuck. What could I do?
Thank you.
Yulia
Copy link to clipboard
Copied
Try to add sleep command and see if document is saved.
Also, try increasing sleep time for test.
$.sleep(1000); //pauses for 1 second
--
tomaxxi
http://indisnip.wordpress.com/
Copy link to clipboard
Copied
You might want to look at the doc.modified property instead. It reports whether the document is dirty. The saved property reports whether the document has been saved (ever).
Find more inspiration, events, and resources on the new Adobe Community
Explore Now