Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 33 lines (26 sloc) 0.814 kb
#!/usr/bin/osascript
on run argv
if argv is {} then
return "Pass at least one filename as an argument!"
end if
set pwd to system attribute "PWD"
tell application "Mail"
try
-- This only works for messages created by this script
set composeMessage to first outgoing message where visible is true
on error
set composeMessage to make new outgoing message at beginning with properties {visible:true}
end try
tell composeMessage
repeat with fileName in argv
if not fileName starts with "/" then
set fileName to pwd & "/" & fileName
end if
tell content
make new attachment with properties {file name: fileName} at after the last paragraph
end tell
end repeat
end tell
activate
end tell
end run
Jump to Line
Something went wrong with that request. Please try again.