help using eval command in imacros for firefox

Discussions and Tech Support related to the iMacros Firefox Add-on, including the built-in Javascript scripting interface for playing .js files.
Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information:CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
vinit10
Posts: 2
Joined: Thu Jun 22, 2017 10:50 pm

help using eval command in imacros for firefox

Post by vinit10 » Fri Jun 23, 2017 4:51 am

Hello everyone, I am a newbie in imacros so please help me.
I have extracted a text and able to prompt the exact text from my site.
what i want to do is replace or remove that extracted text from there.
let me add my codes
VERSION BUILD=11.5.499.3066
TAB T=1
TAB CLOSEALLOTHERS
SET !PLAYBACKDELAY 0.2
FRAME F=1
TAG POS=1 TYPE=STRONG ATTR=TXT:Please<SP>feel<SP>free<SP>to<SP>contact<SP>us<SP>anytime<SP>@<SP>+91-22-40149634<SP>or<SP>write<SP>us<SP>info@spsat*
TAG POS=77 TYPE=P ATTR=* EXTRACT=TXT
SET !VAR1 {{!EXTRACT}}
SET !EXTRACT NULL
SET !VAR2 EVAL("\"{{!VAR1}}".replace(\"NA\",\"{{!EXTRACT}}\");")
PROMPT {{!VAR2}}

everytime it shows the extracted text instead of "NA"
what is wrong in my coding ??
I have tried to put !VAR1 as well in replace string but still same issue.
Please help me.
Thanks in advance.
Post Reply