• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: mail issue
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mail issue


  • Subject: Re: mail issue
  • From: dev_sleidy <email@hidden>
  • Date: Thu, 16 Nov 2006 22:08:25 -0500

Is there a way to check unread mails only? (instead of selecting them)

set unread_Messages to messages of mailbox "Online File Transfers" whose read status is false -- Obtain a list of 'unread' messages, in mailbox 'Online File Transfers'.


Is there a way of putting the retrieved file in a specific location?

move i to mailbox "Read"

Can this be simplified?

<script>
global myMessages
...
end tell
</script>
--

tell application "Mail" launch -- or 'activate'.

set unread_Messages to messages of mailbox "Online File Transfers" whose read status is false -- Obtain a list of 'unread' messages.

repeat with i in unread_Messages -- Cycle through the 'unread' messages.
set tParagraphs to paragraphs of (content of i) -- Obtain paragraphs of 'unread' message.


repeat with j from 1 to ((count tParagraphs) - 1) -- Cycle through the paragraphs of the 'unread' message.
-- Determine if current and next paragrah meet certain criteria.
if (((((item j of tParagraphs) as string) contains "Download the file using the link below:") and (((item (j + 1) of tParagraphs) as string) begins with "http://";))) then tell application "Safari" to make new document with properties {URL:(item (j + 1) of tParagraphs)} -- Open respective web page.
end repeat


move i to mailbox "Read" -- Move the 'unread' message to another folder. 'Read' in this example.
end repeat
end tell
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/mailman//archives/applescript-users


This email sent to email@hidden
References: 
 >mail issue (From: dstevens <email@hidden>)

  • Prev by Date: RE: Odd Finder Behavior
  • Next by Date: Rename images (optional add comments)
  • Previous by thread: mail issue
  • Next by thread: Transparent windows
  • Index(es):
    • Date
    • Thread