|
|
#1 |
|
Mail Rules Applescript
I'm trying to make a script to run from a rule that will download my attachments.
I'm a little stuck because I take the rule part out and tell it to just run on a selection and it works perfectly so it's got to be something to do with the perform_mail_action aspect. It just runs the rule (I had it change the color of the item so I know it ran) but the script doesn't do anything. Ideas? Code:
on perform_mail_action(theData)
set theOutputFolder to "Macintosh HD:Users:USERNAME:Dropbox:" as string
set theSelectedMessages to |SelectedMessages| of theData
set theRule to |Rule| of theData
display dialog theSelectedMessages
tell application "Mail"
repeat with theMessage from 1 to count theSelectedMessages
-- Process the current message
set theAttachments to theMessage's mail attachments
if theAttachments is not {} then
repeat with theAttachment in theAttachments
set theSavePath to theOutputFolder & theAttachment's name
try
save theAttachment in theSavePath
end try
end repeat
end if
end repeat
end tell
end perform_mail_action
__________________
iMac 21" Late '09 8GB iPhone3G Jailbroken MacbookPro iPod v5.5, Ubuntu x64 tower & EeePC 900, Lenovo T400WinMatrix Profile | UbuntuForums Profile | XDA Forums |
|
|
|
0
|
|
|
#2 |
|
|
0
|
|
|
#3 | |
|
Quote:
Anyone know what's off with this?
__________________
iMac 21" Late '09 8GB iPhone3G Jailbroken MacbookPro iPod v5.5, Ubuntu x64 tower & EeePC 900, Lenovo T400WinMatrix Profile | UbuntuForums Profile | XDA Forums |
||
|
|
0
|
![]() |
|
«
Previous Thread
|
Next Thread
»
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| thread | Thread Starter | Forum | Replies | Last Post |
| Better way to edit mail rules? Software for rules? | gkremen | Mac Basics and Help | 0 | Dec 2, 2010 05:36 PM |
| Applescript Mail Rule Help | drivebyed | Mac Programming | 3 | Sep 23, 2010 04:27 AM |
| Importing mail account settings, adding multiple e-mail address to mail rules in Mail | infobleep | Mac Applications and Mac App Store | 3 | Jan 31, 2010 04:01 PM |
| Applescript not working with mail rule | bergmef | Mac Programming | 2 | Sep 27, 2009 04:53 PM |
| Activating Mail rule within applescript | FunkEye | Mac Programming | 0 | May 7, 2008 01:00 PM |
All times are GMT -5. The time now is 04:19 PM.




iMac 21" Late '09 


Linear Mode

