Zepx Posted December 8, 2007 Share Posted December 8, 2007 Hi all, I would like to know if there is a method to enable GUICtrlCreateEdit to use Ctrl+A (^a). By default select all is disable and I can't select all. Is it possible to do so? I've also tried using HotKey but it doesn't really work. Link to comment Share on other sites More sharing options...
therks Posted December 8, 2007 Share Posted December 8, 2007 Yes and no. What have you tried with the hotkey? My AutoIt Stuff | My Github Link to comment Share on other sites More sharing options...
picaxe Posted December 8, 2007 Share Posted December 8, 2007 Try this #include <GUIConstantsEx.au3> #include <EditConstants.au3> HotKeySet("^a", "CtrlA") GUICreate("Ctrl-A to select text", 220, 100) $nEdit = GUICtrlCreateEdit ("line 0", 10, 10, 200, 80) GUISetState () $txt = "" For $n=1 To 3 $txt &= "some text some more text " & $n & @CRLF Next GUICtrlSetData($nEdit, $txt) Do $msg = GUIGetMsg() Until $msg = $GUI_EVENT_CLOSE Func CtrlA() GUICtrlSendMsg($nEdit, $EM_SETSEL, 0, -1) EndFunc Link to comment Share on other sites More sharing options...
Zepx Posted December 8, 2007 Author Share Posted December 8, 2007 (edited) Thanks picaxe, it works perfectly for the function GUICtrlSendMsg($nEdit, $EM_SETSEL, 0, -1)oÝ÷ Ø f¢Ëmëì"¶®¶seôuT7G&ÄVFEõ6WE6VÀ Where can I get more info on this $EM_SETSEL? Edited December 8, 2007 by Zepx Link to comment Share on other sites More sharing options...
Zedna Posted December 8, 2007 Share Posted December 8, 2007 Where can I get more info on this $EM_SETSEL?On MSDN Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
picaxe Posted December 8, 2007 Share Posted December 8, 2007 Almost the same with _GUICtrlEdit_SetSelNow you you tell me . Reinventing the wheel can be a good learning experience. Link to comment Share on other sites More sharing options...
Zepx Posted December 9, 2007 Author Share Posted December 9, 2007 Thanks again for this info and helps. 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