Macos 使用AppleScript拒绝Outlook中的特定邀请

Macos 使用AppleScript拒绝Outlook中的特定邀请,macos,outlook,automation,applescript,Macos,Outlook,Automation,Applescript,我正在尝试自动执行一些Outlook任务,但不知道如何创建正确的applescript来拒绝邀请并向组织者报告。下面的脚本运行正常,但组织者没有收到任何内容。感谢您的帮助,谢谢 ... set withResp to true set aComment to "This meeting was auto declined. If you think this is wrong, please contact me." repeat with theMe

我正在尝试自动执行一些Outlook任务,但不知道如何创建正确的applescript来拒绝邀请并向组织者报告。下面的脚本运行正常,但组织者没有收到任何内容。感谢您的帮助,谢谢

...
    set withResp to true
    set aComment to "This meeting was auto declined. If you think this is wrong, please contact me."
    repeat with theMessage in theMessages
            try
    ...         
                if isMeeting then
                        if theSubject contains "SOME STRING" then
                            log "TO BE Canceled - " & messageTime & " - " & messageSender & " - " & theSubject
                            # this is not working as expected
                            decline invite theMessage with withResp and aComment
                        end if
                end if
            on error errorMsg
                log "Error: " & errorMsg
                log theMessage
            end try
    end repeat