Re: AS to emulate "next message" command in Mail
Re: AS to emulate "next message" command in Mail
- Subject: Re: AS to emulate "next message" command in Mail
- From: Michelle Steiner <email@hidden>
- Date: Wed, 28 Apr 2004 12:48:50 -0700
On Apr 28, 2004, at 11:49 AM, Jim Witte wrote:
except that tMsg1 isn't a string, and I can't coerce it to a string
either, even though it *displays* as a string in the result window. Is
there a "message number" property that I can pull out of tMsg1?
In the log window, it displays as a one-item list; I don't know why it
does that.
But with that information, I found that this eliminates the list:
set tMsg1 to (item 1 of item 1 of tMsg)
However, the result, which is
message 89 of mailbox "Applescript"
is not a string; it is a message identifier, so getting text items of
it won't work (but you should have been trying to get a word, not a
text item, but that doesn't work either). Here is how you can do it:
try
tMsg1 as string --just to throw the error
on error errMsg
set msgNum to word 5 of errMsg
end try
There are other problems with the script, though. "get part 2 of tMsg"
doesn't compile; I don't know what you were trying to do here.
Also, the Open commands do not work. I'm not sure what command works,
if any.
tell application "Mail"
set tMsgViewer to message viewer 1
set tMsg to selected messages of tMsgViewer
set tMsg1 to (item 1 of item 1 of tMsg)
try
tMsg1 as string
on error errMsg
set msgNum to word 5 of errMsg
end try
-- get part 2 of tMsg
open tMsg
open message (msgNum + 1) of mailbox "MacOSX-talk"
end tell
-- Michelle
--
I am Dyslexic of Borg. Fusistance is retile. Your ass will be laminated.
_______________________________________________
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.