Scintilla searchnext

Just starting out? Need help? Post your questions and find answers here.
User avatar
rndrei
Enthusiast
Enthusiast
Posts: 183
Joined: Thu Dec 28, 2023 9:04 pm

Scintilla searchnext

Post by rndrei »

It finds only the first one it comes across. How to make it search for everything.

Code: Select all

Procedure find_text(find_string.s)
   Define position_sc.l
   SearchText = find_string
   *Text = UTF8(SearchText)
   Search\lpstrText =*mem_doc
   position_sc= ScintillaSendMessage(#sc,#sci_searchnext,0,*text )
   ScintillaSendMessage(#sc,#sci_gotopos,position_sc)
   FreeMemory(*Text) 
EndProcedure
infratec
Always Here
Always Here
Posts: 7662
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: Scintilla searchnext

Post by infratec »

If you want more resuluts then one, you need a loop :wink:

And ... SCI_SEARCHANCHOR

Look here:
https://www.purebasic.fr/english/viewto ... 59#p391559
User avatar
rndrei
Enthusiast
Enthusiast
Posts: 183
Joined: Thu Dec 28, 2023 9:04 pm

Re: Scintilla searchnext

Post by rndrei »

Thanks, I figured it out!
Post Reply