Sign in to follow this  
Followers 0
LurpIN

Need help with process killer

13 posts in this topic

K so im making a process killer that kills process i choose and its gonna read it off a list and this thing is gonna be used to kill mozilla,ie,limewire and so i wanted it so that if you do wanna use those you gotta enter a password and then it will kill the script and you can go on and i wanted it so if you tried to exit the script then it will ask for the password..so the code i have i think i pretty much got it but there is this one part where i cant declare a statement i tried using $kill = ProcessClose($read) but i think its not working cause there is a EndIF Next between that and where im trying to use it..anyways here is my code can you guys take a look at it plz and tell me whats wrong...

#include <File.au3> 
Global $PASS = "..bh"
Global $LST = @ScriptDir & "\KILLST.txt" 

Do  
$LEN = _FileCountLines($LST)
For $i = 1 To $LEN Step +1
 $READ = FileReadLine($LST,$i)
 If ProcessExists($READ) Then
  $Kill = ProcessClose($READ)
EndIF
Next
If $Kill Then
$MSG = MsgBox(0, "HAHA", "Now you gotta enter the password",)
If $MSG Then
$PWCHK = inputbox("pass","enterpassword","","*")
if $PWCHK = $PASS then
msgbox(0,"","hello master")
else
processclose("process")
msgbox(0,"","HAHA nice try FUCKER go again")
EndIF
EndIF
EndIF
Until $i = 1

Share this post


Link to post
Share on other sites



Just a few tips:

  • Start to write sentences!
  • That is, us a capital letter in the begining. And a periode at the end.
  • And, yes, maybe break it up a bit so it is possible for us old lads to read what you try to write. Most of us use glasses you know and the eyes has been severly damaged on old equipement. So we need all the help we can get.
  • Remove offending words like H**H and F****R. People are reading this and some of us belive in stuff.
  • If it is a prank, try to break it up so it does not look like one. Some of us have to remove pranks like this every week and to be frankly we realy hate it. Some times we don't even get paid to do it. So please have some pitty with us.
  • Read the help page on ProcessClose again. Unless your cristall bal is a lot bether than mine, witch would make me realy mad, I doubt you are able to put the pid's in your file and get it right all the time.
  • And at last use CTRL+T on your code while in SciTE. Again to save my eyes.
Thanks for reading this.

Share this post


Link to post
Share on other sites

#include <File.au3>
Global $PASS = "..bh"
Global $LST = @ScriptDir & "\KILLST.txt"

Do
   $LEN = _FileCountLines($LST)
   For $i = 1 To $LEN Step +1
      $READ = FileReadLine($LST,$i)
      If ProcessExists($READ) Then
         $Kill = ProcessClose($READ)
      EndIF
   Next
   If $Kill Then
      $MSG = MsgBox(0, "HAHA", "Now you gotta enter the password",)
      If $MSG Then
         $PWCHK = inputbox("pass","enterpassword","","*")
         if $PWCHK = $PASS then
            msgbox(0,"","hello master")
         else
            processclose("process")
            msgbox(0,"","HAHA nice try F****R go again")
         EndIF
      EndIF
   EndIF
Until $i = 1

k..i fixed that for you and no this is not a prank..

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

So, how about it. Is your crystal (damn I spelled that one wrong) ball better than mine? If so, where can I get one :)

EDIT: I'm on Iceweasel and I got to say. Something is weired with the default fonts.

Edited by Uten

Share this post


Link to post
Share on other sites

oviously my crystal ball isnt better then yours or i might be able to figure out what you are talking about....what else do you want me to do to get you to help me...

Share this post


Link to post
Share on other sites

oviously my crystal ball isnt better then yours or i might be able to figure out what you are talking about....what else do you want me to do to get you to help me...

dude if he wants to use those kind of words is up to him , there are no rules that says that you can't use those words in your script.

Share this post


Link to post
Share on other sites

dude if he wants to use those kind of words is up to him , there are no rules that says that you can't use those words in your script.

Yes in his script, but in the forum, just dont. I dont like If your script has bad language, then *** it or something. The googlebot searches this forum it and guests read it. Do you want them to get the wrong idea about AutoIt??

Share this post


Link to post
Share on other sites

no i dont thats why i changed it in my second post...if you notice i put the ***'s

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

#include <File.au3>
Global $PASS = "..bh"
Global $LST = @ScriptDir & "\KILLST.txt"

Do $LEN = _FileCountLines($LST)
    For $i = 1 To $LEN Step +1
        $READ = FileReadLine($LST,$i)
        If ProcessExists($READ) Then
            $Kill = ProcessClose($READ)
        EndIF
    Next
        If $Kill Then
            $MSG = MsgBox(0, "HAHA", "Now you gotta enter the password",)
                If $MSG Then
                    $PWCHK = inputbox("pass","enterpassword","","*")
                    If $PWCHK = $PASS then
                    msgbox(0,"","hello master")
                    else
                    processclose("process")
                    msgbox(0,"","HAHA nice try F****R go again")
                EndIF
            EndIF
        EndIF
Until $i = 1

;Need a while loop to keep script alive
While 1
    sleep(10)
WEnd

Edited by BALA

[font="Comic Sans MS"]BA-LA[/font]http://ba-la.110mb.comJoin my community, CLICK HEREAlternative links to my site:http://www.ba-la.tkhttp://www.ba-la.co.nrContact me if you would like to help with some of my projects: joeythepirate@gmail.com

Share this post


Link to post
Share on other sites

oviously my crystal ball isnt better then yours or i might be able to figure out what you are talking about....what else do you want me to do to get you to help me...

All the clues you need is in my first post. Lets say I'm pulling a prank on you. Just like you want to do on someone (the whole world for all I know). So read it really carefully again and try to remove the filling from my text.

PS: I'm relived to here your crystal ball ain't better than mine.

Share this post


Link to post
Share on other sites

#12 ·  Posted (edited)

Just a few tips:

  • Read the help page on ProcessClose again. Unless your cristall bal is a lot bether than mine, witch would make me realy mad, I doubt you are able to put the pid's in your file and get it right all the time.
Thanks for reading this.

In other words, you're primary flaw is to try and store PID's in a txt file. The PID can change each time a given process is started. Even looking for process names is not a surefire way of going about it.

Edited by improbability_paradox

Share this post


Link to post
Share on other sites

Non of the above work. They all come up with errors.

I am looking for a script that will automatically kill any non-windows processes (open programs and everything in the system tray) that are currently running to free up cpu &/or memory for heavy applications or watching videos.


Anyone who does not wonder is either omniscient or foolish.

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  
Followers 0