friends Posted September 20, 2004 Posted September 20, 2004 hi all. I created 2 GUI input (not inputbox), 1st input can accept only 4 integers, while 2nd input can accept only 2 integers. My questions : 1) How can I make the input once filled in, it automatically jumps to the 2nd input without the need to move the mouse and click on 2nd input ? 2) Can we press "ENTER" in the input field and it jumps to the next input field ? If so... how can we make it ? Any working example ? I need your help on this input things.... as this is my first time to use input. Your help is very much appreciated. Thanks
CyberSlug Posted September 20, 2004 Posted September 20, 2004 Tab key should already work for jumping to the next input.... It would help to see what you already have, but here's an attempt anyway: expandcollapse popup#cs - ### Generated by AutoBuilder 0.4 -- do not modify ### 394 278 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 input $input_1 Input 1 50 40 200 20 0 0 input $input_2 Input 2 50 120 200 20 0 0 #ce - ### End of Dump ### ;Script generated by AutoBuilder 0.4 Opt("WinTitleMatchMode", 4);advanced Opt("GUINotifyMode", 1) $handle = GuiCreate("MyGUI", 392,273,(@DesktopWidth-392)/2, (@DesktopHeight-273)/2 , 0x04CF0000) $input_1 = GUISetControl("input", "", 50, 40, 200, 20) GUISetControlEx($input_1, 256) ;value to give control default focus $input_2 = GUISetControl("input", "", 50, 120, 200, 20) GuiShow() While 1 sleep(100) $msg = GuiMsg(0) ;Enable Enter hotkey only when GUI is active If WinActive("handle=" & $handle) Then HotKeySet("{Enter}", "JumpFocus");register hotkey Else HotKeySet("{Enter}");un-register EndIf Select Case $msg = -3 Exit Case $msg = $input_1 ;;; Case $msg = $input_2 ;;; EndSelect WEnd Exit Func JumpFocus() ; Requires the newest betas of AutoIt that support GUI Ref Numbers in ControlFocus ControlFocus("handle=" & $handle, "", $input_2) EndFunc Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
friends Posted September 20, 2004 Author Posted September 20, 2004 thanks for the example.... I'll try it out !
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