Re: attempting to count messages in Mail
Re: attempting to count messages in Mail
- Subject: Re: attempting to count messages in Mail
- From: Allen Watson <email@hidden>
- Date: Wed, 07 Nov 2001 08:42:43 -0800
On Tue, 6 Nov 2001 15:18:34 -0600 David Rogers <email@hidden> wrote:
>
display dialog "you have more than 200 messages in your
>
inbox would you like to delete the excess?" buttons {"Cancel", "OK"}
>
default button 1
>
copy the result as list to {button_pressed}
>
if the button_pressed is "OK" then
>
I'm not sure about the mail count stuff because I don't use mail.app, but
you'll run into trouble here also with display dialog. It returns a record
that contains both "button returned" and "text returned" fields; you're
ignoring the text. The comparison on the final line will, I think, always
fail, since you are comparing a string with a list. What you need is:
display dialog "you have more than 200 messages in your
inbox would you like to delete the excess?" buttons {"Cancel", "OK"}
default button 1
set button_pressed to button returned of result
if the button_pressed is "OK" then