How to use imacros to manage research

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
emde
Posts: 3
Joined: Tue May 11, 2010 3:12 pm

How to use imacros to manage research

Post by emde » Tue May 11, 2010 3:19 pm

Hi, I frequently have to compile word files from a number of news articles on a certain topic. I was wondering if imacros could help me do that, but I am completely in the dark when it comes to scripting. Is there a way to create a macro that would be automatically opening all the links in a search page and coping all the text to a file?
In an ideal world I would like to open up a news site, such as news.yahoo, enter a keyword search - e.g Obama - and get imacro to download for me all the articles on Obama that appear in the links. Is it possible?
Best wishes,
MD
emde
Posts: 3
Joined: Tue May 11, 2010 3:12 pm

Re: How to use imacros to manage research

Post by emde » Wed May 12, 2010 4:35 pm

All right, it should be really simple, please guys, help me.
There is this page: http://wiadomosci.wp.pl/query,kaczy%F1s ... ykuly.html,
It has 11 links, all with ATTR text "więcej"
ten of them I would like to open one by one and extract the article to a txt file
the first one is crap and I dont want to visit it

This should be the simplest thing ever
But.
TAG POS={{!LOOP}}+1 TYPE=A ATTR=TXT:więcej
//do something here with extracting
BACK

does not work:(
POS does not understand my adding

So - 2nd attempt
How about setting up a single var instead of loop+1
SET !VAR1 {{!LOOP}}
ADD !VAR1 1
(stupid, I know)
TAG POS={{!VAR1}} TYPE=A ATTR=TXT:więcej
//do something here with extracting
BACK

does not work.
3rd try - I noticed that there are links that are 70px apart, so maybe I could use CLICK with Y=something+!LOOP*70 (or !VAR1 times 70)

nope: the same problem
4th try - the "więcej" links have rel=nofollow attribute and the first, redundant one does not. Nice, but, well.. I get an error message there are no links in the page with REL:nofollow and TEXT:więcej

damn. It must be something really stupid, I am doing. Please give me a hand here

MD
slamsal
Posts: 96
Joined: Fri Sep 12, 2008 4:39 pm

Re: How to use imacros to manage research

Post by slamsal » Wed May 12, 2010 9:03 pm

Code: Select all

SET !LOOP 2
TAG POS={{!LOOP}} TYPE=A ATTR=TXT:więcej
And play Loop.
Sanjiv Lamsal
iMacros Consultant
Duluth, MN USA
sanjivlamsal@hotmail.com
MattBell7
Posts: 627
Joined: Thu Nov 26, 2009 11:07 am
Location: United Kingdom

Re: How to use imacros to manage research

Post by MattBell7 » Fri May 14, 2010 12:41 pm

or if your more lazy and dont want to loop

Code: Select all

TAG POS=1 TYPE=A ATTR=TXT:więcej
TAG POS=R1 TYPE=A ATTR=TXT:więcej
'repeat above line for each extra link
but personally i'd loop like slamsal said. see http://wiki.imacros.net/Loop_after_Query_or_Login

for a great example of exactly what your asking for.
emde
Posts: 3
Joined: Tue May 11, 2010 3:12 pm

Re: How to use imacros to manage research

Post by emde » Sun May 16, 2010 6:38 pm

Thank, guys - it's genious:))
Post Reply