nirandone Posted April 21, 2006 Report Posted April 21, 2006 I know it's already been kind of requested for commandline options etc.But to be able to set download and upload speed from commandline would really be helpful to us who have VOIP telephony. So that when I receive a call and answer, another program would sense the status being changed for the phone adapter to 'connected', and execute a command, or let's say a batch file (that can execute several commands), that changes the the upload speed for µTorrent. That way we can ensure that the call will get great sound quality.Not all of us have a router with good QoS functionality built in, so a good solution then is to cap the computers running any P2P applications.This can also be done with some bandwidth limiting/traffic shaping program on the computers running the P2P app, but they tend to be quite unstable for me. I'd rather see that I can just execute a commandline option...
lidi Posted April 22, 2006 Report Posted April 22, 2006 Yeah, that idea is good i think. And i have one ide too: a hotkey assigned to "scheduler on", and an another to "scheduler off".I want to make a program, that ping my neighbour (shared adsl with him), and if his computer is on, then limit my connection. With this commandline options, or the hotkeys, i can finish this program.
nirandone Posted April 25, 2006 Author Report Posted April 25, 2006 I've solved my problem by using VBscript with the sendkeys command. So the script controls µTorrent through the GUI.No need for commandline options or hotkeys. If it can be done in the GUI, then you can let a script do it for you.I think this will be very useful for you too lidi!I learned how to do it here: http://mcpmag.com/columns/rss.asp?editorialsid=1230This is how my code looks like that will set the upload to 500 kB/s:Dim objShellSet objShell = CreateObject("WScript.Shell")objShell.Run Chr(34) & "C:\Program Files\utorrent.exe" & Chr(34),,FalseWScript.Sleep 1000objShell.AppActivate "µTorrent 1.5"WScript.Sleep 5' Open the Preferences menu' For some reason it would not work with ^{p} (Ctrl+P)' so the script sends Alt+O and Enter insteadobjShell.SendKeys "%{o}"WScript.Sleep 5objShell.SendKeys "{ENTER}"WScript.Sleep 5' Go to Network using Shift+Tab and DownobjShell.SendKeys "+{TAB}"WScript.Sleep 5objShell.SendKeys "+{TAB}"WScript.Sleep 5objShell.SendKeys "+{TAB}"WScript.Sleep 5objShell.SendKeys "{DOWN}{DOWN}{DOWN}"WScript.Sleep 5' Go to Bandwidth LimitingobjShell.SendKeys "{TAB}"WScript.Sleep 5objShell.SendKeys "{TAB}"WScript.Sleep 5objShell.SendKeys "{TAB}"WScript.Sleep 5objShell.SendKeys "{TAB}"WScript.Sleep 5objShell.SendKeys "{TAB}"WScript.Sleep 5objShell.SendKeys "{TAB}"WScript.Sleep 5objShell.SendKeys "{TAB}"WScript.Sleep 5objShell.SendKeys "{TAB}"WScript.Sleep 5' Set the Maximum Upload RateobjShell.SendKeys "500{ENTER}"WScript.Sleep 5' Minimize µTorrentobjShell.SendKeys "%"WScript.Sleep 5objShell.SendKeys "{DOWN}"WScript.Sleep 5objShell.SendKeys "{LEFT}"WScript.Sleep 5objShell.SendKeys "{DOWN}{DOWN}{DOWN}"WScript.Sleep 5objShell.SendKeys "{ENTER}"
lidi Posted April 25, 2006 Report Posted April 25, 2006 Thanks for the code above, but i knew only a little c++. I try to convert it to c.I solved my problem with macro express, and a tiny c++ application. The c app, "press" a hotkey, then the rest is done by the macro. Sets the limits with mouse movements, and keypresses, in the gui.But it would be nice, if we can control uTorrent, like winamp does. With SendMessage.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.