Country73 Posted August 1, 2008 Share Posted August 1, 2008 (edited) Created a small GUI that has two input fields, for numeric input, created using GuiCtrlCreateInput + $ES_NUMBER. Set the size limit using GuiCtrlSetLimit Focused on the first input field by using $GUI_FOCUS Question: Once the first input field has reached it's limit, is there a control to automatically focus on the second input field? Example: Two input fields used to enter a specific time. First input = HOUR, Second input = MINUTE If you wanted to use 1130, then once you enter 11 in first input field I want the focus to automatically switch to second input field for 30. Any suggestions/assistance? Thanks, (This is for a manual entry by the end user) Edited August 7, 2008 by Country73 If you try to fail and succeed which have you done?AutoIt Forum Search Link to comment Share on other sites More sharing options...
youknowwho4eva Posted August 1, 2008 Share Posted August 1, 2008 could you do a character count on the input then use an if character count = # then statement? I can't think of the character count command off the top of my head though. Giggity Link to comment Share on other sites More sharing options...
Country73 Posted August 1, 2008 Author Share Posted August 1, 2008 Is it the: _GUICtrlEdit_LineLength ? I'm trying that out now. If you try to fail and succeed which have you done?AutoIt Forum Search Link to comment Share on other sites More sharing options...
JFee Posted August 1, 2008 Share Posted August 1, 2008 If that doesn't work then just do: StringLen(GUICtrlRead($input)) Regards,Josh Link to comment Share on other sites More sharing options...
youknowwho4eva Posted August 1, 2008 Share Posted August 1, 2008 Thanks JFee, thats the one I was thinking of. Giggity Link to comment Share on other sites More sharing options...
Country73 Posted August 1, 2008 Author Share Posted August 1, 2008 (edited) Boy, I need to stop looking for the difficult way in doing these things!Thank you JFee & youknowwho4evaWas able to work it out with this type of setup (In case anyone is interested):Function called as soon as the GUI is launched.First call to the function sends "HOUR"Second call to the function sends "MIN"Func runloop( $time ) IF $time = "HOUR" Then $vTime = $SD_Hour ;$SD_Hour is the first input field for the HOUR $nextStep = $SD_Min ;$SD_Min is the second input field for MINUTE ElseIf $time = "MIN" Then $vTime = $SD_Min $nextStep = $CTSet ;$CTSet is the SET button in the ChangeTime GUI EndIf DO $timeVar = StringLen( GUICtrlRead( $vTime ) ) Until $timeVar = 2 GUICtrlSetState( $nextStep, $GUI_FOCUS ) EndFunc Edited August 1, 2008 by Country73 If you try to fail and succeed which have you done?AutoIt Forum Search 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