myLoop: getting subject of messages in Mail.app
myLoop: getting subject of messages in Mail.app
- Subject: myLoop: getting subject of messages in Mail.app
- From: Phebe Anggreani <email@hidden>
- Date: Fri, 28 Feb 2003 19:01:05 -0600
I'm trying to set focused on thread of selected message. But somehow it
always returned an error when repeating to get the subject of message
x. I have no idea why. I've tried to set them as string and/or create
another value before comparing subjects, but it always stopped at
getting the subject of first message while looping. Can someone please
shed a light? Here's the script:
set deLim to AppleScript's text item delimiters
set AppleScript's text item delimiters to "Re: "
tell application "Mail"
set theSbj to subject of item 1 of (get selection)
set mainSbj to the last text item of theSbj
set selectedMsg to {}
repeat with thisMsg in all messages of front message viewer
(*here's where the problem begins, I can't get the subject of the
message*)
if subject of thisMsg contains (mainSbj as string) is true then
set the end of selectedMsg to thisMsg
end if
end repeat
tell application "Mail" to set properties of front message viewer to
{focused messages:selectedMsg}
end tell
Thanks in advance,
Phebe
_______________________________________________
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.