Re: Mail scripting... try with a time limit
Re: Mail scripting... try with a time limit
- Subject: Re: Mail scripting... try with a time limit
- From: Christopher Nebel <email@hidden>
- Date: Wed, 28 Nov 2007 19:05:18 -0800
On Nov 28, 2007, at 8:51 AM, Bob Cuilla wrote:
I am scripting mail and would like to specify a try block but need a
time limit.
...
This all works OK as long as there is some content in that specified
mailbox, or as long as the servers arent slow or down.
Can I surround any or all of these statements with try--end trys and
a timer? My issues occurs when statements 4 thru 6 are waiting for
mail to respond. I would like to put a time limit on that area and
exit with a different path if there is a time out. Hope this all
makes sense to someone who is a lot smarter than me.
Sounds like you want a "with timeout" block.
with timeout of 100 seconds -- it's always seconds; do math if you
need a number of minutes.
-- do stuff here
end
Bear in mind that the timeout time applies to each individual
application command in the block, not to the block as a whole. That
is, statement one has up to 100 seconds to finish, then statement two
has up to 100 seconds to finish, and so on.
--Chris Nebel
AppleScript Engineering
_______________________________________________
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