Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Doc.Save on Snow Leopard InDesign CS4 js

Participant ,
Aug 18, 2010 Aug 18, 2010

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

TOPICS
Scripting
523
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Aug 19, 2010 Aug 19, 2010

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/

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Aug 19, 2010 Aug 19, 2010

Yes, this alert tells me that it's not saved, but save command still get stuck. What could I do?

Thank you.

Yulia

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Aug 19, 2010 Aug 19, 2010

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/

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Sep 01, 2010 Sep 01, 2010
LATEST

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).

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines