SuperAutoit Posted November 11, 2009 Share Posted November 11, 2009 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 Link to comment Share on other sites More sharing options...
rliiack Posted November 11, 2009 Share Posted November 11, 2009 (edited) Set the limit of progress bar to a higher number.GUICtrlSetLimit(controlID, max [, min] ) Edited November 11, 2009 by rliiack My Projects:Smart Icons Link to comment Share on other sites More sharing options...
SuperAutoit Posted November 11, 2009 Author Share Posted November 11, 2009 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 Link to comment Share on other sites More sharing options...
rliiack Posted November 11, 2009 Share Posted November 11, 2009 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 Link to comment Share on other sites More sharing options...
SuperAutoit Posted November 11, 2009 Author Share Posted November 11, 2009 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 Link to comment Share on other sites More sharing options...
rliiack Posted November 11, 2009 Share Posted November 11, 2009 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 Link to comment Share on other sites More sharing options...
SuperAutoit Posted November 11, 2009 Author Share Posted November 11, 2009 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 Link to comment Share on other sites More sharing options...
Malkey Posted November 11, 2009 Share Posted November 11, 2009 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) Link to comment Share on other sites More sharing options...
SuperAutoit Posted November 11, 2009 Author Share Posted November 11, 2009 I have found GUICtrlSetData($progressbar_traitement, $i/(0.01*$s)) and its work!! THANKS Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now