Hi,
I’m a newbie who really want to understand Applescript. I really have difficulties to understand how to adapt a script to suit my needs.
What I want to do is to select 3 mailboxes and this is what I have written
tell application "Mail"
tell message viewer 1
set the selected mailboxes to {"A TRAITER", "Outbox", "InBox"}
end tell
end tell
But I get an error : NSUnknownKeyScriptError… Could you please correct my script ?
Thanks a lot !!!
OK,
this code works fine :
tell application "Mail"
tell message viewer 1
set selected mailboxes to {inbox, outbox}
end tell
end tell
and select my InBox ans my OutBox. But how can I also select my mailbox nammed “A TRAITER” ? Or the mailbox of the messages sent ???
Thanks…
jonn8
May 28, 2004, 1:48pm
#3
I had problems when putting it inside a tell block for the message viewer and you meed to tell it that “A Traitor” is a mailbox (inbox and outbox are already mailbox constants so it knows about them):
–Open this script in a new Script Editor window.
tell application “Mail”
set selected mailboxes of message viewer 1 to {inbox , outbox , mailbox “A TRAITER”}
end tell
Jon
[This script was automatically tagged for color coded syntax by Convert Script to Markup Code ]
OK,
thanks a lot, it works fine.
But I still have problems to include the mailbox of sent messages. I tried with its name in french like “A TRAITER” but it doesn’t works. Do you know which name is given to this special mailbox ?
Thanks
jonn8
May 28, 2004, 7:02pm
#5
Ah, I didn’t recognize the French. Sorry. I thought you were talking about a custom mailbox you had defined. Is this what you mean?
–Open this script in a new Script Editor window.
tell application “Mail”
set selected mailboxes of message viewer 1 to {inbox , outbox , sent mailbox }
end tell
Jon
[This script was automatically tagged for color coded syntax by Convert Script to Markup Code ]
Thanks. It’s exaclty what I need