Register for your free account! | Forgot your password?

Go Back   elitepvpers > Off-Topics > Tutorials
You last visited: Today at 21:14

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Beginner Tutorial] AutoIt3 Simple Process Closer

Discussion on [Beginner Tutorial] AutoIt3 Simple Process Closer within the Tutorials forum part of the Off-Topics category.

Reply
 
Old   #1
 
TekiJinn's Avatar
 
elite*gold: 0
Join Date: Jan 2006
Posts: 125
Received Thanks: 2
Post [Beginner Tutorial] AutoIt3 Simple Process Closer

Hello all,

I was editing my script with comments for no real reson because I was bored and decided to comment every single part of the script so I can remember how everything works if I ever somehow lost my memory thus I decided I should upload my script to ElitePvpers because they're my 1 and only favorite forum that I ever use and maybe I can possibly help some AutoIt3 Noobies somehow with my little program.


Why I Made This

I use this everyday because I have to turn off my computer at night, Turn it back on when I wake up etc. My being a real pack rat with lots of experimental crap on my computer that pops up when I start up my computer I decided to make a program that simply stops all these programs as soon as I click "Kill all the processes".


Code

Code:
;Author: Troy/TekiJinn (on elitepvpers)
;Date created: 12/30/2007
;Time created: 9:17 AM
;Script name: Startup Process Killer
;--------------------------------------------------------------------------------------------------------------------------------------
;GUI
#include <GUIConstants.au3> ; tell it to use GUI related constant variables etc.

Opt("GUIOnEventMode", 1)  ; Change to OnEvent mode
$mainwindow = GUICreate("Startup Process Killer - By Troy", 210,100) ;my main box thingy
$kill = GUICtrlCreateButton("Kill all the processes!",50,40,110,20) ;kill button
$quit = GUICtrlCreateButton("Exit",90,70) ;exit button

;
;Tell the buttons what to read from when clicked v
GUICtrlSetOnEvent($quit, "quit"); tell the quit button to use my quit function (example: quit = Func quit())
GUICtrlSetOnEvent($kill, "kill"); tell the kill button to use my kill function (example: kill = Func kill())
GUISetOnEvent($GUI_EVENT_CLOSE, "quit");tell the program that when you click that red X at top right of program it uses my quit function
;End of the tell ^
GUISetState(@SW_SHOW) ;Tell it to show my box

While 1 ;loop infinitly
  Sleep(1000)  ; this basicly keeps my program from quitting right after you open it "Big bug I couldent figure out".
  ;so if you have any kind of things you want to happen over and over while the program is running you put them here.
WEnd ; end loop

Func quit() ; quit function
	Exit ;exit the program
endfunc ;end the function

Func kill() ;kill function
	ProcessClose("Network Chat.exe") ; I left my processes in here for example, you can change them to whatever you want closed.
	ProcessClose("hpqtra08.exe")
	ProcessClose("daemon.exe")
	ProcessClose("Nick LaunchPad.exe")
	ProcessClose("YahooMessenger.exe")
	ProcessClose("msmsgs.exe")
	ProcessClose("msnmsgr.exe")
	ProcessClose("hpwuSchd2.exe")
	ProcessClose("PDVDServ.exe")
	ProcessClose("hpqste08.exe")
	ProcessClose("mysqld-nt.exe")
	ProcessClose("HPZipm12.exe")
	ProcessClose("pg_ctl.exe")
	;ERROR MESSAGES BELOW~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	;These basicly tell me if the process failed to close then I have to use Ctrl+ALT+Del and manually close them.
	If ProcessExists("Network Chat.exe") then
		MsgBox(0,"Fail","Network Chat failed to close.")
	endif
	If ProcessExists("hpqtra08.exe") then
		MsgBox(0,"Fail","hpqtra08.exe failed to close.")
	endif
	If ProcessExists("daemon.exe") then
		MsgBox(0,"Fail","Daemon failed to close.")
	endif
	If ProcessExists("Nick LaunchPad.exe") then
		MsgBox(0,"Fail","Nick Launch Pad failed to close.")
	endif
	If ProcessExists("YahooMessenger.exe") then
		MsgBox(0,"Fail","Yahoo Messenger failed to close.")
	endif
	If ProcessExists("msmsgs.exe") then
		MsgBox(0,"Fail","msmsgs.exe failed to close.")
	endif
	If ProcessExists("msnmsgr.exe") then
		MsgBox(0,"Fail","MSN Messenger failed to close.")
	endif
	If ProcessExists("hpwuSchd2.exe") then
		MsgBox(0,"Fail","hpwuSchd2.exe failed to close.")
	endif
	If ProcessExists("PDVDServ.exe") then
		MsgBox(0,"Fail","Power DVD Server failed to close.")
	endif
	If ProcessExists("hpqste08.exe") then
		MsgBox(0,"Fail","hpqste08.exe failed to close.")
	endif
	If ProcessExists("mysqld-nt.exe") then
		MsgBox(0,"Fail","MySQL Server failed to close.")
	endif
	If ProcessExists("HPZipm12.exe") then
		MsgBox(0,"Fail","HPZipm12.exe failed to close.")
	endif
	If ProcessExists("pg_ctl.exe") then
		MsgBox(0,"Fail","pg_ctl.exe failed to close.")
	endif
	If ProcessExists("postgres.exe") then
		MsgBox(0,"Fail","postgres sql server failed to close.")
	endif
	msgbox(0,"Sucess!","Done")
	
	Exit
EndFunc ;end the function
Attached Files
File Type: zip ProcessKillersrc.zip (287.8 KB, 45 views)
TekiJinn is offline  
Reply


Similar Threads Similar Threads
[CG] 3D Studio Max Beginner Tutorial I
03/29/2013 - Artist Tutorials - 23 Replies
Habe mal vor einiger Zeit ein Video Tutorial zu 3D Studio Max gemacht. Es werden die Basic vom Interface und im Modelling gezeigt. Von einer Box bis zu einem Schwert. Es ist der erste Teil einer Serie von Tutorials. Die Inhalte sind wie folgt geplannt: Einfürhung in das 3D Studio Max Interface.
Suche ein memory read process tutorial, am besten mit bildern
10/25/2009 - General Coding - 4 Replies
HEy LEute Ich such ein tutorial, was sich mit read process memory befasst. Wenns geht auch noch alle anderen sachen also write process memory Hoffe da gibts was schönes mit bildern hatte schonmal sufu benutzt aber die sind irgendwie ohne bilder
[DOWN] Beginner Tutorial
05/07/2006 - Artist Tutorials - 7 Replies
Dieses Tutorial ist ausschliesslich für absolute Anfänger geeignet ! Für etwas Fortgeschrittenere GFX'er ist dieses Tutorial wohl überflüssig, aber dennoch evt. ganz nett zu lesen. Leider zu groß um es zu posten und mein FTP ist im Eimer... Wenn ihn jemand hosten könnte, wär ich demjenigen sehr verbunden. ^^ http://rapidshare.de/files/17748583/tutobs...bsce ne.jpg.html Naja... ich bitte um Bewertungen + Karma Ups ^^
[Ryzom] Beginner Tutorial
04/28/2004 - General Gaming Discussion - 0 Replies
© Tribal Beginners Guide Hallo zusammen Ich habe mir mal die Mühe gemacht und alle relevanten Informationen zusammengesammelt bzw. teilweise selbst erstellt. Ich werde den hieraus resultierten Beginners Guide regelmäßig updaten/erweitern. Zu finden sein wird er dann auf der Seite von Tarius http://www.ryzom-game.info.de. Zur Zeit steht er dort natürlich noch im Betaforum!!! Solltet Ihr inhaltliche Fehler finden oder Ergänzungen/Erweiterungen haben könnt Ihr sie mir gerne per Mail...



All times are GMT +1. The time now is 21:14.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.