Niabolix Posted November 4, 2012 Share Posted November 4, 2012 Hey, I'm a amateur with autoit and new on the forums. (never registered until today, but have been reading alot on this forum the last 3 years ) I have maked some simple programs and i am learning everyday and enjoy when i get a problem solved ( like a puzzle ) The way i try to learn Autoit is create simple programs and figuring everything out check other people's scripts trying to understand it I am trying to create a simple program for a friend a train schema where he can enter all the weight he lifts and such things and when he is done training a button to save the training to a notepad file and call it after the date so after a while we can check the progress. I got that all done but now i want on the Gui form a clock a digital one i used the @macros for time and date but the time stays at the same time when i opened my program my qeustion is how can i make the clock be like a clock Thanks Link to comment Share on other sites More sharing options...
JohnOne Posted November 4, 2012 Share Posted November 4, 2012 i used the @macros for time and date but the time stays at the same time when i opened my programShow your code for this, you will get faster help. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Niabolix Posted November 4, 2012 Author Share Posted November 4, 2012 This is my frozen clock and date $time = @hour & ":" & @MIN $Labeltime = GUICtrlCreateLabel($time, 900, 40, 200, 30, 1, BitOR($WS_EX_CLIENTEDGE,$WS_EX_STATICEDGE)) GUICtrlSetFont(-1, 15, 400, 0, "Arial") GUICtrlSetBkColor(-1, 0x000000) GUICtrlSetColor(-1, 0xFF0000) $date = @MDAY & " - " & @MON & " - " & @YEAR $Labeldate = GUICtrlCreateLabel($date, 875, 5, 250, 30, 1, BitOR($WS_EX_CLIENTEDGE,$WS_EX_STATICEDGE)) GUICtrlSetFont(-1, 15, 400, 0, "Arial") GUICtrlSetBkColor(-1, 0x000000) GUICtrlSetColor(-1, 0xFF0000) I have nothing else yet for the clock i have been googling many terms but didnt find any yet about how to make it active Is there is some otherway to show a digital clock like you can do with a calender ? $Date1 = GUICtrlCreateDate("2012/11/05 00:31:52", 256, 200, 561, 169) Thanks Link to comment Share on other sites More sharing options...
JohnOne Posted November 5, 2012 Share Posted November 5, 2012 A gui usually has a msg loop to keep it alive. In that msg loop you will need to update your label with GUICtrlSetData() AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
kylomas Posted November 5, 2012 Share Posted November 5, 2012 Niabolix,I am trying to create a simple program for a friend a train schema where he can enter all the weight he lifts and such things and when he is done training a button to save the training to a notepad file and call it after the date so after a while we can check the progress.I got that all donePost what you have "all done" and I'll help you put a digital clock on it.kylomas Forum Rules Procedure for posting code "I like pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals." - Sir Winston Churchill 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