View Single Post
Old 01-14-2010 Edited: Last edited by fille87; 01-14-2010 at 09:52 PM.   View Single Post#1
fille87
 
fille87's Avatar
 
Jun 2009
Posts: 404

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:

Code:
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: