g3nius Posted May 4, 2012 Report Share Posted May 4, 2012 Hey so like the topic says I am working on a script that will stop all the transfers when my VPN goes down. Currently the program is set to quit (but this takes a while) This is not my code and was changed from https://forum.transmissionbt.com/viewtopic.php?f=4&t=12330&p=56986&hilit=script+to+quit+vpn#p56986on idle set activeInterfaces to do shell script "ifconfig -lu" if activeInterfaces = "lo0 en0 en1 fw0 utun0" then tell application "uTorrent" to quit tell application "Growl" notify with name ¬ "VPN Down" title ¬ "VPN Down" description ¬ "I have quit uTorrent." application name "Drop BitTorrent" end tell end if return 5 -- 30 is default value, but it doesn't hurt to include it hereend idleDoes any one know what command I could substitute for the line: ??tell application "uTorrent" to quitstop doesn't seem to work and I can't really guess. I also can't seem to find a key command to start/stop transfersAlso what would I add to reenable the transfers? something like:if activeInterfaces = "lo0 en0 en1 fw0 utun0 tun0"tell application "uTorrent" to start (or something to that effect)if activeInterfaces = "lo0 en0 en1 fw0 tun0 utun0"tell application "uTorrent" to start (or something to that effect) Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.