Correct use of string A 'is in' string B?

Keith Clarke keith.clarke at me.com
Wed Oct 14 07:00:46 EDT 2020


Hi folks,
Am I misreading the docs and abusing the 'is in' logic or syntax here...?

In my test case, the browser widget URL takes the form (truncated) https://somewhere.com/callback.lc#access_token=0123456789&...

This is visible in the field "ResponseURL" but the if statement is not firing. 

Is this a syntax or logic error on my part?
on browserNavigateComplete

get the URL of widget "Browser" 
put it into field "ResponseURL" 

# Update Access Token

put it into tURL

if "access_code" is in tURL then

put tURL

do UpdateAccessToken(tURL)

end if

get the HTMLText of widget "Browser" 

put it into field "Content" 

end browserNavigateComplete

BTW I've also tried the inverse if 'tURL contains 'access_code" 

Thanks & regards,
Keith


More information about the use-livecode mailing list