Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Jan 26, 2013, 09:25 AM   #1
wesleyh
macrumors 6502
 
Join Date: Mar 2007
Why doesn't this simple applescript work any more in ML mail.app (as a rule)

It works only when you right click on the mail message and choose "run rules", but not on incoming messages (without interaction).

The first dialog is shown both when incoming or running manually, but the second dialog (with the id) is only shown when running manually. Nothing is shown in console.log

Any ideas?

Code:
using terms from application "Mail"
    on perform mail action with messages theMessages for rule theRule
        tell application "Mail"
            repeat with theMessage in theMessages
                display dialog "inside"

                set theId to id of theMessage

                display dialog "the id is " & theId

            end repeat
        end tell
    end perform mail action with messages
end using terms from
wesleyh is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
My first applescript doesn't work. Please help. jbmoore Mac Programming 4 Sep 15, 2013 04:17 PM
Simple AppleScript for mail.app JosCiv OS X 0 Jul 26, 2013 11:32 AM
Mail.app to Things.app AppleScript Gala Mac Applications and Mac App Store 2 Mar 30, 2013 02:32 PM
Mail.app rule help required. meget OS X 10.8 Mountain Lion 5 Sep 10, 2012 08:01 AM
Mail doesn't work at all danakm OS X 10.8 Mountain Lion 6 Aug 10, 2012 08:51 AM

Forum Jump

All times are GMT -5. The time now is 09:02 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC