abiteric Posted December 19, 2008 Share Posted December 19, 2008 #include <GUIConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 211, 143, 659, 618) $Input1 = GUICtrlCreateInput("Input1", 64, 24, 129, 21) $Input2 = GUICtrlCreateInput("Input2", 64, 56, 129, 21) $Label1 = GUICtrlCreateLabel("text_1", 16, 24, 33, 17) $Label2 = GUICtrlCreateLabel("text_2", 16, 56, 33, 17) $Button1 = GUICtrlCreateButton("Button1", 64, 96, 81, 33, 0) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEndif i want to type something in $Input1 and after press ENTER by (no keyboard) then focus to $input2how can i make it ? need some help....ps: don`t use InputBox My website about Y-mate 網拍輔助程式 : http://www.L2play.comMy Blog ( Tranditional Chinese ) 開發小組的部落格 : http://tw.myblog.yahoo.com/play19990909 Link to comment Share on other sites More sharing options...
martin Posted December 19, 2008 Share Posted December 19, 2008 (edited) #include <GUIConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 211, 143, 659, 618) $Input1 = GUICtrlCreateInput("Input1", 64, 24, 129, 21) $Input2 = GUICtrlCreateInput("Input2", 64, 56, 129, 21) $Label1 = GUICtrlCreateLabel("text_1", 16, 24, 33, 17) $Label2 = GUICtrlCreateLabel("text_2", 16, 56, 33, 17) $Button1 = GUICtrlCreateButton("Button1", 64, 96, 81, 33, 0) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd if i want to type something in $Input1 and after press ENTER by ps: don`t use InputBoxOne way is with an accelerator #include <GUIConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 211, 143, 659, 618) $Input1 = GUICtrlCreateInput("Input1", 64, 24, 129, 21) $Input2 = GUICtrlCreateInput("Input2", 64, 56, 129, 21) $Label1 = GUICtrlCreateLabel("text_1", 16, 24, 33, 17) $Label2 = GUICtrlCreateLabel("text_2", 16, 56, 33, 17) $Button1 = GUICtrlCreateButton("Button1", 64, 96, 81, 33, 0) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### Dim $AccelKeys[1][2]=[["{ENTER}", $Input1]] GUISetAccelerators($AccelKeys) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Input1 ControlFocus($Form1,"","Edit2") Send("{END}") EndSwitch WEnd Edited December 19, 2008 by martin Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. 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