Page 1 of 1
HTMLview.Search Return Something If Not Found
Posted: Mon Jul 15, 2019 8:21 pm
by PEB
Is there a way to get
HTMLview.Search to return something (bool or string) if the searched string is not found on the page?
In my code, I'm trying to find either one of two possible strings in the html files that I'm viewing. If the first is found, then I don't want to search for the second (and lose the first); but if the first is not found, then I do want to search for the second.
Re: HTMLview.Search Return Something If Not Found
Posted: Mon Jul 22, 2019 6:19 pm
by airsoftsoftwair
Currently not possible, but I'll see if this can be added.
Re: HTMLview.Search Return Something If Not Found
Posted: Mon Jul 22, 2019 7:59 pm
by PEB
Thanks!
Re: HTMLview.Search Return Something If Not Found
Posted: Wed Aug 12, 2020 3:34 pm
by airsoftsoftwair
Code: Select all
- New: HTMLview.Search() returns a boolean now indicating whether or not the search term was actually found
Re: HTMLview.Search Return Something If Not Found
Posted: Thu Aug 13, 2020 9:57 pm
by PEB
Thanks, Andreas.
That will be very helpful.
Re: HTMLview.Search Return Something If Not Found
Posted: Fri Nov 22, 2024 1:53 pm
by PEB
found =
moai.DoMethod(id, "Search", t$, flags$)
The result (found) seems always to report as False, even when the text has been found.
Re: HTMLview.Search Return Something If Not Found
Posted: Sat Nov 23, 2024 12:26 am
by airsoftsoftwair
Ok, I'll check.
Re: HTMLview.Search Return Something If Not Found
Posted: Thu Nov 28, 2024 1:18 am
by PEB
I should have specified that I've only tried this on Android.