Jump to content
Sign in to follow this  
rajeshontheweb

How to select a Tab / specific Window in IE

Recommended Posts

rajeshontheweb

Hi there, i rather keep this seperate that it might be useful as such.

i am trying two things with IE.au3

1) give an option to the user to select a window (which would be populated using all available windows or something like that) - this is a later on project

2) main requirement - i need to select a specific tab in internet explorer

say i have some page and when i double click, it opens a tab whose title i may not be knowing all the time.

if i am allowed to select a window like using a file picker or something, then i would be able to extract the content from that window and work with it. how easy can this be achieved?

Trouble is that i dont wanna be running the code with a specific window class title everytime i want to call this script.

pls confirm if my question is clear enough sorry for the language..

Share this post


Link to post
Share on other sites
Authenticity

#include <IE.au3>
Dim Const $navOpenInNewTab = 0x0800

Dim $o_IE = _IECreate('http://www.google.com/')
$o_IE.Navigate2('http://www.yahoo.com', $navOpenInNewTab)

Dim $hWnd = _IEPropertyGet($o_IE, 'hwnd')

ControlSend($hWnd, '', '', '^{TAB}')
Sleep(500)
ControlSend($hWnd, '', '', '^{TAB}')
Sleep(500)
ControlSend($hWnd, '', '', '^{TAB}')
Sleep(500)
ControlSend($hWnd, '', '', '^{TAB}')
Sleep(500)

Share this post


Link to post
Share on other sites
LondonNDIB

Hi, I've been away from AutoIt for a long time. Have a need to open a new browser in a new tab and found this solution. However, "Navigate2" doesn't appear to be a valid function.

I downloaded the latest version (3.3) but still no love. Considered maybe its in the beta, but according to the update program the beta is older than the release?

Lil help? ^_^

thanks.

Share this post


Link to post
Share on other sites
LondonNDIB

I see, thank you.

So there's probably no (reasonably simple) way of opening a page in a new browser AND having it returned as an opject in my script for further automation?

That's ok. I guess it isn't THAT important that I do it in a tab. I'll just open a 2nd window. Thanks.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.