Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

After you have closed the file, as you know LO will continue to run in the background unless you tell it to terminate, the command for which is starDesktop.terminate. To create a clean shutdown, that does not later prompt for file recovery, a substantial Wait appears necessary prior to the terminate command because of an apparent race condition in LibreOffice. Your Wait may need to be longer, or it might be shorter. Thus the sequence ending with the clean terminate command would be:

Wait 400

Called by itself, the terminate command does generate a save prompt if the current document is modified, but the shutdown typically will be unclean due to the noted race condition.

(if this answers your question, please accept the answer by clicking the check (image description) to the left)