Jump to content
Sign in to follow this  

_IEAttach enhancements in 3.2.11.x beta

Recommended Posts


Hi folks,

Some significant enhancements were added to _IEAttach in the latest betas and I'd like to know that they have gotten some testing prior to the next production release. I've seen no mention of them in the forums, so I was concerned that they got lost in the huge number of changes highlighted in the release notes for this release.

Of particular importance are the addition of an "instance" mode and an "instance" parameter. These allow you to find out how many browser instances are running, attach to a browser other than the first match if more than one matches your criteria. They also allow you to attach to an embedded browser other than the first match if there is more than one in a particular window. In addition, the new version also allows using the new window matching syntax used by many of the Win* functions.

Some of these additions have been long requested.

These examples highlight some of the changes:

; *******************************************************
; Example 4 - Attach to the 3rd browser control embedded in another window
;               Use the advanced window title syntax to use the 2nd window 
;               with the string 'ICQ' in the title
; *******************************************************
#include <IE.au3>
$oIE = _IEAttach ("[REGEXPTITLE:ICQ; INSTANCE:2]", "embedded", 3)

; *******************************************************
; Example 5 - Create an array of object references to all current browser instances
;               The first array element will contain the number of instances found
; *******************************************************
#include <IE.au3>

Dim $aIE[1]
$aIE[0] = 0

$i = 1
While 1
    $oIE = _IEAttach ("", "instance", $i)
    If @error = $_IEStatus_NoMatch Then ExitLoop
    ReDim $aIE[$i + 1]
    $aIE[$i] = $oIE
    $aIE[0] = $i
    $i += 1

MsgBox(0, "Browsers Found", "Number of browser instances in the array: " & $aIE[0])

Your assistance in testing, particularly if you have an application for the new functionality, would be appreciated.



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

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