IE or Chrome Tabbs

Started by seckner, March 30, 2015, 02:08:27 PM

Previous topic - Next topic

seckner

Just can't figure this out. If I open IE (or chrome) and have 3 tabs open with the third tab currently active - how do I select the first tab to now be active? I've coded up a group of IE pages that open on new tabs, now I want to active tab1 for 30 seconds, then 2 for 30 seconds and eventually back to tab1 - they are network monitoring pages. It's all up, everything opens, and.. I just can't get tab1 to reactivate. Help please?

td

One approach to navigating tabs in IE is to use the 'Shell.Application' COM Automation object.  You can find a few examples in the Tech Database.  Here's a link to one:

http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WinBatch/OLE~COM~ADO~CDO~ADSI~LDAP/OLE~with~MSIE+Working~with~Multiple~Tabs~in~Internet~Explorer.txt

It doesn't do exactly what you want but there should be enough information there to get you started.  Note that you can shift between IE tabs using the ctl+TAB key combo although you don't necessarily need to use key combos to accomplish the task.

I am not sure what is the best approach to Chrome.  IIRC, it does create separate processes for each tab so some window navigation using WinBatch Win* functions or SendKey* functions might be required.


"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

JTaylor

WinActivate might do what you want as well.

Jim

seckner

Tony & Jim, thank you! With your insight I've finally got it working. The answer was actually right under my nose - the very first "User Samples" had a pretty good solution that was posted. I'm working on the suggestion that more work was needed but it works! Thanks again to both of you!!

td

"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade