var - iMacros "__undefined__" while trying to extract link using match keyword -


i trying make work. saving links in .txt file based on word/keyword match.

here code :

tag pos=1 type=h3 attr=class:r extract=htm set resultlink eval("var s='{{!extract}}';var match txt=\mmorpg\") set !extract {{resultlink}} saveas type=extract folder=c:\tmp file=gamelist.txt set !extract null 

but "__undefined__" in gamelist.txt

can me? thanks!

as understood comment , after looking @ http://www.mmorpg.com/gamelist.cfm, code, probably, must this:

set !extract_test_popup no set !loop 1 tag pos={{!loop}} type=td attr=class:alt extract=htm set !extract eval("'{{!extract}}'.match(/http.*html/)[0];") saveas type=extract folder=c:\tmp file=gamelist.txt 

play in loop mode max loop value, say, 841 (the max row of table links).


obsolete info:

try second line of macro follows:

set resultlink eval("('{{!extract}}'.match(/mmorpg/)) ? '{{!extract}}' : 'no match!';") 

Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -