在applescript中设置文件夹和子文件夹



all folder &outlook的子文件夹(下面的列表)传入applescript变量(selectedMessages)。

任何在applescript中逐个或全部传递文件夹的方法(使用applescript)。

outlook邮件文件夹结构:

SIGMACO 
   Inbox
     -McAfee Anti-Spam
   Drafts
   Sent Items
   Deleted Items
   Junk E-mail
   RSS Feeds
   Sync Issues
    -Conflicts
    -Local Failures
 ON MY COMPUTER
   Inbox
   Drafts
   Sent Items
   Deleted Items
   Junk E-mail
   archive PST
     -Deleted Items
     -Sent Items
 SMART FOLDERS
   Flagged Mail

+++++++++++

tell application "Microsoft Outlook"
  with timeout of 8.8E+8 seconds
    set selectedMessages to every messagge of folder "deleted Items" of on my coputer
  end timeout
end tell

查找列表文件夹和子文件夹的代码

global AllFolders
set AllFolders to {}
global ContainerName
set ContainerName to ""
tell application "Microsoft Outlook"
    set allMailFolders to get mail folders
    repeat with currentFolder in allMailFolders
        set FolderName to name of currentFolder
        set PathSoFar to ""
        if FolderName is not missing value and (container of currentFolder is not missing value or account of currentFolder is not missing value) then
            set ContainerName to ":"
            set theContainer to currentFolder
            repeat while ContainerName is not ""
                set ContainerName to ""
                try
                    set theContainer to container of theContainer
                    set ContainerName to name of theContainer
                    if ContainerName is missing value then
                        set theAccount to account of theContainer
                        if theAccount is not missing value then
                            set AccountName to name of theAccount
                            set PathSoFar to (AccountName) & ":" & PathSoFar
                        end if
                    else
                        set PathSoFar to (ContainerName) & ":" & PathSoFar
                    end if
                end try
            end repeat
            set end of AllFolders to {PathSoFar & ":" & (FolderName)}
        end if
    end repeat
return AllFolders
end tell

相关内容

  • 没有找到相关文章

最新更新