Page 1 of 1

Getting Line Number From "if contains"

Posted: Mon Apr 17, 2017 1:05 am
by Googie85
I am trying to search a string for characters and then determine the line number of the characters that are located.

on mouseUp
put URL "binfile:c:\users\Demo\Desktop\Vanguard\Vanguard.htm" into Blah
if Blah contains "**" then answer the selectedLine
end mouseUp

Many Thanks Guys!!

Googie.

Re: Getting Line Number From "if contains"

Posted: Mon Apr 17, 2017 1:15 am
by FourthWorld
The lineoffset function will do a substring search and return the line number where found.

Re: Getting Line Number From "if contains"

Posted: Mon Apr 17, 2017 1:32 am
by Googie85
Thanks for the prompt reply!!

It Worked!!!

Thanks FourthWorld!!

Re: Getting Line Number From "if contains"

Posted: Mon Apr 17, 2017 4:15 am
by FourthWorld
Anytime, Googie85. We're a wild bunch here, but generally helpful. :)