Extraxt URL into a variable?

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
Juliensohn
Posts: 6
Joined: Sat Sep 27, 2014 5:07 am

Extraxt URL into a variable?

Post by Juliensohn » Sat Sep 27, 2014 5:10 am

Hey, I need to extract the URL of the site and add it into a variable..

TAG POS=1 TYPE=A ATTR=HREF:URL#

So that "URL" is replaced with the URL of the website..

Anyone an idea?

EDIT://

SET !VAR1 {{!URLCURRENT}}

TAG POS=1 TYPE=A ATTR=HREF:{{!VAR1}}#


Have a solution.^^
chivracq
Posts: 9378
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Extraxt URL into a variable?

Post by chivracq » Sat Sep 27, 2014 12:03 pm

Juliensohn wrote:Hey, I need to extract the URL of the site and add it into a variable..

TAG POS=1 TYPE=A ATTR=HREF:URL#

So that "URL" is replaced with the URL of the website..

Anyone an idea?

EDIT://

SET !VAR1 {{!URLCURRENT}}

TAG POS=1 TYPE=A ATTR=HREF:{{!VAR1}}#

Have a solution.^^
CIM...! :mrgreen:

Yep, !URLCURRENT is the way to go, but it's already a (Built-in) Variable, you can use it directly in your Code without the need for a Temp Variable...:

Code: Select all

TAG POS=1 TYPE=A ATTR=HREF:{{!URLCURRENT}}#
And unless clicking on that Link is important (for a Counter or whatever...) or the Link is not always present on the Page and you want to click it only if it's there, the "normal" way would be to use "URL GOTO":

Code: Select all

URL GOTO={{!URLCURRENT}}#
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
Post Reply