mIRC Homepage

$flinen $fline(@name,wildtext,N,T,StartLine)

Posted By: maroon

$flinen $fline(@name,wildtext,N,T,StartLine) - 08/12/19 02:25 AM

Currently, handling all matches in a @window is inefficient, because you can't resume after the last found position, as you can do with $read.

It would be helpful if there were a 5th parm which allows the search for the Nth match to begin at a specific line number, and that each match could also set a var like $flineN which behaves similarly to $readN. This way a script could search beginning from the last match using $fline(@name,wildtext,1,T,$calc(1+$flineN)).text without needing to search across the entire window for matches 1 through N-1, when all you're needing is the 1st match beginning with line XX.

Either that, or a /command|@win parameter which lets you execute an alias for each match found.

To make it simpler to implement, the T parm should be required in order to use the 5th.

It's debatable whether $flineN should be a local var, so you don't need to worry about doing a dummy $fline just to clear the row number left over by some other script.
Posted By: DooMaster

Re: $flinen $fline(@name,wildtext,N,T,StartLine) - 08/12/19 01:28 PM

I totally support this feature request and it would perfect for $fline() to start the search from a specific line.

EDIT: This is going to help coders to not use SQL for huge databases too.
Posted By: Wims

Re: $flinen $fline(@name,wildtext,N,T,StartLine) - 08/12/19 10:46 PM

Good idea.
© 2020 mIRC Discussion Forums