Jump to content

How Can I Get the URLs of All the Tabs Open, in IE?


Zohar
 Share

Recommended Posts

See the _IEAttach, instance, example in the helpfile. Compare the _IEPropertyGet, hwnd, of the items returned to the hwnd of the IE window you are interested in.

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

No

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

Zohar, you can get the URLs of All IE Tabs open, sorted by IE Window handle ;)

#include <IE.au3>

$_IeTabUrls = _GetIeTabs ( )

$_K = 0
For $_I = 1 To UBound ( $_IeTabUrls ) -1
    If $_IeTabUrls[$_I][0] <> $_IeTabUrls[$_I-1][0] Then
        $_K+=1
        ConsoleWrite ( $_K & '° IE Window Hwnd : ' & $_IeTabUrls[$_I][0] & @CRLF )
    EndIf
    ConsoleWrite ( '+ IE Tab Object LocationUrl : ' & $_IeTabUrls[$_I][1].LocationUrl & @CRLF )
Next

Func _GetIeTabs ( )
    Local $i = 1, $_WinList = WinList ( '[CLASS:IEFrame]' )
    Dim $_ArrayInfos[100][2]
    While 1
        $oIE = _IEAttach ( '', 'instance', $i )
        If @error = $_IEStatus_NoMatch Then ExitLoop
        For $_I = 1 To UBound ( $_WinList ) -1
            If '0x' & Hex ( $oIE.Hwnd ) = $_WinList[$_I][1] Then
                $_ArrayInfos[$i][0] = $_WinList[$_I][1] ; hwnd
                $_ArrayInfos[$i][1] = $oIE ; tab ie obj
            EndIf
        Next
        $i += 1
    WEnd
    ReDim $_ArrayInfos[$i][2]
    $_ArrayInfos[0][0] = UBound ( $_ArrayInfos ) -1
    Return $_ArrayInfos
EndFunc ;==> _GetIeTabs ( )

AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

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