Extract URL open new tab go to extracted url

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
sweetrevelation
Posts: 29
Joined: Sat Feb 14, 2009 9:53 pm

Extract URL open new tab go to extracted url

Post by sweetrevelation » Thu Feb 26, 2009 2:51 am

Here's what I'm trying to do.

Extract a link on a page using TAG POS=1 TYPE=A ATTR=TXT:*thetextoftheURL/here* EXTRACT=HREF

That works fine.

Then, in Firefox, I want to open a new tab using TAB OPEN

Then, I want to go to this new tab and I want to go to the URL I have extracted. It doesn't seem to be working though. My thoughts were to use GOTO URL {{!EXTRACT}} or something but I don't know.

That's why I'm asking you guys. I'm sure it's something simple I'm overlooking.

I guess my question is, once a link is extracted, can it be pasted in the browser somehow?

Thanks in advance
Marcia, Tech Support
Posts: 1095
Joined: Thu Jan 29, 2009 1:10 pm

Re: Extract URL open new tab go to extracted url

Post by Marcia, Tech Support » Thu Feb 26, 2009 10:17 am

Hello,

Basically, the answer to your question
sweetrevelation wrote:I guess my question is, once a link is extracted, can it be pasted in the browser somehow?
is yes.

Your approach misses just a couple of fine points. Have a look at the macro below

Code: Select all

VERSION BUILD=6250128     
TAB T=1     
URL GOTO=http://www.google.com/search?q=iMacros&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a
TAG POS={{!LOOP}} TYPE=A ATTR=TXT:*iMacros* EXTRACT=HREF
TAB OPEN NEW
SET !VAR1 {{!LOOP}}
ADD !VAR1 1
TAB T={{!VAR1}}
URL GOTO={{!EXTRACT}}
and see if that is what you are looking for.
Regards,

Marcia
sweetrevelation
Posts: 29
Joined: Sat Feb 14, 2009 9:53 pm

Re: Extract URL open new tab go to extracted url

Post by sweetrevelation » Fri Feb 27, 2009 6:45 pm

Thanks Marcia,

It is so close to working the way I need it to work. I've uploaded a Youtube video so you can see visually what's going on.

http://www.youtube.com/watch?v=NQf0f8EyjQA

Here's my code to loop through my yahoo email:

Code: Select all

VERSION BUILD=6250128   
SET !ERRORIGNORE YES
SET !ERRORCONTINUE YES
SET !TIMEOUT 1
ONDIALOG POS=1 BUTTON=OK CONTENT=
SET !EXTRACT_TEST_POPUP NO
FILTER TYPE=IMAGES STATUS=OFF
TAB T=1     
TAG POS={{!LOOP}} TYPE=A ATTR=TXT:*thelistauction.com/content/earn* EXTRACT=HREF
TAB OPEN NEW
SET !VAR1 {{!LOOP}}
ADD !VAR1 1
TAB T={{!VAR1}}
URL GOTO={{!EXTRACT}}
TAB T=1
FILTER TYPE=IMAGES STATUS=ON
TAG POS=1 TYPE=A ATTR=ID:message_view_next
FILTER TYPE=IMAGES STATUS=OFF
As you can see from the video, it doesn't open it up into the new tab. Not sure why.

Thanks for your previous help. You've brought me one step further. I would have never figured that out.
Marcia, Tech Support
Posts: 1095
Joined: Thu Jan 29, 2009 1:10 pm

Re: Extract URL open new tab go to extracted url

Post by Marcia, Tech Support » Fri Feb 27, 2009 8:07 pm

Hello,

As long as it is not working as you expect, in order to debug, I would say you should put these lines

Code: Select all

SET !ERRORIGNORE YES
SET !ERRORCONTINUE YES
SET !TIMEOUT 1
ONDIALOG POS=1 BUTTON=OK CONTENT=
SET !EXTRACT_TEST_POPUP NO
out. Like it is we cannot see if it's extracting something at all...
Regards,

Marcia
sweetrevelation
Posts: 29
Joined: Sat Feb 14, 2009 9:53 pm

Re: Extract URL open new tab go to extracted url

Post by sweetrevelation » Fri Feb 27, 2009 8:41 pm

Marcia, iOpus wrote:Hello,

As long as it is not working as you expect, in order to debug, I would say you should put these lines

Code: Select all

SET !ERRORIGNORE YES
SET !ERRORCONTINUE YES
SET !TIMEOUT 1
ONDIALOG POS=1 BUTTON=OK CONTENT=
SET !EXTRACT_TEST_POPUP NO
out. Like it is we cannot see if it's extracting something at all...
Great tip! I'm such an idiot. Your code works perfectly. I was the one that screwed up. I had this loop in my tag:
TAG POS={{!LOOP}} TYPE=A ATTR=TXT:*thelistauction.com/content/earn* EXTRACT=HREF

I should have taken it out. Now I use:
TAG POS=1TYPE=A ATTR=TXT:*thelistauction.com/content/earn* EXTRACT=HREF
and it works like you suggested.

Thanks a ton Marcia! I couldn't have solved this on my own. You're awesome.
Post Reply