Jump to content

Screensaver to change torrent speed limits


Recommended Posts

Usually I have my torrents running at all times, and when I use my computer, I limit the download & upload speeds to 25kb/s & 10kb/s respectively. A lot of times, I forget to remove the limits, and then my stuff doesn't download overnight. =[

So today I come up with the idea to set my screensaver to automatically limit and remove the limits on my torrents whenever I go away/come back to my computer. I came up with this:

#include <_SS_UDF.au3>
 ShellExecute("C:\Program Files\uTorrent\uTorrent.exe")
 WinWaitActive("µTorrent 1.8.2")
 WinSetState("µTorrent 1.8.2", "", @SW_MAXIMIZE)
 Sleep(500)
 MouseClick("right", 860, 760)
 MouseClick("left", 900, 485)
 MouseClick("right", 1100, 760)
 MouseClick("left", 1150, 663)
 WinSetState("µTorrent 1.8.2", "", @SW_MINIMIZE)
 Sleep(500)
 _SS_Start()
 Sleep(1000)
 SplashTextOn("Please wait...", "Please wait...", @DesktopWidth-50, @DesktopHeight-100, -1, -1, 33)
 ShellExecute("C:\Program Files\uTorrent\uTorrent.exe")
 WinWaitActive("µTorrent 1.8.2")
 WinSetState("µTorrent 1.8.2", "", @SW_MAXIMIZE)
 MouseClick("right", 860, 760)
 MouseClick("left", 900, 530)
 MouseClick("right", 1100, 760)
 MouseClick("left", 1150, 495)
 WinSetState("µTorrent 1.8.2", "", @SW_MINIMIZE)
 SplashOff()

The problem is that it doesn't remove the limits for some reason. Then I tried this:

TorrentSaver.scr

#include <_SS_UDF.au3>
 ShellExecute("C:\Program Files\uTorrent\uTorrent.exe")
 WinWaitActive("µTorrent 1.8.2")
 WinSetState("µTorrent 1.8.2", "", @SW_MAXIMIZE)
 Sleep(500)
 MouseClick("right", 860, 760)
 MouseClick("left", 900, 485)
 MouseClick("right", 1100, 760)
 MouseClick("left", 1150, 663)
 WinSetState("µTorrent 1.8.2", "", @SW_MINIMIZE)
 Sleep(500)
 _SS_Start()
 Sleep(1000)
 ShellExecute("C:\uTL.exe")

uTL.exe

SplashTextOn("Please wait...", "Please wait...", @DesktopWidth-50, @DesktopHeight-100, -1, -1, 33)
 ShellExecute("C:\Program Files\uTorrent\uTorrent.exe")
 WinWaitActive("µTorrent 1.8.2")
 WinSetState("µTorrent 1.8.2", "", @SW_MAXIMIZE)
 MouseClick("right", 860, 760)
 MouseClick("left", 900, 530)
 MouseClick("right", 1100, 760)
 MouseClick("left", 1150, 495)
 WinSetState("µTorrent 1.8.2", "", @SW_MINIMIZE)
 SplashOff()

It works when I run the screensaver directly from the file, but when it runs as a screensaver, once again, it doesn't remove the speed limits. =/

If anyone can help me with this, that would be great.

Oh, and also, if anyone can figure out a way to set speed limits without having to bring up the window each time, that would be amazing! :P

Link to comment
Share on other sites

I haven't tested it, but if you activate "Web UI" in uTorrent you should be able to control it through the _IE...() funcs... I think :P

You couls also try using ControlSend() instead of Send() (then you could also get rid of all those WinSetState() unless you want them)

Edited by AdmiralAlkex
Link to comment
Share on other sites

I haven't tested it, but if you activate "Web UI" in uTorrent you should be able to control it through the _IE...() funcs... I think :P

You couls also try using ControlSend() instead of Send() (then you could also get rid of all those WinSetState() unless you want them)

Hmm, I'll look into the IE funcs with WebUI tomorrow. [Great idea btw! :D]

And the reason I have all those WinSetState()s is because uTorrent minimizes to the system tray, and when I bring it up, I want to make sure it's maximized, so that I can have my mouse click in the right area.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...