Jump to content
UBot Underground

Check Whole List If Word Is In The List, If Yes Alert Yes


Recommended Posts

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 not

2. 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

 

Link to post
Share on other sites

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)
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...