Hello
In a script supposed to treat thousands of documents with Pages and LibreOffice, every 20 messages, I decided to clear the list of recent items in LibreOffice, quit Pages and LibreOffice then restart them to reduce memory use.
It works well but when I looked at the Events log I saw some surprising lines.
The code is :
# Quitte les deux applications pour leur faire libérer la mémoire occupée
tell application id "com.apple.iWork.Pages" to quit
tell application "LibreOffice" to quit
# Relance les applications pour qu'elles soient disponibles pour lr document suivant.
tell application id "com.apple.iWork.Pages" to activate
tell application "LibreOffice" to activate
I trigger Pages via its application id so that the script doesn’t change according to the version in use which may be Pages v.4.x or v.5.x
In the log the tasks are reported as :
[format]tell application “Script Editor” # was supposed to be “Pages”
quit
end tell
tell application “LibreOffice”
quit
→ error number 0 # non fatal error
end tell
tell application “Script Editor” # What is it doing here ?
activate
end tell
tell application “Pages”
activate
end tell
tell application “Script Editor” # What is it doing here ?
activate
end tell
tell application “LibreOffice”
activate
end tell
[/format]
I would be interested if somebody may give an explanation to this behavior.
Yvan KOENIG running El Capitan 10.11.6 in French (VALLAURIS, France) dimanche 18 septembre 2016 16:35:09