For some time I have been trying to get the following script working as a Folder Action (FA), but it’s very hit & miss. More missing than hitting.
However, I have noticed that when I go to re-configure the FA I have to re-enable Folder Actions when I right click on the folder. I’m not aware that I disable Folder Actions, but could that happen during standard system maintenance? I run MainMenu once or twice weekly & IceClean monthly.
All help gratefully received.
Simon
on adding folder items to thefolder after receiving theAddedItems
repeat with eachitem in theAddedItems
set theSender to "Simon<simon@xxx.xx.uk>"
set recipCommon to "Documents"
set recipAddress to "xxxxx@xxxxxxx.com"
set msgText to ""
tell application "Mail"
set newmessage to make new outgoing message with properties {subject:"Important File Attachment: " & name of (info for eachitem), content:msgText & return & return}
tell newmessage
set visible to true
set sender to theSender
make new to recipient with properties {name:recipCommon, address:recipAddress}
make new attachment with properties {file name:eachitem} at after the last paragraph
end tell
send newmessage
end tell
end repeat
end adding folder items to
Model: Mac Mini 1.66 GHz Intel Core Duo w/ 2GB RAM
AppleScript: 2.0.1
Browser: Firefox 3.0
Operating System: Mac OS X (10.5)