#cs -----Small Things entertain Small Minds!----- -----Annoying little script put together by Shane Thompson because he has nothing better to do with his time... pretty sad, eh? -----I thought so two. grr who put that there? By the way, whoever you are, you are using the wrong to/too/two. It should be to. And its only annoying because u didn't know about how that mouse thing worked :P (neither did I, admitted it :D) #ce #include <GUIConstantsEX.au3> Opt("MustDeclareVars", 1) Global $winhandle, $infotext, $percent = 0, $progress, $submit = 2, $direction $winhandle = GUICreate("Small Minds", 300, 100) $infotext = GUICtrlCreateLabel("Overall Program Completion... " & $percent & " percent", 10, 180) $progress = GUICtrlCreateProgress(30, 30, 250) GUISetState() While 1 if $percent < 100 Then $direction = 1 Else $direction = 0 EndIf While $direction GUICtrlDelete($infotext) $percent += 0.05 $infotext = GUICtrlCreateLabel("Overall Program Completion... " & $percent & " percent", 10, 180) GUICtrlSetData($progress, $percent) if $percent >= 100 Then $direction = 0 EndIf if GUIGetMsg() = $GUI_EVENT_CLOSE Then Exit EndIf WEnd While $direction = 0 GUICtrlDelete($infotext) $percent -= 0.05 $infotext = GUICtrlCreateLabel("Overall Program Completion... " & $percent & " percent", 10, 180) GUICtrlSetData($progress, $percent) if $percent <= 0 Then $direction = 1 EndIf if GUIGetMsg() = $GUI_EVENT_CLOSE Then Exit EndIf WEnd if $percent = 100 Then sleep(500) $submit = GUICtrlCreateButton("Exit", 250, 70, 40) EndIf if GUIGetMsg() = $GUI_EVENT_CLOSE or GUIGetMsg() = $submit Then Exit EndIf WEnd
shanet
--EDIT: A fun little bug I found... If you move the mouse, the progress bar speeds up! PHUN!
Edited by shanet, 06 April 2011 - 01:58 PM.






