Please help how to do this?

Discussions and Tech Support specific to the iMacros Firefox Add-on.
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
new movies
Posts: 44
Joined: Thu May 26, 2011 8:14 pm

Please help how to do this?

Post by new movies » Tue Dec 31, 2013 6:03 am

extracted text is
cool.mysite.com/sudeep52
and i want to put the extracted data by only changing the subdomain name
i want to fill hot.mysite.com/sudeep52
i only want to change from cool to hot
How to do this.
Thanks
Sudeep
Chillout1989
Posts: 22
Joined: Sat Oct 12, 2013 9:18 pm

Re: Please help how to do this?

Post by Chillout1989 » Wed Jan 01, 2014 2:08 pm

You can do this with using EVAL:

SET !VAR1 EVAL("var s=\"{{!EXTRACT}}\"; s.replace(\"cool\",\"hot\")")

I dont know why, but after this there is a " in front of your extract.. I dont know how to remove this.. Only way for me is to replace the " for nothing with EVAL again..

SET !VAR2 EVAL("var s2=\"{{!VAR1}}\"; s2.replace(\"'\",\"\")")

So the whole Code:

Code: Select all

SET !VAR1 EVAL("var s=\"{{!EXTRACT}}\"; s.replace(\"cool\",\"hot\")")
SET !VAR2 EVAL("var s2=\"{{!VAR1}}\"; s2.replace(\"'\",\"\")")
Not elegant, but it works
new movies
Posts: 44
Joined: Thu May 26, 2011 8:14 pm

Re: Please help how to do this?

Post by new movies » Mon Jan 27, 2014 12:35 pm

still " appearing in front and end of extract
Post Reply