Skrip Posted March 4, 2009 Share Posted March 4, 2009 How can I make it so that when you click anywhere within an input box, everything will be selected? [left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left] Link to comment Share on other sites More sharing options...
KaFu Posted March 4, 2009 Share Posted March 4, 2009 Detect click on input box with WM_COMMAND and then use a controlsend ^a ? OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2022-Nov-26) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Feb-16) HMW - Hide my Windows (2018-Sep-16) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2023-Jun-03) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
Skrip Posted March 4, 2009 Author Share Posted March 4, 2009 I thought of that, but I was really trying to go around having to send any keys...is there a way without having to send any keys? [left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left] Link to comment Share on other sites More sharing options...
KaFu Posted March 4, 2009 Share Posted March 4, 2009 (edited) #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $hGUI = GUICreate("Test-GUI",300,100,100,100,Default,$WS_EX_TOPMOST) $input1 = GUICtrlCreateInput("Input 1...",10,10,200) $input2 = GUICtrlCreateInput("Input 2...",10,40,200) GUISetState(@SW_SHOW) GUIRegisterMsg($WM_COMMAND, "WM_COMMAND") while 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop wend Func WM_COMMAND($hWnd, $Msg, $wParam, $lParam) Local $iIDFrom = BitAND($wParam, 0xFFFF);LoWord Local $iCode = BitShift($wParam, 16);HiWord Switch $iIDFrom Case $input1 if $iCode = 256 then; = input receives focus; 512 = loses focus GUICtrlSetState($input1, $GUI_FOCUS) endif EndSwitch Return $GUI_RUNDEFMSG EndFunc;==>WM_COMMAND Edited March 4, 2009 by KaFu OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2022-Nov-26) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Feb-16) HMW - Hide my Windows (2018-Sep-16) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2023-Jun-03) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
Skrip Posted March 5, 2009 Author Share Posted March 5, 2009 Perfect. Thank you very much. [left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left] 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