Rad Posted October 25, 2006 Share Posted October 25, 2006 Im trying to convert my $Hour $Min $Sec to the time returned by _TicksToTime using: $TrackBar = GUICtrlCreateSlider(43, 21, 145, 17, BitOR($TBS_BOTH,$TBS_NOTICKS)) GUICtrlSetLimit($TrackBar, _TimeToTicks($Duration[2], $Duration[1], $Duration[0]),0)oÝ÷ Ø;«jب Now I have 2 questions: Why is my trackbar locking up? How do I make it return 00:02:50 instead of 0:2:50 (I dont understand the StringFormat information... lots of big words in there! ) Link to comment Share on other sites More sharing options...
Rad Posted October 25, 2006 Author Share Posted October 25, 2006 Bump, I dont know if its just the format or maybe the ticks are returning as a string... I dont know how to test that though Link to comment Share on other sites More sharing options...
newb_powa' Posted October 25, 2006 Share Posted October 25, 2006 (edited) I don't know if that could help you, and there will probably someone who will find a better way to resolve the problem ... but i will suggest a simple If statement $zerodur2 = "" If $Duration2 < 10 then $zerodur2 = 0 Endif If $Duration2 > 9 then $zerodur2 = "" Endif $zerodur1 = "" If $Duration1 < 10 then $zerodur1 = 0 Endif If $Duration1 > 9 then $zerodur1 = "" Endif This will only add a "0" before your string when it need it (e.g smaller than 9) Edited October 25, 2006 by newb_powa' 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