Re: newbie ? re: Applescripting for MS Entourage
Re: newbie ? re: Applescripting for MS Entourage
- Subject: Re: newbie ? re: Applescripting for MS Entourage
- From: Paul Berkowitz <email@hidden>
- Date: Fri, 25 Jan 2002 13:25:36 -0800
On 1/25/02 12:56 PM, "Paul Berkowitz" <email@hidden> wrote:
>
On 1/25/02 11:29 AM, "email@hidden" <email@hidden> wrote:
>
>
>
> I need to write an Applescript for Microsoft Entourage (for Mac, if that
>
> makes
>
> any difference) that that can assess how many messages are in the Outbox.
>
> Then, I need it to select a subset of those, say 200 messages, connect, send,
>
> pause for a very brief period, then do the same thing again until there are
>
> no
>
> remaining messages in the Outbox.
>
>
>
>
Anyway, here's what you want, I think:
I omitted a line to re-evaluate n. Sorry. this will do it right:
property max : 200 -- change to what you want
tell application "Microsoft Entourage"
set n to count (every message in out box folder)
repeat while n > 0
if n > max then
set theMsgs to messages 1 thru max of out box folder
else
set theMsgs to (every message in out box folder)
end if
send theMsgs
repeat while connection in progress
delay 1 -- or just omit this line to keep working in Entourage
end repeat
delay 2 -- or whatever you want (seconds)
set n to count (every message in out box folder)
end repeat
end tell
--
Paul Berkowitz