AS to emulate "next message" command in Mail
AS to emulate "next message" command in Mail
- Subject: AS to emulate "next message" command in Mail
- From: Jim Witte <email@hidden>
- Date: Wed, 28 Apr 2004 13:49:48 -0500
I'm trying to write a script for use in Mail to do a "Next Message"
command when a message window is open, by closing the current top
window and opening a new one (being able to set the target of a window,
like you can in the Finder, would be nice..)
I'm starting with (to get the current message number):
tell application "Mail"
set tMsgViewer to message viewer 1
set tMsg to selected messages of tMsgViewer
set AppleScript's text item delimiters to " "
set tMsg1 to (item 1 of tMsg)
-- result is ->
-- message 281 of mailbox "MacOSX-talk" of
-- application "Mail"
--set msgNum to text item 2 of tMsg1
--get part 2 of tMsg
--open tMsg
--open message (msgNum+1) of mailbox "MacOSX-talk"
end tell
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?
Jim Witte
email@hidden
Indiana University CS
---
A vote for Nader is a vote for Geroge Bush.
_______________________________________________
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.