JellyFish666 Posted May 6, 2008 Posted May 6, 2008 (edited) for some reason this works, but doesn't feel right, it should add 10 each time but the first time you run it and hit the button it jumps to 20 and then it works normal and then after a couple clicks it jumps again and it doesn't seem to be working fast enough either, am I doing something wrong. #include <GUIConstants.au3> $gui = GUICreate("", 100, 65) $lvl = GUICtrlCreateLabel("0", 0, 0, 36, 17) $exp = GUICtrlCreateLabel("10", 80, 0, 36, 17) $bar = GUICtrlCreateProgress(0 , 20 , 100 , 20) $click = GUICtrlCreateButton("Click", 0, 40, 75, 25, 0) GUISetState(@SW_SHOW) While 1 $Msg = GUIGetMsg() Switch $Msg Case $GUI_EVENT_CLOSE Exit Case $click If GUICtrlRead($bar) >= 100 Then GUICtrlSetData($lvl , GUICtrlRead($lvl) +1) GUICtrlSetData($bar , 0) Else GUICtrlSetData($bar , GUICtrlRead($bar) + GUICtrlRead($exp)) EndIf EndSwitch WEnd well I am at it is there away to stop enter from being pushed on the button besides checking for the enter as a hotkey such as a button style? sorry the post isn't neat I got to run to school. Edited May 6, 2008 by JellyFish666
monoceres Posted May 6, 2008 Posted May 6, 2008 I have no problems, goes from 1-100 with 10 step and then goes from 1-100 again. I have no idea why it's not working for you Broken link? PM me and I'll send you the file!
JellyFish666 Posted May 6, 2008 Author Posted May 6, 2008 (edited) I have no problems, goes from 1-100 with 10 step and then goes from 1-100 again.I have no idea why it's not working for you oh no it works for me but it jumps sometimes to 20 instead of 10 (its lunchtime so can't fix it right now) and when I click it really fast it doesn't seem to update quickly I think there might be a better way to add it, my way is just the easy way.guess progress bars are for only 100% I need to make a custom one. Edited May 6, 2008 by JellyFish666
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