Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

jap4n

macrumors member
Original poster
Aug 10, 2003
90
0
wellington, nz
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

Moderator emeritus
Jul 28, 2003
6,995
10
Citizens Bank Park
jap4n said:
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

macrumors member
Original poster
Aug 10, 2003
90
0
wellington, nz
grapes911 said:
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

macrumors newbie
Jul 22, 2004
28
0
California
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.
 

jap4n

macrumors member
Original poster
Aug 10, 2003
90
0
wellington, nz
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
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.