E-mail Files
Summary: Creates a new message in Mail with the selected files attached.
Requires: EagleFiler, Apple Mail
Install Location: ~/Library/Scripts/Applications/EagleFiler/
Description
Creates a new message in Mail with the selected files attached. The files’ notes are added to the body of the message.
Download in Compiled Format · Download in Text Format
Script
set _body to ""
set _includeNotes to true
tell application "EagleFiler"
tell browser window 1
set _records to selected records
set _files to {}
repeat with _record in _records
copy file of _record to end of _files
if _includeNotes then
set _body to _body & _record's note text & return
end if
end repeat
end tell
end tell
tell application "Mail"
make new outgoing message with properties {visible:true}
tell the result
set content to _body
try -- based on iPhoto script
set _signature to the message signature
name of _signature
set _useSignature to true
on error
set _useSignature to false
end try
repeat with _file in _files
make new attachment at end with properties {file name:_file's POSIX path}
end repeat
if _useSignature is true then
set message signature to _signature
end if
end tell
end tellLast Modified: 2009-02-14
Running the Script
You can use AppleScript Editor (AppleScript Utility prior to Mac OS X 10.6) to enable Mac OS X’s built-in Script menu. To run the script, just select it from the menu. FastScripts provides a similar menu that supports keyboard shortcuts and other features.