Getting Line Number From "if contains"

Deploying to Windows? Utilizing VB Script execution? This is the place to ask Windows-specific questions.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Googie85
Posts: 199
Joined: Tue Aug 05, 2014 10:07 am

Getting Line Number From "if contains"

Post by Googie85 » Mon Apr 17, 2017 1:05 am

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.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9802
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Getting Line Number From "if contains"

Post by FourthWorld » Mon Apr 17, 2017 1:15 am

The lineoffset function will do a substring search and return the line number where found.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Googie85
Posts: 199
Joined: Tue Aug 05, 2014 10:07 am

Re: Getting Line Number From "if contains"

Post by Googie85 » Mon Apr 17, 2017 1:32 am

Thanks for the prompt reply!!

It Worked!!!

Thanks FourthWorld!!

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9802
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Getting Line Number From "if contains"

Post by FourthWorld » Mon Apr 17, 2017 4:15 am

Anytime, Googie85. We're a wild bunch here, but generally helpful. :)
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Post Reply

Return to “Windows”