Help Creating Script to Open Multiple Links and Return Focus

Discussions and Tech Support specific to the iMacros for Chrome extension.
Forum rules
iMacros EOL - Attention!

The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.

Thank you again for your business and support.

Sincerely,
The Progress Team

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
allthelinks
Posts: 1
Joined: Tue Jan 18, 2011 5:06 pm

Help Creating Script to Open Multiple Links and Return Focus

Post by allthelinks » Tue Jan 18, 2011 5:31 pm

Hi. I was so excited to find iMacros because I couldn't seem to solve this problem using just JavaScript. Unfortunately, I couldn't get it working and am hoping that some wiser folks here can help :D

Here's my situation. It would be awesome if someone could help me figure out how to do this in Chrome. I use the dev channel.

Pages:
---Page A (a search results page)
---Pages B1-BN (result links on page A)
---Pages C1 and possible C2 (links on each of B1-BN)

Goal:
I want iMacros to run, automatically, on each B1-BN that I open and open C1 (and possible C2 if it exists) in a new tab and then bring Page A back into focus so that I can, manually, choose another B1-BN to open.

More information:
---I also use PersonalizedWeb - https://chrome.google.com/extensions/de ... bekiogmbco - for Chrome.
---C1 and C2 are the first and second links on B1-BN (thanks to PersonalizedWeb)
---C1 and C2 both have target="_blank" so that they'll open in new tabs just by clicking on them.
---I am able to get iMacros to run automatically on B1-BN using the trick on the wiki where you copy the JavaScript from the bookmarklet. I put this JavaScript into the page automatically using PersonalizedWeb...after I've moved C1 and C2 to the top of the page.
---Here's my build info: "VERSION BUILD=1110311 RECORDER=CR"

Additional Questions:
---For iMacros to run correctly on B1-BN, do those pages have to have focus when the iMacro automatically runs? I ask because I would like to open B1-BN in the background from Page A (the search results) and then have iMacros open those other 1 or 2 pages for each page I open. I want all of that to happen in the background so that I can stay on Page A and keep opening more result links. I don't want to have to see page B1-BN for iMacros to correctly open C1/C2.
---Since C2 may not exist, I was using "SET !ERRORIGNORE YES" to ignore any error in opening C2. Is this the correct way to do this?
---I read on the list of Chrome limitations that TAB >=1 isn't supported. Does this mean I can't stay focused on Page A? Again, I would like everything to happen in the background. So, I'm hoping I don't even need any TAB commands...just a couple of TAG commands. But, I couldn't get it to work when playing with it.
C1 and C2 are changing links. So, I was trying to use the * wildcard with the POS changing to pick up both of them like so:
TAG POS=1 TYPE=A ATTR=HREF:http://www.thedomain*
TAG POS=2 TYPE=A ATTR=HREF:http://www.thedomain*
But, iMacros never opened the second link. Again, does the page that has the link need to have focus for it to work?

Thanks for your help and let me know what needs clarification.
Post Reply