Jump to content

progress bar


Recommended Posts

well if smoke and shevilli arnt still mad at me i need some help. I figured out alot of stuff that i needed but i couldnt figure out one thing.

How to make a progress bar start going down/up when a window opens

Oh ya is there a way where i can have a random selection of more then 2 msgbox's?

any help would be appreciated

Thanks!

toothy

p.s. sorry for being annoying...unless im still being annoying then my sorry means nothing to some ppl 0.o

Edited by toothyXdip
---╔╦═╗╔╗'''╔╗╔═╦═╗╔╦═╗---╝╠═╣╝║'''║╝╝''''''╝╝║'''......''''''''''''''''''''''''''''''---╔╩═╩═╩═╩═══╩═╦═╩═╩══╦══════╗''''╔╩════════════╩══╗╔══╩══╗╔══╝ ''''''''''''''''''''''''''''''''''''''''''''''''''''║║'''''''''''''''║║ ''''''''''''''''''''''''''''''''''''''''''''''╔══╝╚══╗''''''║║''''''''''''''''''''''''''''''''''''''''''''''╚══════╝''''''╚╝
Link to comment
Share on other sites

i deleted what ii tryed before so it was a little different then this but this is what it was close to...and all i want to do is have 4 progress bars on a page that go up and down with a set amount of time between each bar

This is a rough:

#include <GUIConstants.au3>

GUICreate("My GUI",220,100, 100,200)
$progressbar = GUICtrlCreateProgress (10,40,200,20)
GUISetState ()

While 1
    Do $data - 1
        For $data = GUICtrlSetData($progressbar, 100)
        Until
        ExitLoop
    WEnd
---╔╦═╗╔╗'''╔╗╔═╦═╗╔╦═╗---╝╠═╣╝║'''║╝╝''''''╝╝║'''......''''''''''''''''''''''''''''''---╔╩═╩═╩═╩═══╩═╦═╩═╩══╦══════╗''''╔╩════════════╩══╗╔══╩══╗╔══╝ ''''''''''''''''''''''''''''''''''''''''''''''''''''║║'''''''''''''''║║ ''''''''''''''''''''''''''''''''''''''''''''''╔══╝╚══╗''''''║║''''''''''''''''''''''''''''''''''''''''''''''╚══════╝''''''╚╝
Link to comment
Share on other sites

this is out the help file

#include <GUIConstants.au3>

GUICreate("My GUI Progressbar",220,100, 100,200)
$progressbar1 = GUICtrlCreateProgress (10,10,200,20)
GUICtrlSetColor(-1,32250); not working with Windows XP Style
$progressbar2 = GUICtrlCreateProgress (10,40,200,20,$PBS_SMOOTH)
$button = GUICtrlCreateButton ("Start",75,70,70,20)
GUISetState ()

$wait = 20; wait 20ms for next progressstep
$s = 0; progressbar-saveposition
do
$msg = GUIGetMsg()
If $msg = $button Then
    GUICtrlSetData ($button,"Stop")
    For $i = $s To 100
    If GUICtrlRead($progressbar1) = 50 Then Msgbox(0,"Info","The half is done...", 1)
    $m = GUIGetMsg ()
    
    If $m = -3 Then ExitLoop
    
    If $m = $button Then
      GUICtrlSetData ($button,"Next")
      $s = $i;save the current bar-position to $s
      ExitLoop
    Else
        $s=0
      GUICtrlSetData ($progressbar1,$i)
      GUICtrlSetData ($progressbar2,(100 - $i))
      Sleep($wait)
    EndIf
    Next
    if $i >100 then
;       $s=0
        GUICtrlSetData ($button,"Start")
    endif
EndIf
until $msg = $GUI_EVENT_CLOSE

some of my scripts check them out and give feedback so i can learn from them :)autoclicker a autoclickernote taker a script to take notes with

Link to comment
Share on other sites

can i make that where it starts as soon as you open the window and not when you press start?

---╔╦═╗╔╗'''╔╗╔═╦═╗╔╦═╗---╝╠═╣╝║'''║╝╝''''''╝╝║'''......''''''''''''''''''''''''''''''---╔╩═╩═╩═╩═══╩═╦═╩═╩══╦══════╗''''╔╩════════════╩══╗╔══╩══╗╔══╝ ''''''''''''''''''''''''''''''''''''''''''''''''''''║║'''''''''''''''║║ ''''''''''''''''''''''''''''''''''''''''''''''╔══╝╚══╗''''''║║''''''''''''''''''''''''''''''''''''''''''''''╚══════╝''''''╚╝
Link to comment
Share on other sites

#include <GUIConstants.au3>

GUICreate('Progress GUI', 300, 40)
$pro = GUICtrlCreateProgress(50, 10, 240, 20)
$btn = GUICtrlCreateButton('Go!', 10, 10, 30, 20)

GUISetState()

ControlClick('Progress GUI', '', $btn)

While 1
    $msg = GUIGetMsg()
    Switch $msg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $btn
            For $i = 0 To 150
                GUICtrlSetData($pro, $i / 150 * 100)
                Sleep(10)
            Next
            For $i = 150 To 0 Step - 1
                GUICtrlSetData($pro, $i / 150 * 100)
                Sleep(10)
            Next
    EndSwitch
WEnd

You need to do some serious reviewing of For...Next and Do...Until loops in the help file.

Edited by xcal
Link to comment
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
 Share

  • Recently Browsing   0 members

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