Skip to content

Instantly share code, notes, and snippets.

@pelletier
Created January 2, 2012 11:09
Show Gist options
  • Save pelletier/1550311 to your computer and use it in GitHub Desktop.
Save pelletier/1550311 to your computer and use it in GitHub Desktop.
AppleScript to send file to Kindle
on run {input, parameters}
tell application "Mail"
activate
end tell
tell application "Finder"
set visible of process "Mail" to false
end tell
tell application "Mail"
set newMessage to make outgoing message with properties {visible:true, content:"", subject:"convert"}
tell newMessage
make new to recipient at end of to recipients with properties {address:"[email protected]"}
make new attachment with properties {file name:input}
end tell
send newMessage
end tell
tell application "Finder"
set visible of process "Mail" to false
end tell
end run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment