How does Scite get the text between the specified StartPos and EndPos?

The popular SciTE-based AutoHotkey Script Editor
cgx5871
Posts: 319
Joined: 26 Jul 2018, 14:02

How does Scite get the text between the specified StartPos and EndPos?

Post by cgx5871 » 01 Sep 2023, 13:24

How does Scite get the text between the specified StartPos and EndPos?

Code: Select all

StartPos:=50
EndPos:=100
Str:=SCI_???(StartPos,EndPos)
I looked through the Scite api for a long time
No related ones were found.
Can anyone give me some help?

neogna2
Posts: 600
Joined: 15 Sep 2016, 15:44

Re: How does Scite get the text between the specified StartPos and EndPos?

Post by neogna2 » 02 Sep 2023, 16:47

I'm not sure if this is what you're asking for but Scintilla has
https://www.scintilla.org/ScintillaDoc.html#SCI_GETTEXTRANGE
which requires the use of a struct
https://www.scintilla.org/ScintillaDoc.html#Sci_TextRange

cgx5871
Posts: 319
Joined: 26 Jul 2018, 14:02

Re: How does Scite get the text between the specified StartPos and EndPos?

Post by cgx5871 » 02 Sep 2023, 23:05

@neogna2I saw,
But I don't know how to use it in ahk.
It’s related to reading the buffer area. I don’t understand it at all.
This problem has troubled me for many days.
Can you help me write a sample code?


Post Reply

Return to “SciTE4AutoHotkey”