Re: Application Bundle won't quit at Shutdown
Re: Application Bundle won't quit at Shutdown
- Subject: Re: Application Bundle won't quit at Shutdown
- From: Paul Scott <email@hidden>
- Date: Mon, 14 Dec 2009 20:19:55 -0800
In your code, theMinuteCount is always set to 1 initially on each idle pass (computed using your tabled values).
Later, you then compute 1 mod 1 (result 0 -- first account okay), or 1 mod 2 (result 1 -- second account failure).
You need to think through your logic more carefully.
Paul
On Dec 14, 2009, at 6:38 PM, email@hidden wrote:
> On Dec 14, 2009, at 3:00 PM, Stockly, Ed wrote:
>
>> Has is right, this belongs in an idle handler, something like this...
>
> O.K. I made the changes and now it will quit on Shutdown. However, the script only works if I enter a value of 1 for the Mail accounts. If I have any other value, that account doesn't get checked (see comments in code). Can someone see what I'm doing wrong? I apologize if it's something obvious.
>
> Thanks again,
> Ted
> <snip>
>
> set theMinuteCount to 0
> set theMinuteCount to theMinuteCount + theMinimumInterval
> repeat with eachAccount in theAccountList
> set theAccount to item 1 of eachAccount
> set theInterval to item 2 of eachAccount
> if theInterval ≠ 0 then
> set theMod to theMinuteCount mod theInterval
> if (theMod = 0) then
> check for new mail for theAccount
> end if
> end if
> end repeat
> return (theMinimumInterval * 60)
_______________________________________________
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