nacerbaaziz Posted November 19, 2017 Posted November 19, 2017 hello please i need to link a progress bar with a time can you help me? e.g i want to set a progress bar for 10 sec am waiting for your answers thank you.
Developers Jos Posted November 19, 2017 Developers Posted November 19, 2017 11 minutes ago, nacerbaaziz said: i want to set a progress bar for 10 sec am waiting for your answers What have you tried that isn't working? Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Developers Jos Posted November 19, 2017 Developers Posted November 19, 2017 so you didn't open the helpfile as yet and searched for progress? Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
nacerbaaziz Posted November 19, 2017 Author Posted November 19, 2017 i know how to create a progress but i need to linke it with a timer i don't know how to do it can we do that?
Developers Jos Posted November 19, 2017 Developers Posted November 19, 2017 Thought the helpfile example was what you where looking for but guess I am not understanding what you want. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
nacerbaaziz Posted November 19, 2017 Author Posted November 19, 2017 I will try to explain to you Notice my brother I want to create a progress bar It is linked to a specific time For example, a progress bar offers a period of 10 seconds I will explain exactly what I want to do I want to close the computer after 10 seconds and give the user the option of canceling At this time I want to have a progress bar for time Greetings I apologize for the inconvenience and thank you in advancei know how to create a progress but i need to linke it with a timer i don't know how to do it can we do that?
Developers Jos Posted November 19, 2017 Developers Posted November 19, 2017 So you want something which is close to the GUICtrlCreateProgress() example? Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
nacerbaaziz Posted November 19, 2017 Author Posted November 19, 2017 i need to update the progress bar any sec I mean I want to link the progress bar to specific seconds
Au3Builder Posted November 19, 2017 Posted November 19, 2017 (edited) #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <ProgressConstants.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("shutdown by AU3Builder", 300, 133, 192, 124) $Progress1 = GUICtrlCreateProgress(16, 24, 209, 25) $Label1 = GUICtrlCreateLabel("", 112, 112, 21, 17) $Button1 = GUICtrlCreateButton(" Start Countdown", 64, 64, 105, 33) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 Countdown(20,20) EndSwitch WEnd Func Countdown($progressbar,$label) $I = 0 Do Sleep(1000) $I = $I + 1 $label = $label - 1 GUICtrlSetData($Progress1,$I/$progressbar*100) GUICtrlSetData($Label1,$label) Until $i = $progressbar EndFunc Here you are Edited November 19, 2017 by Au3Builder
nacerbaaziz Posted November 20, 2017 Author Posted November 20, 2017 thank you very much Can you add a Cancel button when the progress bar is in progress?i need to update the progress bar any sec I mean I want to link the progress bar to specific seconds
kylomas Posted November 20, 2017 Posted November 20, 2017 Quote Can you add a Cancel button when the progress bar is in progress? Not using the code above. Once the loop starts you are not processing messages. Quote I mean I want to link the progress bar to specific seconds Can you explain this further. Still unclear what you want to do. kylomas Forum Rules Procedure for posting code "I like pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals." - Sir Winston Churchill
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