Sign in to follow this  
Followers 0
Jussip

Progress

6 posts in this topic

How i can make this working?

I dont wanna open other progress window..

#include <GUIConstants.au3>
$Form1 = GUICreate("Progress", 198, 91, 193, 125)
$Progress1 = GUICtrlCreateProgress(16, 16, 150, 17)
$Process = GUICtrlCreateButton("Progress on!", 24, 48, 75, 25, 0)
GUISetState(@SW_SHOW)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

        Case $Process
    EndSwitch
WEnd

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

#include <GUIConstants.au3>
$Form1 = GUICreate("Progress", 198, 91, 193, 125)
$Progress1 = GUICtrlCreateProgress(16, 16, 150, 17)
$Process = GUICtrlCreateButton("Progress on!", 24, 48, 75, 25, 0)
GUISetState(@SW_SHOW)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

        Case $Process
            For $i = 1 To 100
               GuiCtrlSetData($progress, $i)
               Sleep(250)
            Next
    EndSwitch
WEnd

edit: Bug fix

Edited by i542

I can do signature me.

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

#include <GUIConstants.au3>
$Form1 = GUICreate("Progress", 198, 91, 193, 125)
$Progress1 = GUICtrlCreateProgress(16, 16, 150, 17)
$Process = GUICtrlCreateButton("Progress on!", 24, 48, 75, 25, 0)
GUISetState(@SW_SHOW)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

        Case $Process
            For $i = 1 To 100
               GuiCtrlSetData($progress, 1)
               Sleep(250)
            Next
    EndSwitch
WEnd
Thanks, but the progress bar isnt moving? Edited by Jussip

Share this post


Link to post
Share on other sites

change

GuiCtrlSetData($progress, 1)

to

GuiCtrlSetData($progress, $1)
*coughs* to $i :P

I can do signature me.

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