PDA

View Full Version : Apple mail script to automatically open & execute .torrent files




jap4n
Nov 9, 2005, 02:45 PM
Hi there,

i'm trying to create an Applescript to automatically open and execute .torrent files.

This is because sometimes I'm away from my computer at home and want to start a .torrent download immediately. For instance, i might be at work and want to start a .torrent to download at my home.

So, i was thinking - i could create a rule in Apple Mail to execute an Applescript if a .torrent file was attached to the email. The applescript would then execute the attachment (.torrent file only) of the email.

Does anyone have any ideas on to go about this? or see any flaws in my approach, or have alternative ideas?

cheers :)



grapes911
Nov 9, 2005, 04:34 PM
It would be a lot easier to ftp the file over and then ssh into the box and use command line to open it.

jap4n
Nov 9, 2005, 04:52 PM
cool thanks - a bit tricksy.. but all good none the less.

thanks heaps! :)

grapes911
Nov 9, 2005, 04:57 PM
cool thanks - a bit tricksy.. but all good none the less.

thanks heaps! :)
Assuming the remote computer has SSH capabilities:
1. Turn on SSH on your computer.
2. From the remote computer use sftp to transfer the torrent.
3. From the remote computer, SSH in.
4. Type: open /path/to/torrent
5. Done.

You may need to set up your torrent program to not ask for a download location.

From your own computer, try step 4 in the terminal. You can see how the file will open up. Your torrent program shouldn't even have to be open.

jap4n
Nov 9, 2005, 05:05 PM
From your own computer, try step 4 in the terminal. You can see how the file will open up. Your torrent program shouldn't even have to be open.


cool.. lucky my trusty flatmate is home, hes opening ftp port to our network and turning on ftp on my g4.

ive just ssh'd into the network, then connected to my g4 :)

awesomeness :cool:

Nikore
Nov 9, 2005, 05:07 PM
Instead of useing sftp (which can be kinda tricky to use at first). You could alwase use scp, the santax for scp is "scp /path/to/file ip.add.re.ss:/path/on/remote (or just ~ to go to your home dir)" ie scp /Users/Nikore/torrent.torrent 192.168.0.1:~. Then do the rest of other post.

stuckwithme247
Nov 9, 2005, 08:00 PM
Similar issue-- I am already using this folder action script to open torrents automatically after download in Safari: http://www.macgeekery.com/tips/open_your_own_safe_files

I would like to make another script to move torrents automatically to another folder before opening (I would just change the dl folder but I want the torrents to go to a sub folder just for torrents).

jap4n
Nov 9, 2005, 08:56 PM
shouldnt be too hard to edit that script..

just after the if function - you should be able to add 'move' to directory before the open function?

not too savvy with applescript atm sorry