Click certain keyword only

Discussions and Tech Support related to the iMacros Google Chrome extension.
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
deb39
Posts: 1
Joined: Fri Feb 01, 2013 4:48 am

Click certain keyword only

Post by deb39 » Sat Feb 02, 2013 7:59 am

I'm using an imacro (just left the name as #Current.iim), to check a webpage for 10 minutes at a time and when a link titled "Attention" pops up to click it, and once that's loaded to click a link titled "Clickme"

Code: Select all

1 VERSION BUILD=6011206 RECORDER=CR
2 SET !TIMEOUT_STEP 600
3 TAG POS=1 TYPE=A ATTR=TXT:*Attention*
4 TAG POS=1 TYPE=B ATTR=TXT:*Clickme*
5 TAB T=2
Now sometimes a link titled "Discard" pops up that I don't want clicked...I tried this:

Code: Select all

1 VERSION BUILD=6011206 RECORDER=CR
2 SET !TIMEOUT_STEP 600
3 TAG POS=1 TYPE=A ATTR=TXT:*Discard* CONTENT=EVENT:FAIL_IF_FOUND
4 TAG POS=1 TYPE=A ATTR=TXT:*Attention*
5 TAG POS=1 TYPE=B ATTR=TXT:*Clickme*
6 TAB T=2
But all it does is look for Discard, then fail, it never moves on to click the Attention links as they come up.

I know I need a Javascript that can make the decision to click "Attention" links but not "Discard" links as they load up on the webpage, and keep checking the page, but I'm not versed in any kind of programming...so struggling with it quite a bit :|. I suspect this way is a better way to check for a certain keyword then click it, but I have no idea how to implement it to this situation unfortunately. And the directions here look very helpful, but again not really sure how to tweak it to my macro. Any help is appreciated! Thanks.
Marcia, Tech Support
Posts: 1095
Joined: Thu Jan 29, 2009 1:10 pm

Re: Click certain keyword only

Post by Marcia, Tech Support » Mon Feb 04, 2013 2:40 pm

Hello,

According to your description, it seems that the first macro would work quite alright. Why do you need to worry about failing when "Discard" appears (instead of simply ignoring it)?

The (1st) macro however, works only as long the page refreshes itself. iMacros will wait 10 minutes, checking at each second for the presence of the keyword "Attention". When it appears, it is going to click on the link and go ahead for the next command which is to find and click (is this a link as well?) on the "Clickme" word. If it does not find after 10 minutes, if will simply fail. Isn't that what you want?
Regards,

Marcia
Post Reply