PDA

View Full Version : Torrent downloading via mail and applescript


fille87
01-14-2010, 09:45 PM
This lets you send a torrent url via mail, which when recieved by mail.app will run an applescript which will take the contents of the message (the torrent url) and start downloading it using transmission or utorrent:

First, save this as a new script (Replace YOURCLIENT with either Transmission or uTorrent:


using terms from application "Mail"
on perform mail action with messages theMessages for rule Torrent
tell application "Mail"
repeat with theMessage in theMessages
set theText to content of theMessage
set the clipboard to (theText)
end repeat
end tell
tell application "YOURCLIENT" to activate
tell application "System Events"
tell process "YOURCLIENT"
keystroke "u" using {command down}
keystroke (theText)
key code 36
end tell
end tell
end perform mail action with messages
end using terms from


Then set up a new rule in mail.app, for instance mine is all messages from myself with the subject "download".
Make it run an applescript when the message is recieved, and pick the script you saved earlier.
This is great for downloading stuff if you're on your phone and your computer is turned on, and you want to start a download; You just mail the URL to the address set up in mail.app and it will download it.

Example:

http://i49.tinypic.com/t9ttad.jpg

Trumath
01-14-2010, 11:48 PM
Cool.

User was banned for this post (( One Word Sentence )) - JPoid (justkiddinglolz)

xpod1
01-15-2010, 11:57 PM
I have renowned faith in Fille's scripts.