FeReNGi Posted November 6, 2006 Share Posted November 6, 2006 hallo, Is it possible to get some buttons on progressbar ? Shutdowntimer(180) Func ShutdownTimer($Time) local $hr = $Time/60 local $sec = $Time * 60 local $step = 100 / $sec ProgressOn("", "Reboot Time in : " & $sec & " seconds", "", -1, -1, 16) For $i = 0 To 100 Step $step $sec = $sec - 1 $Time = round($Time - 1/60, 2) Sleep(1000) If $Time > 2 Then ProgressSet($i, $Time & " minutes left before reboot." ) Else ProgressSet($i, $sec & " seconds left before reboot." ) EndIf Next Shutdown(2) ; Reboot pc EndFunc If there is also a button the shutdown progress can take right away and you don't have to wait. ServicesPE|LoadVMDK Link to comment Share on other sites More sharing options...
Bert Posted November 6, 2006 Share Posted November 6, 2006 (edited) You could use Opt("GUIOnEventMode", 1) to control the buttons, and when clicked, it would do what you need.I looked at your code, and had a better idea. Just use a hotsetkey to do what you need.HotKeySet("^!x", "_exit") Shutdowntimer(10) Func ShutdownTimer($Time) local $hr = $Time/60 local $sec = $Time * 60 local $step = 100 / $sec ProgressOn("", "Reboot Time in : " & $sec & " seconds", "", -1, -1, 16) For $i = 0 To 100 Step $step $sec = $sec - 1 $Time = round($Time - 1/60, 2) Sleep(1000) If $Time > 2 Then ProgressSet($i, $Time & " minutes left before reboot." ) Else ProgressSet($i, $sec & " seconds left before reboot." ) EndIf Next ;Shutdown(2) ; Reboot pc EndFunc func _Exit() Exit EndFunc Edited November 6, 2006 by vollyman The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Bert Posted November 6, 2006 Share Posted November 6, 2006 A second thought is to dock a toolbar to it. The Vollatran project My blog: http://www.vollysinterestingshit.com/ 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