Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Scintilla control modifies line text and Lexer
#3
Thanks for your help
How to implement the following commands in QM?  My code doesn't work

SCI_GETLINE(line line, char *text) → position
 
Code:
Copy      Help
,act sci
,int cp=SendMessage(sci SCI.SCI_GETCURRENTPOS 0 0)
,int line=SendMessage(sci SCI.SCI_LINEFROMPOSITION cp 0)
,SendMessage(sci SCI.SCI_GETLINE line _s)
,mes _s

SCI_GETCURLINE(position length, char *text NUL-terminated) → position
 
Code:
Copy      Help
,act sci
,int cp=SendMessage(sci SCI.SCI_GETCURRENTPOS 0 0)
,int line=SendMessage(sci SCI.SCI_LINEFROMPOSITION cp 0)
,int length=SendMessage(sci SCI.SCI_LINELENGTH line 0)
,SendMessage(sci SCI.SCI_GETCURLINE length _s)
,mes _s

autoit related code:
Code:
Copy      Help
Local $ret, $iPos = SendMessage($Sci, $SCI_GETCURRENTPOS, 0, 0)

$iLen = SendMessage($Sci, $SCI_GETCURLINE, 0, 0)

$sBuf = DllStructCreate("byte[" & $iLen & "]")

$ret = DllCall($user32, "long", "SendMessageA", "long", $Sci, "int", $SCI_GETCURLINE, "int", $iLen, "ptr", DllStructGetPtr($sBuf))

$current = $ret[0]

$startword = $current


Messages In This Thread
RE: Scintilla control modifies line text and Lexer - by Davider - 02-16-2023, 05:40 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)