Skip navigation
Currently Being Moderated

How Stop Indesign message using script ?

Apr 12, 2013 3:53 AM

Hi Experts,

I want to stop to prompt indesign message.

For example

I close Indesign application without saving the document using Quit on MAC OS.

When next time I start indesign application It prompt a message dialog.

Do you want to start automatic recovery?

Click Yes to begin recovery.

Click No to delete recovery data for all documents.

Click Cancel to postpone all document recovery until later.

 

Another message dialog message is:

NewFile.indd could not be found. Do you want to postpone its recovery?

Click Yes...............................

Click No.....................

Click Cancel.....................

 

I want to stop to prompt this type of message.

 

Is it possible using script ?

 

My problem is I start Indesign Application using #target indesign and want to create a document.

But document is not created untill this type of message is available.

 

How give responce this type of messge using script automatically Yes,No or Cancel ?

 

I want, when i create a document using script and this type of message is prompt then automatically ( using script) kill this dialog or give Yes, No or Cancel and then create document file.

 

 

Thanks.

 
Replies
  • Currently Being Moderated
    Apr 12, 2013 3:58 AM   in reply to Bill joy

    You should ask this sort of question in the Scripting forum.

     

    You're looking for this, I think:

     

         app.scriptPreferences.userInteractionLevel =

    UserInteractionLevels.NEVER_INTERACT;

     

    Just make sure that at the end of your script, you set it back:

     

         app.scriptPreferences.userInteractionLevel =

    UserInteractionLevels.INTERACT_WITH_ALL;

     

     

    Ariel

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 12, 2013 5:29 AM   in reply to Bill joy

    Bill joy wrote:

    I close Indesign application without saving the document using Quit on MAC OS.

    Well, I think you really mean you use force quit, or don't close your open files first, because the messages you are talking about only come up if you don't close ID properly. The best way to not see those messages is to be sure files and the application close as they are meant to do.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 12, 2013 8:29 AM   in reply to Bill joy

    Ditto what Ariel said, you'll find the right audience for this question in the scripting forum.

     

    I wouldn't recommend starting InDesign via script, for exactly the kind of issue you're having. You can't turn off interaction until after the application is running, and by then it's already thrown the messages you mention above. Is there some reason you can't run your script *after* you've launched InDesign?

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 12, 2013 8:35 AM   in reply to Bill joy

    Maybe I'm misunderstanding something, but I don't see why starting ID from a script would automatically bring up messages about recovery unless there was recovery data, and there shold not be any recovery data unless ID was shut down improperly.

     

    Perhaps this is really old recovery data that is no longer relevant, in which case emptying the InDesign Recovery folder should solve the problem.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 15, 2013 5:24 AM   in reply to Bill joy

    The way to sptop the message, as far as I know, is to have nothing to recover, but I'm not a scripter. As I said initially, these messages should only pop up when ID is shut down imporoperely, leaving recovery data behind, and the best way to stop that is to be sure all files are closed correctly.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 15, 2013 8:42 PM   in reply to Bill joy

    Seems foolish to quit applications without properly exiting it, but different strokes for different folks...

     

    How about in your script:

     

    1. Set it to delete anything in the recovery folder if found.
    2. Exit ID and answer no to saving a file
    3. Add a function key to run the script

     

    You would need to use a key combination to shut down ID in this manner, but ID would at least be shutting down properly.

     

    Good luck.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 15, 2013 10:10 PM   in reply to Bill joy

    Sorry, but no.

     

    Have you asked this in the scripting forum? Or try searching in the scripting forum?

     

    First you need to write the javascript to listen for the app closing. Then you need to add code to tell ID not to save anything. Then perhaps to clean the recovery folder, and finally exit. Once that is working, can you not assign a hot key combination to fire off the script?

     

    Mike

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 16, 2013 4:18 AM   in reply to MW Design

    I definitely think you should be asking these questions in the Scripting forum: InDesign Scripting

     

    I suspect you could create a startup script that would run in the background to watch for close events, but If ID is force quit, I don't know that it would be able to finish running and clear the recovery folder. I'm not at all convinced this would be a good idea anyway. Auto recovery is, to me at least, one of the most powerful and important features in ID, and one I need from time to time -- some files do occasionally crash, after all, and you don't want to automatically throw away something valuable that could be recovered. We even rely on it here on the forum when solving problems for users who find themselves unable to save a file for unknown reasons.

     

    If you have users who routinely force quit, they need to be retrained. This is a USER problem, not a scripting problem.

     
    |
    Mark as:
  • Rob Day
    3,118 posts
    Oct 16, 2007
    Currently Being Moderated
    Apr 16, 2013 6:06 AM   in reply to Bill joy

    The recover dialog you are showing appears during the launch of InDesign when any document(s) hasn't been properly saved—maybe you've lost a connection to the file's server and had to force quit in order to get ID working?

     

    Setting the user interaction to never won't work because ID has to be launched before you can set the interaction via scripting.

     

    If you were able to find a way to disable the dialog you would then no longer be able to recover  work lost during a crash—so you better not forget to save.

     

    If you simple click Cancel the dialog won't appear on the next launch.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 16, 2013 6:48 AM   in reply to Bill joy

    ...and anyone close InDesign with (Force Quit) from Dock Then after this if I want to create InDesign using script :

    This is like saying: "Every time my wife puts the car in the garage, she hits the wall. So how can I install a fully-equipped, automated repair service in the garage to fix the car every night so I can drive it undamaged in the morning?"

     

    Clearly, the solution to the problem is to prevent the damage.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 29, 2013 4:17 AM   in reply to Bill joy

    I suspect that means there's a flaw in your script someplace. If the recovery folder for the current user is empty ID would have no reason to initiate the recovery process on startup. Does it happen if you DON'T use the script to start ID?

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points