Jump to content
Sign in to follow this  
water

Get number of instances using IEAttach

Recommended Posts

water

I use _IEAttach to count the number of IE instances (taken from example 5 in the help file).

Now I know the number of IE instances but how can I check which of this instances is embedded in another window?

Thanks in advance for any help


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-01-27 - Version 1.3.3.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites
water

OK, another try ;-)

At the moment I'm having to "problems" with _IEAttach. I'm running AutoIt 3.3 on Windows XP with IE 7

  • When I click a link to a PDF-File a separate IE window is opened. _IEATTACH doesn't count this as an instance when I use example 5 from the _IEAttach help file.
    ; *******************************************************
    ; 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
    WEnd
    
    MsgBox(0, "Browsers Found", "Number of browser instances in the array: " & $aIE[0])

  • _IEAttach counts Outlook as an IE instance. How can I differentiate between an embedded IE instance and a "real" IE instance?
Any help will be appreciated

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-01-27 - Version 1.3.3.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

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  

×