• 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 scripting... try with a time limit
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mail scripting... try with a time limit


  • Subject: Re: Mail scripting... try with a time limit
  • From: Peter Baxter <email@hidden>
  • Date: Thu, 29 Nov 2007 05:33:54 +1100

Hi Bob,


I don't know that it will be possible to cut the process while you are waiting for mail to respond as this would probably cause Mail to crash.  This script will check for messages twenty times every 5 seconds after each iteration of the script, but it won't interrupt the attempt to get the content of the emails.

On 29/11/2007, at 3:51 AM, Bob Cuilla wrote:

tell application "Mail"
if not (exists some message viewer) then make new message viewer
repeat 20 times
try
set selected mailboxes of message viewer 1 to {mailbox "Valid By Subject" of account "TEC Requests"}


tell message viewer 1
set theMessages to the content of every message as string
end tell
on error
--do something else
end try
delay 5
end repeat
end tell

Applescript syntax is like English spelling:
Roughly, though not thoroughly, thought through.


Peter Baxter
email@hidden



 _______________________________________________
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/archives/applescript-users

This email sent to email@hidden

References: 
 >Mail scripting... try with a time limit (From: Bob Cuilla <email@hidden>)

  • Prev by Date: Mail scripting... try with a time limit
  • Next by Date: iTunes: Adding tracks with missing files to playlist seems impossible
  • Previous by thread: Mail scripting... try with a time limit
  • Next by thread: Re: Mail scripting... try with a time limit
  • Index(es):
    • Date
    • Thread