Title: Re: Number of messages

From: George <[EMAIL PROTECTED]>

Emailer indicates the total number of messages in a folder. Is there an option to do this in Entourage?
-------
George

Make sure you don’t have any views selected (i.e. Unread only or Flagged only etc.), then just select the folder and look at the number of items displayed on the lower right hand portion of the main window. Or....
I forget who did this script, kudos to them, but it’s worked for me for some time.

tell application "Microsoft Entourage" --
    set windowClass to the class of the front window --
    -- see if a message window is front most --
   if windowClass is message window then --
        set theMsg to displayed message of the front window --
        set theFolder to storage of theMsg --
    else --
        -- act on selection --
       set theFolder to the displayed feature of the front window --
    end if --
    set {msgCount, folderCount, unRead} to my countEm(theFolder) --
    set inTopLevel to (count messages of theFolder) --
    set theName to (name of theFolder) as text --
    set theScoop to "There are " & msgCount & " messages in all (" & ¬
        unRead & " unread) within \"" & theName ¬
        & "\" including those in " & folderCount ¬
        & " subfolders." --
    set theScoop to theScoop & return & "\"" & theName & "\" contains " & inTopLevel & ¬
        " messages at the top level." & return & (msgCount - inTopLevel) & " are in subfolders." --
    display dialog theScoop buttons {"Ok"} --
end tell --

on countEm(theFolder) --
    tell application "Microsoft Entourage" --
        set folderCount to count folders of theFolder --
        set folderList to the folders of theFolder --
        if (count of folders of theFolder) > 0 then --
            set messageCount to 0 --
            set unRead to 0 --
            repeat with f in folderList --
                set {mc, fc, ur} to my countEm(f) --
                set folderCount to folderCount + fc --
                set messageCount to messageCount + (count messages of f) --
                set unRead to unRead + (count (messages of f whose read status is untouched)) --
            end repeat --
        else --
            set messageList to messages of theFolder --
            set messageCount to (count messageList) --
            set unreadList to messages of theFolder whose read status is untouched --
            set unRead to count unreadList --
        end if --
        
        return {messageCount, folderCount, unRead} --
    end tell --
end countEm --


Jim Baskins


Reply via email to