Posts: 58
Threads: 20
Joined: Aug 2019
Hello again,
Is it possible to get/set caret position in a textbox accessible object?
Thank you,
Cuitino
Posts: 1,337
Threads: 61
Joined: Jul 2006
10-22-2019, 01:57 AM
(This post was last modified: 10-22-2019, 02:02 AM by Kevin.)
Maybe this will be useful
http://www.quickmacros.com/forum/showthr...t=Getcaret
Or
Search forum for GetCaretXY
Posts: 58
Threads: 20
Joined: Aug 2019
I mean the caret line position, e.g. 4th line from the top of the document
Posts: 58
Threads: 20
Joined: Aug 2019
I was attempting to use Scintilla messages (code below) without success. I suspect it only works for the qm editor?
int GoToLineNumber 3
int h = id(15 "Notepad")
SendMessage(h SCI.SCI_GOTOLINE GoToLineNumber-1 0)
Posts: 1,337
Threads: 61
Joined: Jul 2006
int LineNumber=10
int w=win("- Notepad" "Notepad")
int c=id(15 w) ;;editable text 'Text Editor'
LineNumber-1 ;;(line numbers start at zero so need to subtract 1)
int ci=SendMessage(c EM_LINEINDEX LineNumber 0);;
SendMessage(c EM_SETSEL ci ci)
Posts: 58
Threads: 20
Joined: Aug 2019
That works! thanks a lot!