Re: Mail, count of visible messages
Re: Mail, count of visible messages
- Subject: Re: Mail, count of visible messages
- From: Robert Poland <email@hidden>
- Date: Tue, 07 Jul 2015 15:19:00 -0600
- Z-usanet-msgid: XID089TggVTB0864X34
> On Jul 7, 2015, at 10:56:AM, Yvan KOENIG <email@hidden> wrote:
>
>
>> Le 07/07/2015 à 18:24, Robert Poland <email@hidden> a écrit :
>>
>> Hi,
>>
>> I’ve been ignoring all the scripts about mail, now I need one.
>>
>> Here is my attempt which errors, "access not allowed”;
>>
>> tell application "Mail"
>> delay 0.2
>> set x to (count of visible messages in “Inbox" of account 1)
>> say x
>> delay 0.2
>> set y to x is less than 18
>> delay 0.2
>> end tell
>> return y
>>
>> Robert Poland
>> Fort Collins, CO
>
> Hello Robert
>
> (1) Here your code refused to compile. I'm not writing about the curly quote but about the word mailbox missing before "Inbox" (which as far as I know is spelled "INBOX")
>
> (2) As far as I know, visible messages aren't belonging to a mailbox but to a message viewer.
>
> I tried :
>
> tell application "Mail"
> set currentViewer to item 1 of message viewers
> log result --> (*message viewer id 24*)
> count visible messages of currentViewer
> end tell
>
> and got error "Erreur dans Mail : Le gestionnaire AppleEvent a échoué." number -10000
>
>
> Yvan KOENIG (VALLAURIS, France) mardi 7 juillet 2015 18:56:06
Guess no one else has any ideas either…
Robert Poland
Fort Collins, CO
_______________________________________________
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