Radsam Posted February 17, 2005 Share Posted February 17, 2005 (edited) I noticed that when in an edit control, the windows hotkeys Ctrl-A, Ctrl-C, Ctrl-Z, etc. don't work but produce a "ding" sound. I also noticed that if you right click in the edit control, those options are listed. How can I have the windows hotkeys Ctrl-A, Ctrl-C, Ctrl-Z, etc. work in the edit control? Eg: expandcollapse popup#include <GUIConstants.au3> #Region A3 Pad Gui & Parameters $sMainTitle = "Test" $iMainWidth = 180; -1 = 400 $iMainHeight = 115; -1 = 400 $iMainLeftPos = -1;-1 is Center $iMainTopPos = -1;-1 is Center $iMainStyle = $WS_MINIMIZEBOX + $WS_MAXIMIZEBOX + $WS_VSCROLL + $WS_SIZEBOX;-1 is default which is: $WS_MINIMIZEBOX, $WS_CAPTION, $WS_POPUP, $WS_SYSMENU $iMainExStyle = -1; -1 is default $cIASNotepad = GUICreate($sMainTitle, $iMainWidth, $iMainHeight, $iMainLeftPos, $iMainTopPos, $iMainStyle, $iMainExStyle) #EndRegion #Region A3 Pad Edit & Parameters $EditText = "" $EditLeftPos = -1 $EditTopPos = 0 $EditWidth = 383 $EditHeight = 352 $EditStyle = $ES_AUTOVSCROLL + $ES_WANTRETURN;default -1: $ES_WANTRETURN, $WS_VSCROLL, $WS_HSCROLL, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL $EditExStyle = -1 $cEdit = GUICtrlCreateEdit($EditText, $EditLeftPos, $EditTopPos, $EditWidth, $EditHeight, $EditStyle, $EditExStyle) #EndRegion GUISetState() GUICtrlSetData($cEdit, "") While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then Exit 0 WEnd Edited February 17, 2005 by Radsam Link to comment Share on other sites More sharing options...
Radsam Posted February 18, 2005 Author Share Posted February 18, 2005 Can anyone offer any help?? Link to comment Share on other sites More sharing options...
CyberSlug Posted February 18, 2005 Share Posted February 18, 2005 (edited) put at beginning of script HotKeySet("^a","SelectAll") Func SelectAll() If WinActive($cIASNotepad) Then GUICtrlSendMsg($cEdit, 0xB1, 0, 999999);0xB1 == EM_SETSEL Else;we didn't want to trap the hotkey; pass it along HotKeySet("^a") Send("^a") HotKeySet("^a","SelectAll") EndIf EndFunc P.S. On Windows XP, I've noticed that Ctrl+A does not work in a lot of places such as the Run dialog and explorer address bar Edited February 18, 2005 by CyberSlug Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
Radsam Posted February 18, 2005 Author Share Posted February 18, 2005 Thank you very much CyberSlug. Now that I see how you coded, I found an UDF called Gui_Message.au3 that contains control messages. This has proved interesting. 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