kaz Posted April 23, 2007 Share Posted April 23, 2007 Hello from france I created a progress bar with : $progressbar = GUICtrlCreateProgress (6,170,450,10) i count a file number and i want to set the max of my progress with this file number. i try GUICtrlSetLimit($progressbar,$my_number,0) but it doesn't work!! Is it really possible to change the max by code or i did something wrong ?? Link to comment Share on other sites More sharing options...
SalazarCheats Posted April 23, 2007 Share Posted April 23, 2007 (edited) Hello from france I created a progress bar with : $progressbar = GUICtrlCreateProgress (6,170,450,10)i count a file number and i want to set the max of my progress with this file number.i try GUICtrlSetLimit($progressbar,$my_number,0)but it doesn't work!!Is it really possible to change the max by code or i did something wrong ??ok i think me and lots of other could help IF you posted the whole script Edited April 23, 2007 by SalazarCheats Ok im 14 with a spelling age of a 9 year old... that explanes all my spelling mistakes Link to comment Share on other sites More sharing options...
Bert Posted April 23, 2007 Share Posted April 23, 2007 You can do a search of the forum to see what others have done. There are lots of examples available. The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
kaz Posted April 23, 2007 Author Share Posted April 23, 2007 I wrote a simply script to test but nothing expandcollapse popup#include <GUIConstants.au3> GUICreate("My GUI Progressbar",220,100, 100,200) $progressbar1 = GUICtrlCreateProgress (10,10,200,20) GUICtrlSetLimit(-1,5,0) $button = GUICtrlCreateButton ("Start",75,70,70,20) GUISetState () $wait = 50; wait 20ms for next progressstep $s = 0 do $msg = GUIGetMsg() If $msg = $button Then GUICtrlSetData ($progressbar1,0) GUICtrlSetData ($button,"Stop") For $i = $s To 100 $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 GUICtrlSetData ($progressbar1,$i) Sleep($wait) EndIf if $i =5 then MsgBox(0,"help !","step 5 help !") endif Next if $i >100 then GUICtrlSetData ($button,"Start") $s = 0 endif EndIf until $msg = $GUI_EVENT_CLOSE Is this command correct : GUICtrlSetLimit(-1,5,0) ?? The progress bar should be at max with the value 5 !! Link to comment Share on other sites More sharing options...
Danny35d Posted April 23, 2007 Share Posted April 23, 2007 GUICtrlSetLimit() if you read the parameters section (Max and Min) you notice that only work with List, Input, Edit and UpDown controls. Don't think it work with GuiCtrlCreateProgress(). AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line Link to comment Share on other sites More sharing options...
PsaltyDS Posted April 23, 2007 Share Posted April 23, 2007 I wrote a simply script to test but nothing...Is this command correct : GUICtrlSetLimit(-1,5,0) ??The progress bar should be at max with the value 5 !!I don't know that GuiCtrlSetLimit() does anything for a progress bar. I think your script has to do the math so the data is always = x/100. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
kaz Posted April 23, 2007 Author Share Posted April 23, 2007 i had the solution x/100 or 100/ x for the step. But i recently see Koda_1.6.0.2 to generate gui and the code genrate by koda is GUICtrlSetLimit(-1,5,0) . A similar command exist in most language and i would try it. Thank a lot 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