Thornhunt Posted August 9, 2007 Share Posted August 9, 2007 look .. most pple will call me a noob but i dont care ..we all haft to start somewere what i need is a progress bar that will run on its own .. like a timer kinda thing.... so when the timer is on 34 seconds the progress bar will be 34% finished ... do you understand what i mean ? and can anybody help me ?.. iv only been on it 3 days now:( tnks Budweiser + room = warm beerwarm beer + fridge = too long!warm beer + CO2 fire extinguisher = Perfect![quote]Protect the easly offended ... BAN EVERYTHING[/quote]^^ hmm works for me :D Link to comment Share on other sites More sharing options...
weaponx Posted August 9, 2007 Share Posted August 9, 2007 (edited) If your progress bar is showing 34% and it's 34 seconds i'm assuming its counting up to 100? Edited August 9, 2007 by weaponx Link to comment Share on other sites More sharing options...
weaponx Posted August 9, 2007 Share Posted August 9, 2007 (edited) Merry X-Mas, bub. expandcollapse popup#include <GUIConstants.au3> GUICreate("Timer", 400, 100) ; will create a dialog box that when displayed is centered GUISetState (@SW_SHOW) ; will display an empty dialog box $PB = GUICtrlCreateProgress (10,10,340,20) $LBLPERCENT = GUICtrlCreateLabel ( "0%", 360, 13, 30, 20 ) GUICtrlCreateLabel ( "Time (seconds)", 10, 43, 80, 20 ) $TIME = GUICtrlCreateInput ("100", 90, 40, 70, 20) GUICtrlCreateLabel ( "Time remaining", 200, 43, 80, 20 ) $TIMEREMAIN = GUICtrlCreateInput ("100", 280, 40, 70, 20) $BTNSTART = GUICtrlCreateButton ("Start", 160, 70, 80) Func BEGIN() $STAMP = TimerInit () Do $DIFFERENCE = Int(TimerDiff ($STAMP) / 1000) $REMAIN = Int(GuiCtrlRead($TIME) - $DIFFERENCE) $PERCENT = Int( ($DIFFERENCE / GuiCtrlRead($TIME)) * 100) GuiCtrlSetData($TIMEREMAIN, $REMAIN) GuiCtrlSetData($PB, $PERCENT) GuiCtrlSetData($LBLPERCENT, $PERCENT & "%") Until $DIFFERENCE >= GuiCtrlRead($TIME) EndFunc ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() Switch $msg Case $BTNSTART BEGIN() EndSwitch If $msg = $GUI_EVENT_CLOSE Then ExitLoop Wend Edited August 9, 2007 by weaponx Link to comment Share on other sites More sharing options...
Thornhunt Posted August 10, 2007 Author Share Posted August 10, 2007 Merry X-Mas, bub. expandcollapse popup#include <GUIConstants.au3> GUICreate("Timer", 400, 100) ; will create a dialog box that when displayed is centered GUISetState (@SW_SHOW) ; will display an empty dialog box $PB = GUICtrlCreateProgress (10,10,340,20) $LBLPERCENT = GUICtrlCreateLabel ( "0%", 360, 13, 30, 20 ) GUICtrlCreateLabel ( "Time (seconds)", 10, 43, 80, 20 ) $TIME = GUICtrlCreateInput ("100", 90, 40, 70, 20) GUICtrlCreateLabel ( "Time remaining", 200, 43, 80, 20 ) $TIMEREMAIN = GUICtrlCreateInput ("100", 280, 40, 70, 20) $BTNSTART = GUICtrlCreateButton ("Start", 160, 70, 80) Func BEGIN() $STAMP = TimerInit () Do $DIFFERENCE = Int(TimerDiff ($STAMP) / 1000) $REMAIN = Int(GuiCtrlRead($TIME) - $DIFFERENCE) $PERCENT = Int( ($DIFFERENCE / GuiCtrlRead($TIME)) * 100) GuiCtrlSetData($TIMEREMAIN, $REMAIN) GuiCtrlSetData($PB, $PERCENT) GuiCtrlSetData($LBLPERCENT, $PERCENT & "%") Until $DIFFERENCE >= GuiCtrlRead($TIME) EndFunc ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() Switch $msg Case $BTNSTART BEGIN() EndSwitch If $msg = $GUI_EVENT_CLOSE Then ExitLoop Wend wow .. its perfect thank u .. helped me alot Budweiser + room = warm beerwarm beer + fridge = too long!warm beer + CO2 fire extinguisher = Perfect![quote]Protect the easly offended ... BAN EVERYTHING[/quote]^^ hmm works for me :D 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