If I understand well the problem was to get the list of visible messages, not set it.
tell application "Mail"
set frontViewer to (some message viewer whose index is 1)
log frontViewer --> (*message viewer id 8*)
visible messages of frontViewer
end tell
—> error "Erreur dans Mail : Le gestionnaire AppleEvent a échoué." number -10000
How may we get the list of visible messages
I tried also :
tell application "Mail"
set frontViewer to (some message viewer whose index is 1)
log frontViewer --> (*message viewer id 8*)
properties of frontViewer
end tell
--> error "Erreur dans Mail : Le gestionnaire AppleEvent a échoué." number -10000
and got the same error message.
Yvan KOENIG (VALLAURIS, France) mercredi 8 juillet 2015 12:27:27