Basically I need to run an imacro script to see how many times a word appears on a page, Ive seen another post on this and I tried the script and I get errors on line 10.
Basically I dont know how to set the VAR2 to make it count the words. i guess.
SET !EXTRACT_TEST_POPUP NO
URL GOTO=(the URL i need)
SET !VAR1 (word I need found)
TAG POS=1 TYPE=HTML ATTR=* EXTRACT=TXT
this is the part i dont understand.
' Use EVAL with a regular expression to count the number of occurrences of the target word
SET !VAR2 EVAL("var pageText = \"{{!EXTRACT}}\"; var matches = pageText.match(/{{!VAR1}}/gi); matches.length - 1;")
PROMPT "\"{{!VAR1}}\" occurs {{!VAR2}} time(s)"
thats the script i found on the other page..
can someone take out whats not needed, and help me fill in the blanks.
Please and thanks.
Need help making a simple counting script
Forum rules
iMacros EOL - Attention!
The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.
Thank you again for your business and support.
Sincerely,
The Progress Team
iMacros EOL - Attention!
The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.
Thank you again for your business and support.
Sincerely,
The Progress Team
-
- Posts: 1
- Joined: Thu Mar 20, 2014 5:38 pm
Re: Need help making a simple counting script
This is not the correct Sub-Forum if you are looking for a "free" Answer...
(And you'll need to mention your Configuration with Versions (iMacros + Browser + OS).)
(And you'll need to mention your Configuration with Versions (iMacros + Browser + OS).)
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
Re: Need help making a simple counting script
post on this and I tried the script and I get errors on line 10.
Nawaz