Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Use AppleScript and Mail to auto-start torrent downloads' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Use AppleScript and Mail to auto-start torrent downloads
Authored by: nickdynamite on Jun 14, '06 08:39:44AM

is there a way in Applescript to quit an application (such as Bittorrent)?

I ask because I want to use iCal to set up an event to, say, stop bittorrent before I get up - say at 6am. I've set up iCal events that launch applications before just wondering if there's a way to have a corresponding event to quit an app.

Thanks in advance..



[ Reply to This | # ]
yep
Authored by: fracai on Jun 14, '06 09:28:22AM

tell application <app name>
quit
end tell

---
i am jack's amusing sig file



[ Reply to This | # ]
yep
Authored by: nickdynamite on Jun 14, '06 10:08:47AM

tell application BitTorrent
quit
end tell


tried that didn't work.

"Applescript Error

The variable BitTorrent is not defined."



[ Reply to This | # ]
yep
Authored by: fredrikw on Jun 14, '06 10:34:22AM

You need to enclose the application name in quotes...

tell application "BitTorrent"...

/Fredrik



[ Reply to This | # ]
yep
Authored by: nickdynamite on Jun 14, '06 12:07:30PM

got it thanks, n00b applescripter here ;)



[ Reply to This | # ]
Use AppleScript and Mail to auto-start torrent downloads
Authored by: gxw on Jun 14, '06 05:11:20PM

it should be someting like:
tell application app_name to quit
end tell
in apple script.
app_name == the name of the app to quit like itunes.



[ Reply to This | # ]
Use AppleScript and Mail to auto-start torrent downloads
Authored by: chyna4xena on Jun 15, '06 05:22:39PM
I don't think you should have the "end tell" line, when the "tell" command is all on one line.

Either
tell application "app_name"
     quit
end tell
Or
tell application "app_name" to quit


[ Reply to This | # ]
Another (better?) way
Authored by: stevebr on Jun 14, '06 08:18:57PM

Nick, you already have the scripted solution, but I'll make the following suggestion:

1) Use Azereus instead of the official BT client.
2) Install & set up the Azereus plugin called "Speed Scheduler." Azereus has a plugin manager (available in the "Plugins" menu) that will assist you in installation and configuration.

Speed Scheduler may be exactly the thing you are looking for. It's much more flexible than an on|off switch like you can get with "Tell application x to quit". I use it adjust allocated bandwidth (upstream and downstream independent of one another) with a schedule that includes different allocations for typical working hours, overnight, and weekends. You can also set either upstream or downstream bandwidth to zero in any schedule, which should solve your initial problem.



[ Reply to This | # ]