Re: Deleting Mail message in different languages
Re: Deleting Mail message in different languages
- Subject: Re: Deleting Mail message in different languages
- From: John Carlsen <email@hidden>
- Date: Tue, 13 May 2003 14:23:51 -0400
I wrote, on 5/10/03 0:45 pm EDT (-4 hr):
>
Rob Jorgensen wrote, on 5/10/03 11:56 am EDT (-4 hr):
>
>
>> In other email applications I either use the delete command or refer to the
>
>> trash by the generic property of the Application object. In Mail, this
>
>> appears to be the "trash mailbox", so I thought I would just use
>
>>
>
>> set theMessage's mailbox to the trash mailbox
>
>>
>
>> But this does not work either. Neither do the Application properties "in
>
>> mailbox", "out mailbox", etc. They compile OK, but do nothing at all.
>
>
>
> What happens if you try this?
>
>
>
> tell application "Mail"
>
> set trashName to name of trash mailbox
>
> set theMessage's mailbox to mailbox trashName
>
> end tell
>
>
Thanks. That seems to work, at least on my US system. I will get one of the
>
foreign users to try this for their systems.
Well, I got a French-Canadian user to test that (his trash is called "") and
he says that it did not work for him.
Also, John Delacour wrote, on 5/10/03:
>
tell app "Mail"
>
repeat with msg in (get selection)
>
set mailbox of msg to mailbox 4
>
end repeat
>
end tell
I guess I will have to use this (I assume this is independent of language?).
In my case, I need to use it an a message's "mailbox" field:
set theMessage's mailbox to mailbox 4
My current test script is (a selection must exist in a Mail message list):
tell application "Mail"
set selList to the selection
set m to item 1 of selList
set m's mailbox to mailbox 4
set x to m's mailbox
set y to x's name
display dialog y as text
end tell
Any international users care to try this?
In my US system I selected a message in the "In" mailbox and ran the script.
The message is deleted, which is all I care about, but strangely the dialog
says "INBOX", not "Trash".
--
Cheers,
John
http://homepage.mac.com/ThinkAgain
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.