LurpIN Posted January 27, 2007 Share Posted January 27, 2007 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 Link to comment Share on other sites More sharing options...
Uten Posted January 27, 2007 Share Posted January 27, 2007 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. Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling Link to comment Share on other sites More sharing options...
LurpIN Posted January 27, 2007 Author Share Posted January 27, 2007 #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.. Link to comment Share on other sites More sharing options...
Uten Posted January 27, 2007 Share Posted January 27, 2007 (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 January 27, 2007 by Uten Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling Link to comment Share on other sites More sharing options...
LurpIN Posted January 27, 2007 Author Share Posted January 27, 2007 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... Link to comment Share on other sites More sharing options...
locomaestro Posted January 27, 2007 Share Posted January 27, 2007 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. Link to comment Share on other sites More sharing options...
BrettF Posted January 27, 2007 Share Posted January 27, 2007 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?? Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
LurpIN Posted January 27, 2007 Author Share Posted January 27, 2007 no i dont thats why i changed it in my second post...if you notice i put the ***'s Link to comment Share on other sites More sharing options...
BrettF Posted January 27, 2007 Share Posted January 27, 2007 I understand that. But it was in your first post before the edit. Now what do you need help with? Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
BALA Posted January 27, 2007 Share Posted January 27, 2007 (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 January 27, 2007 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 Link to comment Share on other sites More sharing options...
Uten Posted January 27, 2007 Share Posted January 27, 2007 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. Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling Link to comment Share on other sites More sharing options...
improbability_paradox Posted January 27, 2007 Share Posted January 27, 2007 (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 January 27, 2007 by improbability_paradox Link to comment Share on other sites More sharing options...
Amerigo Posted September 2, 2008 Share Posted September 2, 2008 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. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now