lampel Posted September 16, 2016 Share Posted September 16, 2016 hello all , i am a begginer at autoit , i have a gui with 18 input boxes , for added data input speed is it possible that when the user input a 3 character long string into one of the input boxes the curser will auto move to the next input box , this is what happens when i press the tab key but i dont want to use it what i do today : i enter 3 char data into one of the input boxes, then i press tab to move to the next input box thanks lampel. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted September 16, 2016 Moderators Share Posted September 16, 2016 @lampel you have to decide what criteria tells the script to advance. For example, this snippet will advance once the max number of characters is reached in each input field. #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <GuiEdit.au3> Local $sString = "" Local $hGUI = GUICreate("IP Address", 250, 100) Local $inpOct1 = GUICtrlCreateInput("", 40, 20, 50, 20) GUICtrlSetLimit(-1, 3) Local $inpOct2 = GUICtrlCreateInput("", 100, 20, 50, 20) GUICtrlSetLimit(-1, 3) Local $inpOct3 = GUICtrlCreateInput("", 160, 20, 50, 20) GUICtrlSetLimit(-1, 3) Local $btnGO = GUICtrlCreateButton("Go", 100, 60, 50, 25) GUIRegisterMsg($WM_COMMAND, "WM_COMMAND") GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $btnGO $sString = GUICtrlRead($inpOct1) & "." & GUICtrlRead($inpOct2) & "." & GUICtrlRead($inpOct3) MsgBox(0, "IP Address is:", $sString) EndSwitch WEnd Func WM_COMMAND($hWnd, $Msg, $wParam, $lParam) $nNotifyCode = BitShift($wParam, 16) $nID = BitAnd($wParam, 0x0000FFFF) Switch $nNotifyCode Case $EN_UPDATE If StringLen(GUICtrlRead($nID)) = 3 Then GUICtrlSetState($nID+1, $GUI_FOCUS) EndSwitch EndFunc "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
lampel Posted September 16, 2016 Author Share Posted September 16, 2016 Thank you so much JLogan3o13 , this is exactly what i wanted ! thanks lampel Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted September 16, 2016 Moderators Share Posted September 16, 2016 Glad it worked for you "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! 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