Getting Line Number From "if contains"

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

Moderators: heatherlaine, Klaus, FourthWorld, robinmiller, kevinmiller

Post Reply
Googie85
Posts: 86
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: 5960
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
Community volunteer LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

Googie85
Posts: 86
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: 5960
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
Community volunteer LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

Post Reply

Return to “Windows”