Sign in to follow this  
Followers 0
bhodi78

How can i sincronize the progress bar with the for loop?

4 posts in this topic

I wish that when appear the message box "finish", the progress bar is at its 100%. How can I sync?

#include <GUIConstantsEx.au3>
#requireadmin

$Form           =  GUICreate("GUI",450,200)
$Button_find    =  GUICtrlCreateButton("Find",180,100,50,20)
$progressbar    =  GUICtrlCreateProgress(10, 150, 430, 20)
GUISetState(@SW_SHOW)

While 1
  $Msg = GUIGetMsg()
  Switch $Msg
    Case $Button_find
        start()
    Case $GUI_EVENT_CLOSE
        Exit
  EndSwitch
WEnd


Func start()
    For $i=0 To 50
        GUICtrlSetData($progressbar,$i)
        Sleep(100)
    Next
    MsgBox(0,"Finish","Finish")
EndFunc

Thanks bye!!

Share this post


Link to post
Share on other sites



:):party: Perfect!!!

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0