Jump to content
Sign in to follow this  
SuperAutoit

Progress bar

Recommended Posts

SuperAutoit

Hi all! :) i have a problem with my Progress bar..

This is my code (just a small part)

$nbfois = GUICtrlCreateInput("Nombre de fois", 24, 144, 153, 21)
$progressbar_traitement = GUICtrlCreateProgress(48, 400, 121, 33)

For $i = 1 To $s Step 1
GUICtrlSetData($progressbar_traitement, $i)


Next

The problem is if $1 = More to 100 the progress bar not work corectly..

What can i do?

Thanks

Share this post


Link to post
Share on other sites
SuperAutoit

Thanks for your answer :)

But i dont understand.. i want to get $i more to 100 but with the progress bar..

i Put

GUICtrlSetLimit ( $progressbar_traitement, 999, 100)

And its doesnt work..

Thanks for your help

Share this post


Link to post
Share on other sites
rliiack

hmmm... why do you set the minimum to 100?

By setting it from 100 to 999, you cannot set data if your $i starts on 1, since the minimum is 100.

:)


My Projects:Smart Icons

Share this post


Link to post
Share on other sites
SuperAutoit

Im try with

GUICtrlSetLimit ( $progressbar_traitement, 10,10 )

GUICtrlSetLimit ( $progressbar_traitement, 100,100 )

GUICtrlSetLimit ( $progressbar_traitement, 100,999 )

And is no effect on my Progress bar..

Thanks for your help :)

Share this post


Link to post
Share on other sites
rliiack

Sorry, I think I told you to use the wrong function. :) I don't think you can set the progress bar to a different value other than 1 to 100.


My Projects:Smart Icons

Share this post


Link to post
Share on other sites
SuperAutoit

No its not the problem!! My problem is if the $s= More to 100 the program continue to run and the progress bar is at 100%

Thanks for your help

Share this post


Link to post
Share on other sites
Malkey

Hi all! :) i have a problem with my Progress bar..

This is my code (just a small part)

$nbfois = GUICtrlCreateInput("Nombre de fois", 24, 144, 153, 21)
$progressbar_traitement = GUICtrlCreateProgress(48, 400, 121, 33)

For $i = 1 To $s Step 1
GUICtrlSetData($progressbar_traitement, $i)


Next

The problem is if $1 = More to 100 the progress bar not work corectly..

What can i do?

Thanks

Instead of
GUICtrlSetData($progressbar_traitement, $i)

Try

GUICtrlSetData($progressbar_traitement, $i * 100 / $s)

Share this post


Link to post
Share on other sites
SuperAutoit

I have found

GUICtrlSetData($progressbar_traitement, $i/(0.01*$s))

and its work!!

THANKS :)

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.