qwert Posted March 4, 2016 Share Posted March 4, 2016 They are the most common text selection methods: A double-click selects the current word ... and a triple-click selects the current line. But some applications include the trailing character, which is usually the blank that follows the word. This is Au3's default behavior for rich text.I'd like to NOT select the trailing element, whatever it is. On other applications that don't, I've seen no explanations of why or how. Is this controlled by a setting at some level? Or do the individual applications intercept the click action and process it locally? Any help will be appreciated. Link to comment Share on other sites More sharing options...
InunoTaishou Posted March 4, 2016 Share Posted March 4, 2016 (edited) That's not controlled by autoit, or even richedit, it's controlled by your OS. I know some editors will allow just the selection of the single word, like Notepad++, Visual Studio, and SciTE, but I think they're intercepting the double click and selecting the word, not windows. You can try registering the WM_LBUTTONDBLCLK message and control the highlighting, I don't know if you'll get the double click message before the selection or after. WM_NOTIFY might get the message that text is being selected in richedit. Edited March 4, 2016 by InunoTaishou Link to comment Share on other sites More sharing options...
qwert Posted March 4, 2016 Author Share Posted March 4, 2016 Thanks very much for those suggestions. Indeed, it looks like WM_NOTIFY has a feature that could work. Quote EN_SELCHANGE Notifies a rich edit control's parent window that the current selection has changed. A rich edit control sends this notification code in the form of a WM_NOTIFY message. I have some homework to do regarding the structure(s) involved. I'll try to track down some existing code as an example, but it certainly looks promising. 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