Jump to content

How to select a Tab / specific Window in IE


Recommended Posts

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..

Link to comment
Share on other sites

#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)

Link to comment
Share on other sites

  • 2 weeks later...

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.

Link to comment
Share on other sites

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.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...