Jump to content

Recommended Posts

Posted

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
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.

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
Posted

change

GuiCtrlSetData($progress, 1)

to

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

I can do signature me.

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...