Hi guys,
Thank you for your response!
What I am trying to do is filtering out those pages that contain the word "Part". The script is not supposed to run the action on these pages.
As you said, testing for the presence of the word "Part" is not a good solution as the action is applied when other words are detected. I guess, the solution is creating an array of all the words that are present on the page and checking if it contains the word "Part". Am i right?
Thanks!
You can do that, but doing an intermediate step like copying to an array is just more overhead in an already slow task.
In pseudocode,
set a flag variable to 0
if there are less than 42 words,
step through each word
if the word starts Part (or whatever) set the flag to 1
Now, when the loop is finished, if flag is 1, do your action.