On 6/7/04 9:10 pm, "Tom Chirpich" <[EMAIL PROTECTED]> wrote:
> If I use
>
> set theFolderList to every folder
>
> I get only the top level folders. Is there an easy way to get subfolders
> also? (In Emailer, there was something called "folder hierarchy.")
>
> I can use
>
> set theSubFolderList to every folder of folder thefolderName
>
> within a repeat loop, but is there a more direct way to get all folders?
> ("every folder whose ID > 0" also seems to get the top level folders only.)
>
> Is there an Applescript command/option that is equivalent to "satisfying a
> test" listed for "folder" in the Entourage dictionary?
>
You need a recursive handler, something like:
Repeat with aFolder in every folder
Set theResult to My recursiveRoutine(afolder)
End repeat
Repeat with aFolder in every folder of IMAP account "xyz"
Set theResult to My recursiveRoutine(afolder)
End repeat
On recursiveRoutine(thisFolder)
Repeat with nextFolder in (every folder of thisfolder)
Set theResult to My recursiveroutine(nextfolder)
End repeat
-- do whatever you want to the messages of thisFolder
Return someResult
End recursiveroutine
--
Barry Wainwright
Microsoft MVP (see http://mvp.support.microsoft.com for details)
Seen the All-New Entourage Help Pages? - Check them out:
<http://www.entourage.mvps.org/>
--
To unsubscribe:
<mailto:[EMAIL PROTECTED]>
archives:
<http://www.mail-archive.com/entourage-talk%40lists.letterrip.com/>
old-archive:
<http://www.mail-archive.com/entourage-talk%40lists.boingo.com/>