qwert Posted March 4, 2008 Share Posted March 4, 2008 I use a script that takes its keyboard entry from the numeric keypad ... and defines the (Numeric) Enter Key as a hotkey to initiate a calculation function. The problem is that whenever my script is active, the normal Enter Key is not seen by other applications ... NotePad, for example. How can I "share" the normal enter key? In other words, have it received by my script when it's active -- and by other applications when it's not. BTW, defining the hotkey to be {NumPadEnter} instead of {Enter} isn't allowed -- per the documentation -- and it doesn't work, either. Thanks in advance for any help. Link to comment Share on other sites More sharing options...
Xenobiologist Posted March 4, 2008 Share Posted March 4, 2008 Hi, check your script being active if not release hotkey. Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
ResNullius Posted March 4, 2008 Share Posted March 4, 2008 I use a script that takes its keyboard entry from the numeric keypad ... and defines the (Numeric) Enter Key as a hotkey to initiate a calculation function. The problem is that whenever my script is active, the normal Enter Key is not seen by other applications ... NotePad, for example.How can I "share" the normal enter key? In other words, have it received by my script when it's active -- and by other applications when it's not. BTW, defining the hotkey to be {NumPadEnter} instead of {Enter} isn't allowed -- per the documentation -- and it doesn't work, either.Thanks in advance for any help.You may not even have to set it as a hotkey; when does the user usually press enter to invoke the calculation? Is it after putting something into an input or edit box? Link to comment Share on other sites More sharing options...
qwert Posted March 4, 2008 Author Share Posted March 4, 2008 Is it after putting something into an input or edit box?Yes (after an input field entry), but I've tried it without the Hotkey definition and hitting Enter just highlights a portion of the entry field. There's nothing to activate the calculation. And BTW, using the Enter key is essential to the entry procedure -- to provide a convenient sequence (as opposed to having to click a calc button on the GUI, for example). Link to comment Share on other sites More sharing options...
ResNullius Posted March 5, 2008 Share Posted March 5, 2008 Yes (after an input field entry), but I've tried it without the Hotkey definition and hitting Enter just highlights a portion of the entry field. There's nothing to activate the calculation. And BTW, using the Enter key is essential to the entry procedure -- to provide a convenient sequence (as opposed to having to click a calc button on the GUI, for example).Something like this? #include <GUIConstants.au3> GUICreate("Calc GUI") GUICtrlCreateLabel("Your input here. Hit ENTER when Done", 10, 15, 300, 20) $inp = GUICtrlCreateInput("", 10, 35, 300, 20) GUICtrlSetState($inp, $GUI_FOCUS) GUISetState(@SW_SHOW) ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() Switch $msg Case $GUI_EVENT_CLOSE Exit Case $inp ;if Enter is hit in this field then... _MyCalcFunc() EndSwitch WEnd Func _MyCalcFunc() $var = GuiCtrlRead($inp) MsgBox(0,"VAR to work with",$var) ;rest of calc stuff here EndFunc Link to comment Share on other sites More sharing options...
qwert Posted March 5, 2008 Author Share Posted March 5, 2008 Something like this? Case $inp ; if Enter is hit in this field then... _MyCalcFunc()Thanks very much. This simple test for "entry complete" works great. 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