spa3212 1 Posted April 16, 2018 Report Share Posted April 16, 2018 hello friends please help...I searched a lot but couldn't found a solution.. here is the code.. loop($list total(%forbidden)) { if($contains($document text,$list item(%forbidden,#forbidpost))) { then { alert("yes") } else { alert("no") } } increment(#forbidpost)} 1. I have a list of 10 words that I want to see if present on a webpage or not2. But before if command say yes or not, I want it to check whole list, currently this code, that I put in loop, check every line of text file, it alert no even if word is there on 6th line. How can I check a whole list for existence of a word before it alert Quote Link to post Share on other sites
HelloInsomnia 1103 Posted April 16, 2018 Report Share Posted April 16, 2018 You can set a variable before the loop and then alert it after the loop like so: set(#forbidden,"no","Global") loop($list total(%forbidden)) { if($contains($document text,$list item(%forbidden,#forbidpost))) { then { set(#forbidden,"yes","Global") } else { } } increment(#forbidpost) } alert(#forbidden) Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.