ASut Posted September 19, 2010 Share Posted September 19, 2010 I find that "Ctrl + A" can't work in the GUICtrlCreateEdit, every time when I need to copy all the text inside the GUICtrlCreateEdit, I need to right clik the mouse and then select "Select All",How to make Ctrl + A work in the GUICtrlCreateEdit? Link to comment Share on other sites More sharing options...
NicePerson Posted September 19, 2010 Share Posted September 19, 2010 Try this Send("^{A}") Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted September 19, 2010 Moderators Share Posted September 19, 2010 ASut,This will work if you do not keep the A key pressed long enough to start the typematic repeat: #include <GUIConstantsEx.au3> #include <GUIEdit.au3> #include <WinAPI.au3> Global $hInput_Handle HotKeySet("^a", "_SelAll") $hGUI = GUICreate("Test", 500, 500) $hInput = GUICtrlCreateEdit("here is some text", 10, 10, 480, 480) $hInput_Handle = GUICtrlGetHandle(-1) $hSelAll = GUICtrlCreateDummy() GUISetState() Do Until GUIGetMsg() = $GUI_EVENT_CLOSE Func _SelAll() Switch _WinAPI_GetFocus() Case $hInput_Handle _GUICtrlEdit_SetSel($hInput_Handle, 0, -1) Return EndSwitch EndFunc ;==>_SelAllM23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
ASut Posted September 19, 2010 Author Share Posted September 19, 2010 Thanks, I have tried all 2 methods, for Send("^{A}") I don't know how to make it works, for M23 's method, How can it work for 2 or more GUICtrlCreateEdit? Link to comment Share on other sites More sharing options...
Kalin Posted September 19, 2010 Share Posted September 19, 2010 (edited) Thanks, I have tried all 2 methods, for Send("^{A}") I don't know how to make it works, for M23 's method, How can it work for 2 or more GUICtrlCreateEdit?Ctrl+COr try this function I made a while ago.INPUTBOX("Copy All","Edit Strings Below"&@CRLF&@CRLF&"Note: Ctrl+C = Copy",GUICTRLREAD($YourEditControlVarName)) Edited September 19, 2010 by Kalin Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted September 19, 2010 Moderators Share Posted September 19, 2010 ASut, for M23 's method, How can it work for 2 or more GUICtrlCreateEdit?Just test for the different handles - like this: #include <GUIConstantsEx.au3> #include <GUIEdit.au3> #include <WinAPI.au3> Global $hInput_Handle HotKeySet("^a", "_SelAll") $hGUI = GUICreate("Test", 500, 500) $hInput_1 = GUICtrlCreateEdit("here is some text", 10, 10, 230, 480) $hInput_1_Handle = GUICtrlGetHandle(-1) $hInput_2 = GUICtrlCreateEdit("here is some text", 260, 10, 230, 480) $hInput_2_Handle = GUICtrlGetHandle(-1) $hSelAll = GUICtrlCreateDummy() GUISetState() Do Until GUIGetMsg() = $GUI_EVENT_CLOSE Func _SelAll() Switch _WinAPI_GetFocus() Case $hInput_1_Handle _GUICtrlEdit_SetSel($hInput_1_Handle, 0, -1) Case $hInput_2_Handle _GUICtrlEdit_SetSel($hInput_2_Handle, 0, -1) EndSwitch EndFunc ;==>_SelAll Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
ASut Posted September 19, 2010 Author Share Posted September 19, 2010 Thanks again for the help,which really help me a lot Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted September 19, 2010 Moderators Share Posted September 19, 2010 ASut, That is why I am here. Glad I could help. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Kalin Posted September 19, 2010 Share Posted September 19, 2010 ASut,That is why I am here. Glad I could help. M23He was thanking me, stfuuuuuuuuuuuu.Joking, but srsly.;-; Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted September 19, 2010 Moderators Share Posted September 19, 2010 Kalin, Try increasing the medication - or stopping it altogether if you prefer. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
GEOSoft Posted September 19, 2010 Share Posted September 19, 2010 ASut,That is why I am here. Glad I could help. M23I'm certainly glad you answered that question.Oooops, I quoted the reply and I'm sooooooooo sorry (NOT). I can show you boards where you would get fried for not quoting at least part of the post you are replying to.Yes big M, I'm in an ugly mood and it was that lucky day where your name came out of the hat. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted September 19, 2010 Moderators Share Posted September 19, 2010 George, Perhaps you need a new dosage (or is that dotage? ) prescription as well! M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Kalin Posted September 19, 2010 Share Posted September 19, 2010 Kalin,Try increasing the medication - or stopping it altogether if you prefer. M23Don't try flamming me Melba.I said it was a joke. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted September 19, 2010 Moderators Share Posted September 19, 2010 Kalin, If you cannot take banter - then do not start it. "click" M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Mat Posted September 19, 2010 Share Posted September 19, 2010 Kalin,If you cannot take banter - then do not start it. "click"M23The "click" lacks the same effect as when Jos uses it... Maybe it's the fact it no longer has the big red AutoIt Project Listing Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted September 19, 2010 Moderators Share Posted September 19, 2010 Mat,CLICK!!!!!Better? M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Mat Posted September 19, 2010 Share Posted September 19, 2010 Mat,CLICK!!!!!Better? M23No... I like the posts like this: #823687Final and no nonsense. It gives the impression that the *click* is not open to any discussion. AutoIt Project Listing Link to comment Share on other sites More sharing options...
ASut Posted September 20, 2010 Author Share Posted September 20, 2010 By using M23's method, I can use "Ctrl +A" to select all the text in GUICtrlCreateEdit , but I got new question, it seems that I can't use "Ctrl +A" in other applications, e.g Notepad, and even SciTE. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted September 20, 2010 Moderators Share Posted September 20, 2010 ASut, If we use an accelerator instead of a HotKey, we can get over that problem: expandcollapse popup#include <GUIConstantsEx.au3> #include <GUIEdit.au3> #include <WinAPI.au3> $hGUI = GUICreate("Test", 500, 500) $hInput_1 = GUICtrlCreateEdit("here is some text", 10, 10, 230, 480) $hInput_1_Handle = GUICtrlGetHandle(-1) $hInput_2 = GUICtrlCreateEdit("here is some text", 260, 10, 230, 480) $hInput_2_Handle = GUICtrlGetHandle(-1) $hSelAll = GUICtrlCreateDummy() GUISetState() ; Set accelerator for Ctrl+a Global $aAccelKeys[1][2]=[["^a", $hSelAll]] GUISetAccelerators($aAccelKeys) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $hSelAll _SelAll() EndSwitch WEnd Func _SelAll() Switch _WinAPI_GetFocus() Case $hInput_1_Handle _GUICtrlEdit_SetSel($hInput_1_Handle, 0, -1) Case $hInput_2_Handle _GUICtrlEdit_SetSel($hInput_2_Handle, 0, -1) EndSwitch EndFunc ;==>_SelAll Better? M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
ASut Posted September 20, 2010 Author Share Posted September 20, 2010 yeah, it is much better, and work fine for me, thanks sooooooooooooooooooooooooo much 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