jvanegmond Posted March 1, 2006 Posted March 1, 2006 (edited) Select a process, type how many seconds you want it to wait and click close to close the process. or type how many seconds you want to delay shutdown, and press cancel to abort shutdown. Global Const $GUI_EVENT_CLOSE = -3 Dim $msg GUICreate ( "Timer v. 0.1 !", 300, 310) $mylist=GUICtrlCreateList ("", 10, 10, 200, 250) $sleep = GUICtrlCreateInput ( "0", 10, 265, 200, 20) $close=GUICtrlCreateButton("Close", 220, 10, 70) $shutdown=GUICtrlCreateButton("Shutdown", 220, 40, 70) $cancel=GUICtrlCreateButton("Cancel", 220, 70, 70) GUICtrlCreateLabel ("Select a process, press Close to end it. Press cancel to stop shutdown. Type # of seconds left-down to delay.", 220, 100, 70, 200) $time=GUICtrlCreateLabel("", 220, 300) Get() GUISetState () While $msg <> $GUI_EVENT_CLOSE $msg = GUIGetMsg() Select Case $msg = $close Sleep(GUICtrlRead($sleep) * 1000) ProcessClose( GUICtrlRead($mylist) ) Get() Case $msg = $shutdown Run("Shutdown -s -t " & GUICtrlRead($sleep)) Case $msg = $cancel Run("Shutdown -a") EndSelect Wend Exit Func Get() $list = ProcessList() for $i = 2 to $list[0][0] GUICtrlSetData($mylist,$list[$i][0]) next EndFunc Edited May 14, 2007 by Manadar github.com/jvanegmond
jvanegmond Posted March 6, 2006 Author Posted March 6, 2006 If noone's gonna post i'll do it. At least it's not empty now. And the most pathethic thing probably is the fact that it'll just have 1 post now. github.com/jvanegmond
kclteam Posted March 6, 2006 Posted March 6, 2006 nice one mate...it's useful... I believe we should all pay our tax with a smile. I tried - but they wanted cash!
MHz Posted March 6, 2006 Posted March 6, 2006 Nice, simple and effective. Has a good looking small window also which I like. Well done, Manadar
GrungeRocker Posted March 6, 2006 Posted March 6, 2006 it's really usefull [font="Verdana"]In work:[list=1][*]InstallIt[*]New version of SpaceWar[/list] [/font]
BigDod Posted March 6, 2006 Posted March 6, 2006 Useful unless like me you select shutdown instead of close. :"> Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother
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