Re: GUI COMMANDS: COMPLETE RETHINK (latest: get/set system fonts, ComboBox choose string notify)
Posted: 20 Mar 2017, 12:17
I've now fixed the NumGet issue. Glad you told me. It's only a 3-letter change to the documentation, and it's lacking the customary version number update reference, so I probably would never have noticed. Changing the default parameter for NumGet, that's quite a controversial change. Btw talking about changes, someone just asked me when AHK v2 is coming out, do you know?
Ironically, I was thinking I might replace that 3-liner you quoted, with a one-line DllCall to SendMessage, making NumGet irrelevant. But would the performance be better or worse? [EDIT: see below]
The two small Edit control functions, I'd recently shared on a post, I thought I'd add them here because they are the one bit of important Edit control functionality missing from the built-in ControlXXX commands. Plus it turns out they have subtle advantages over other similar attempts, attempts that I was unaware of. Anyhow, check out JEE_EditGetRangeAnchorActive which I'll be adding above soon. You won't find anything similar to that.
As for existing Edit control functions?
[link is broken]
GitHub - ahkscript/awesome-AutoHotkey: A curated list of awesome AutoHotkey libraries, library distributions, scripts, tools and resources.
https://github.com/ahkscript/awesome-AutoHotkey
[also has the NumGet issue]
Autohotkey-Scripts/Edit.ahk at master · dufferzafar/Autohotkey-Scripts · GitHub
https://github.com/dufferzafar/Autohotkey-Scripts/blob/master/lib/Edit.ahk
Btw do you have a recommended modern control for making spreadsheets, other than a listview? Cf. Edit v. Scintilla. Although code for a listview would be interesting.
==================================================
[EDIT:]
Ironically, I was thinking I might replace that 3-liner you quoted, with a one-line DllCall to SendMessage, making NumGet irrelevant. But would the performance be better or worse? [EDIT: see below]
The two small Edit control functions, I'd recently shared on a post, I thought I'd add them here because they are the one bit of important Edit control functionality missing from the built-in ControlXXX commands. Plus it turns out they have subtle advantages over other similar attempts, attempts that I was unaware of. Anyhow, check out JEE_EditGetRangeAnchorActive which I'll be adding above soon. You won't find anything similar to that.
As for existing Edit control functions?
[link is broken]
GitHub - ahkscript/awesome-AutoHotkey: A curated list of awesome AutoHotkey libraries, library distributions, scripts, tools and resources.
https://github.com/ahkscript/awesome-AutoHotkey
[also has the NumGet issue]
Autohotkey-Scripts/Edit.ahk at master · dufferzafar/Autohotkey-Scripts · GitHub
https://github.com/dufferzafar/Autohotkey-Scripts/blob/master/lib/Edit.ahk
Btw do you have a recommended modern control for making spreadsheets, other than a listview? Cf. Edit v. Scintilla. Although code for a listview would be interesting.
==================================================
[EDIT:]
Code: Select all
q:: ;Edit control - get start/end points of text selection
ControlGet, hCtl, Hwnd,, Edit1, A
;DllCall("SendMessage", Ptr,hCtl, UInt,0xB0, UPtrP,vPos1, PtrP,vPos2) ;EM_GETSEL ;incorrect
DllCall("SendMessage", Ptr,hCtl, UInt,0xB0, UIntP,vPos1, UIntP,vPos2, Ptr) ;EM_GETSEL ;fixed
MsgBox, % vPos1 " " vPos2
return