Torch
By admin • Mar 9th, 2007 • Category: UncategorizedHere’s the quite ugly AppleScript I use to auto open any new torrent files with my default BitTorrent client.
property type_list : {”torrent”, “TORRENT”, “Transmission”, “BitTorrent Document”, “BitTorrent”, “BitTorrent document”}
property extension_list : {”torrent”, “TORRENT”}on adding folder items to my_folder after receiving the_files
repeat with i from 1 to number of items in the_files
tell application “Finder”
launch
try
set this_file to (item i of the_files)
set the this_file_info to info for this_fileif (the file type of the this_file_info is in the type_list) or (the name extension of the this_file_info is in the extension_list) then
open this_file
end ifend try
end tell
end repeat
end adding folder items to
Put it in Library/Scripts/Folder Action Scripts and then hook up a folder with it.
admin is
Email this author | All posts by admin









