You should ask this sort of question in the Scripting forum.
You're looking for this, I think:
Just make sure that at the end of your script, you set it back:
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.
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?
1 person found this helpful
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.
Thanks to All for reply
Hi Ariel I try as You told me
But it also prompt message.
How stop these prompted message ?
Or how I can give 'No' responce to these meassge using script ?
I do not want to recver any previous file.
I want to create a new file without prompt these type of message.
How solve this problem ?
Hi Peter thanks for reply
Is there is no any scripting method to stop these message ?
I do not want to recover any previous file.
I only want to start InDesign and create new file without prompt these message.
I do not find any Application property or method in Object Model to stop these message or give answer of these message using script.
I try using Apple script also
tell application "Adobe InDesign CS5.5"
set user interaction level of script preferences to never interact
Adobe InDesign CS5.5 got an error : Cannot handel the request because a model dialog or alert is active.
How stop these allert message ?
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.
Thanks Peter for reply
I know that best way to stop these message is all files are closed correctly.
My problem is that In my application (on MAC OS) when InDesign run and anyone close InDesign with (Force Quit) from Dock Then after this if I want to create InDesign using script :
then document is not create because a model dialog or alert is active.
I want that this model dialog or alert is not popup.
If there is no way to stop this message then how give answer of this message using script.
alert("Model or Alert dialog is open");
But second line is not run untill dialog is not closed.
Is there is any property which is use with #target indesign like :
Seems foolish to quit applications without properly exiting it, but different strokes for different folks...
How about in your script:
- Set it to delete anything in the recovery folder if found.
- Exit ID and answer no to saving a file
- 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.
Thanks MikeWenzloff for quick reply
Can you give me example
to add a function key or a key combination to shut down Id.
Sorry, but no.
Have you asked this in the scripting forum? Or try searching in the scripting forum?
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.
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.
...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.
Thanks to All for reply.
I try this
After emptying the InDesign Recovery folder I start InDesign but it also prompt message
If i press Yes then it say that this file does not exit.
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?