StAbb Posted July 3, 2008 Posted July 3, 2008 Hey does anyone know of a way to make it so that after you fill out some input boxes in a form with a button, you just press {enter} and have that click the "Submit" button or whatever the button is? Thanks in advance!
tlokz Posted July 3, 2008 Posted July 3, 2008 This will give you an example While 1 Sleep(100) If _IsPressed("{Enter}") Then _Submit() WEnd
StAbb Posted July 3, 2008 Author Posted July 3, 2008 Thanks so much man, I forgot all about the _IsPressed function. Thanks again! Haha.
tlokz Posted July 3, 2008 Posted July 3, 2008 Thanks so much man, I forgot all about the _IsPressed function. Thanks again! Haha.Your Welcome muttley
yucatan Posted July 4, 2008 Posted July 4, 2008 Your Welcome muttleyhi mate i have the same problem but what does _Submit() then ?
ProgAndy Posted July 4, 2008 Posted July 4, 2008 You could also use GUISetAccelerators: CODE; A simple custom messagebox that uses the MessageLoop mode #include <GUIConstantsEx.au3> GUICreate("Custom Msgbox", 210, 80) GUICtrlCreateLabel("Please click ENTER! Or SHIFT-ENTER", 10, 10) $SHIFT_ENTERDUMMY = GUICtrlCreateDummy() $ENTERBUTTON = GUICtrlCreateButton("Press Enter",10,30,100,30) ; Set accelerators for Ctrl+y and Ctrl+n Dim $AccelKeys[2][2]=[["{ENTER}", $ENTERBUTTON], ["+{ENTER}", $SHIFT_ENTERDUMMY]] GUISetAccelerators($AccelKeys) GUISetState() ; display the GUI Do $msg = GUIGetMsg() Select Case $msg = $ENTERBUTTON MsgBox(0, "You clicked on", "ENTER Button") Case $msg = $SHIFT_ENTERDUMMY MsgBox(0, "You clicked on", "Shift Enter Hotkey Dummy") Case $msg = $GUI_EVENT_CLOSE MsgBox(0, "You clicked on", "Close") EndSelect Until $msg = $GUI_EVENT_CLOSE *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes
Feonixx Posted July 5, 2008 Posted July 5, 2008 hi mate i have the same problem but what does _Submit() then ?@ Yucatanit does exactly what it says, it sets the key {ENTER} that when pressed will _Sumbit all the data entered in the fields.
Paulie Posted July 5, 2008 Posted July 5, 2008 Woah woah Has no one seen this style? $BS_DEFPUSHBUTTON Creates a push button with a heavy black border. If the button is in a dialog box, the user can select the button by pressing the ENTER key, even when the button does not have the input focus. This style is useful for enabling the user to quickly select the most likely option, or default. dogisay 1
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