Pain Posted June 6, 2008 Posted June 6, 2008 This is a part of one of my script ........ $start = GUICtrlCreateInput("", 50, 22, 120, 21) GUICtrlSetData(-1, "00:00") ....... I only want to be able to type in a time, like 18:20, because later I use the time with a _DateDiff so it needs to be written in that way. I can't use $es_number because of the ":" and I it would look stupid if I wrote 1820 and later use stringsplit to get the time.
Zedna Posted June 6, 2008 Posted June 6, 2008 Try to use standard Date control and set appropriate format. $dt_datum_od = GUICtrlCreateDate("", 480, 48, 82, 21, $DTS_SHORTDATEFORMAT) GuiCtrlSendMsg($dt_datum_od, $DTM_SETFORMAT, 0, "hh:mm"); dd.MM.yyyy Resources UDF ResourcesEx UDF AutoIt Forum Search
Pain Posted June 6, 2008 Author Posted June 6, 2008 thanks, I changed the $DTS_SHORTDATEFORMAT to $DTS_TIMEFORMAT and removed the second line since I only wanted the time and your script returned with the day "6" because it's 6 june. btw is it possible to remove the up and down arrow?
rover Posted June 7, 2008 Posted June 7, 2008 (edited) $hGUI = GUICreate("DateTimePick", 400, 300) GUICtrlCreateDate("", 20, 20, 90, 20, $DTS_TIMEFORMAT) ControlHide($hGUI, "", "msctls_updown321") keyboard arrow keys still select and increment/decrement selected value in DTP control Edited June 7, 2008 by rover I see fascists...
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