jftuga Posted July 22, 2005 Posted July 22, 2005 (edited) My program uses Opt ("GUIOnEventMode", 1) and I create an input box with GUICtrlCreateInput(). After the user types something in, how can I make it so that an event is fired when the Enter key is pressed? I usually use GUICtrlSetOnEvent(), but this does not seem to catch the Enter key in the latest AutoIt beta. Any ideas? If it can not be done in GUIOnEventMode = 1, how do you accomplish this when it is = 0? Thanks, -John Edited July 22, 2005 by jftuga Admin_Popup, show computer info or launch shellRemote Manager, facilitates connecting to RDP / VNCProc_Watch, reprioritize cpu intensive processesUDF: _ini_to_dict, transforms ini file entries into variablesUDF: monitor_resolutions, returns resolutions of multiple monitorsReport Computer Problem, for your IT help deskProfile Fixer, fixes a 'missing' AD user profile
h8no1 Posted July 22, 2005 Posted July 22, 2005 Maybe not exactly what you are looking for but the HotKeySet() function might work for you, just check that the field you want the user to fill isnt empty before you go on with the code.
jftuga Posted July 23, 2005 Author Posted July 23, 2005 Thanks. This worked great. -John Admin_Popup, show computer info or launch shellRemote Manager, facilitates connecting to RDP / VNCProc_Watch, reprioritize cpu intensive processesUDF: _ini_to_dict, transforms ini file entries into variablesUDF: monitor_resolutions, returns resolutions of multiple monitorsReport Computer Problem, for your IT help deskProfile Fixer, fixes a 'missing' AD user profile
vegaslaptop Posted July 25, 2005 Posted July 25, 2005 Hello Guys,This thread is closest to what I am looking for but being a newbie just the function does not really help me understand this script. Func _IsPressed($hexKey);RETURNS 1 IF KEY IS PRESSED Local $aR $hexKey = '0x' & $hexKey $aR = DllCall($DLLuser32, "int", "GetAsyncKeyState", "int", $hexKey) If Not @error And BitAND($aR[0],0x8000) = 0x8000 Then Return 1 Return 0EndFunc ;==>DETERMINE IF A PARTICULAR KEY IS PRESSEDHow do I implement this func so that after the input has been entered the "OK" button is in focus and by clicking "ENTER" it automatically submits data?
HardCopy Posted July 31, 2005 Posted July 31, 2005 (edited) Hello Guys,This thread is closest to what I am looking for but being a newbie just the function does not really help me understand this script. How do I implement this func so that after the input has been entered the "OK" button is in focus and by clicking "ENTER" it automatically submits data?<{POST_SNAPBACK}> GUICtrlSetState($OKbutton,$GUI_DEFBUTTON) ; Adds data when Enter pressed.hth Hardcopy Edited July 31, 2005 by HardCopy Contributions: UDF _DateYearFirstChildren are like Farts, you can just about stand your own.Why am I not a Vegetarian?...Well...my ancestors didn't fight & evolve to the Top of the food chain for me to survive on Salad
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