Re: Eudora AppleScript Question...
Re: Eudora AppleScript Question...
- Subject: Re: Eudora AppleScript Question...
- From: Christopher Stone <email@hidden>
- Date: Sun, 26 Oct 2003 15:02:37 -0600
At 11:26 -0700 10/26/03, Doug McNutt wrought:
With two consecutive messages selected:
tell application "Eudora"
set storbx to a reference to mailbox "Trash"
set thismsg to a reference to message 1
set thismsgID to the id of message 1
move thismsg to end of storbx -- Moves the top message to the trash
and deselects it
open message 1 -- Opens the second selected message in spite of the "1" !
What you're misunderstanding here is that "Front Message", "Message 0",
"Message 1", and 'Message ""' all refer to the Front (or first selected)
message.
So your last line is doing precisely what you've told Eudora to do; open
the front message. The message you moved to the trash is no longer the
front message.
open thismsg -- Does NOT open the original message but may be re
opening message 2.
"A reference to message 1" is simply a reference to the "front message"
object - it does not specify a *specific* message.
open message thismsgID -- Ignored. Does NOT open the original message 1
This is because you have not completed the the reference form; you must
include the mailbox. So if you really want to open "thismsg" again after
you've moved it to the trash you must do something like this:
set thismsg to move thismsg to mailbox "Trash"
open thismsg
When referencing by ID you need to do something like this:
tell application "Eudora"
if exists of message 0 then
tell message 0
set mRef to a reference to message id (get its id) of (get its mailbox)
end tell
end if
end tell
Remember that mRef will change when you move it to another mailbox. I
find this annoying and think each message should have a unique ID.
"message 1" really means the "next selected message".
Front (or first selected) message.
After one moves a message - anywhere - it is no longer in the selected list.
Of course; that is as it should be.
I doubt that Eudora actually moves anything on disk when move to the end
of current mailbox is specified.
You'd be mistaken about that. Try moving one message to the end of a
mailbox and then looking at the mailbox in a text editor.
Chris
_______________________________________________
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.