Is it possible to search a text, without see the cursor move
Because with this method i see the cursor
Code: Select all
ScintillaSendMessage(SciID, #SCI_SETANCHOR, StartSearch)
ScintillaSendMessage(SciID, #SCI_SEARCHANCHOR)
Start= ScintillaSendMessage(SciID, #SCI_SEARCHNEXT, 0, @Search)
Code: Select all
Procedure ScintillaCallBack(Gadget, *scinotify.SCNotification)
EndProcedure
OpenWindow(0, 0, 0, 320, 240, "Scintilla", #PB_Window_ScreenCentered|#PB_Window_MinimizeGadget)
ScintillaGadget(0, 0, 0, WindowWidth(0), WindowHeight(0), @ScintillaCallBack())
ScintillaSendMessage(0, #SCI_SETMARGINTYPEN, 1, #SC_MARGIN_NUMBER)
; Set example text (PB 5.50 or newer)
*UTF8 = UTF8("sum = this.value + 5 + value + blabl VALUE sdfgdgdf vaLue;")
ScintillaSendMessage(0, #SCI_SETTEXT, 0, *UTF8)
FreeMemory(*UTF8)
#StyleBleu = 1
Procedure SearchText(SciID, Search.s, StartSearch)
LgText = ScintillaSendMessage(SciID, #SCI_GETLENGTH)
ScintillaSendMessage(SciID, #SCI_SETTARGETSTART, StartSearch)
ScintillaSendMessage(SciID, #SCI_SETTARGETEND, LgText)
Start = ScintillaSendMessage(SciID, #SCI_SEARCHNEXT, 0, @Search)
ProcedureReturn Start
EndProcedure
Text$ = "value"
For i = 1 To 3
Position = SearchText(0, Text$, Position)
Debug Position
Position + 1
Next
Repeat
Until WaitWindowEvent() = #PB_Event_CloseWindow

