Ehh -- would it be possible to add "total messages in database" to this
script...?

Max G

At Wed, 21 Apr 2004 07:23:53 -0700 (CET), Andy Fragen
<[EMAIL PROTECTED]> wrote:

>*This message was transferred with a trial version of CommuniGate(tm) Pro*
>This doesn't count subfolders on my install. Here's a fix for it.
>
><AppleScript>
>property preMsg : "You currently have: " & return
>property postcC : " Message folders"
>property postfC : " Message Filters"
>property postclC : " Text Clippings"
>property postsigC : " Signatures"
>property ret : return
>property bttnList : {"Thanks", "Put on Clipboard"}
>property defBttn : "Put on Clipboard"
>
>to concatenateData(cCnt, fCnt, clCnt, sigCnt)
>       return (preMsg & cCnt & postcC & ret & fCnt & postfC & ret & clCnt &
>postclC & ret & sigCnt & postsigC)
>end concatenateData
>
>to displayTotals(statsTxt)
>       set the dialogBttn to the button returned of (display dialog statsTxt
>buttons bttnList default button 2)
>       if the dialogBttn is the defBttn then
>               set the clipboard to the statsTxt
>               beep
>       end if
>end displayTotals
>
>tell application "PowerMail"
>       set the containerCnt to count message containers
>       repeat with i from 1 to containerCnt
>               set subContainerCnt to count message containers of message 
> container i
>               set containerCnt to containerCnt + subContainerCnt
>       end repeat
>       set the filterCnt to count filters
>       set the clipCnt to count text clippings
>       set the sigCnt to count text signatures
>       set the statsTxt to my concatenateData(containerCnt, filterCnt, clipCnt,
>sigCnt)
>       my displayTotals(the statsTxt)
>end tell
>-- The above will count your PowerMail; message folders, filters, text
>clippings
>-- and the text signatures and display the information in a dialog.
>-- The dialog will give you an option to put the entire results
>-- onto the clipboard.
></AppleScript>
>
>-- 
>Andy Fragen
>
>On Sat, Apr 10, 2004, cheshirekat said:
>
>>BTW, here's an AppleScript you can use so that you don't have to manually
>>count your folders and filters - just in case you don't already have such
>>an AppleScript:
>>
>><Begin AppleScript>
>>property preMsg : "You currently have: " & return
>>property postcC : " Message folders"
>>property postfC : " Message Filters"
>>property postclC : " Text Clippings"
>>property postsigC : " Signatures"
>>property ret : return
>>property bttnList : {"Thanks", "Put on Clipboard"}
>>property defBttn : "Put on Clipboard"
>>
>>to concatenateData(cCnt, fCnt, clCnt, sigCnt)
>>      return (preMsg & cCnt & postcC & ret & fCnt & postfC & ret & clCnt &
>>postclC & ret & sigCnt & postsigC)
>>end concatenateData
>>
>>to displayTotals(statsTxt)
>>      set the dialogBttn to the button returned of (display dialog statsTxt
>>buttons bttnList default button 2)
>>      if the dialogBttn is the defBttn then
>>              set the clipboard to the statsTxt
>>              beep
>>      end if
>>end displayTotals
>>
>>tell application "PowerMail"
>>      set the containerCnt to count message containers
>>      set the filterCnt to count filters
>>      set the clipCnt to count text clippings
>>      set the sigCnt to count text signatures
>>      set the statsTxt to my concatenateData(containerCnt, filterCnt, clipCnt,
>>sigCnt)
>>      my displayTotals(the statsTxt)
>>end tell
>>-- The above will count your PowerMail; message folders, filters, text
>>clippings
>>-- and the text signatures and display the information in a dialog.
>>-- The dialog will give you an option to put the entire results
>>-- onto the clipboard.
>><End AppleScript>
>
>
>
>


Reply via email to