Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
scintilla SCI_GETTARGETTEXT
#1
Hi,

I can't use the command SCI_GETTARGETTEXT 
https://scintilla.sourceforge.io/Scintil...TARGETTEXT


I found its value #define SCI_GETTARGETTEXT 2687
The following code does not work

I tried to replace qmsci.dll with version5.33, but it didn't work

Thanks in advance for any advice and help
david

Macro Macro6
Code:
Copy      Help
int sci=GetQmCodeEditor
int cp=SendMessage(sci SCI.SCI_GETCURRENTPOS 0 0)
int line=SendMessage(sci SCI.SCI_LINEFROMPOSITION cp 0)

int lineStart=SendMessage(sci SCI.SCI_POSITIONFROMLINE line 0)
SendMessage(sci SCI.SCI_SETTARGETSTART lineStart 0)
int lineEnd=SendMessage(sci SCI.SCI_GETLINEENDPOSITION line 0)
SendMessage(sci SCI.SCI_SETTARGETEND lineEnd 0)

def SCI_GETTARGETTEXT 2687
SendMessage(sci SCI.SCI_GETTARGETTEXT 0 _s)
#2
Is there a solution?
#3
you can't use SCI.SCI_GETTARGETTEXT . SCI constants are already loaded into QM at startup.

can use like this
 
Code:
Copy      Help
def SCI_GETTARGETTEXT 2687
SendMessage(sci SCI_GETTARGETTEXT 0 _s)

but Remember anytime you get text from scintilla controls you need to allocate memory to the string buffer.
#4
Thanks for your help, the above code works fine
How to load at QM startup?
I added the definition to winapi*.txt but it didn't work


Forum Jump:


Users browsing this thread: 1 Guest(s)