Jump to content

activate IE tab is working in IE11 but not working in IE8


Recommended Posts

there are 2 tabs in current IE window

www.a.com

www.b.com

and www.b.com is activated now I want to jump to www.a.com

the code is working in my Windows 7 x64 with IE 11. however it is not working in my windows xp VM with IE 8.

here is my code:

#Include <IE.au3>

local $oIE
$oIE=IEAttachByUrl($oIE,"http://www.google.com/")
;MsgBox(0,_IEPropertyGet($oIE, "locationurl"),_IEPropertyGet($oIE, "HWnd")))
WinActivate(_IEPropertyGet($oIE, "title"))

 Func IEAttachByUrl($IE, $url)
local $urlMatch
Local $aIE[1]
$aIE[0] = 0

Local $i = 1, $oIE
While 1
    $oIE = _IEAttach("", "instance", $i)
    If @error = $_IEStatus_NoMatch Then ExitLoop

$urlMatch=_IEPropertyGet($oIE, "locationurl")
ConsoleWrite($urlMatch)
if $url=$urlMatch Then
  return $oIE
    EndIf
    ReDim $aIE[$i + 1]
    $aIE[$i] = $oIE
    $aIE[0] = $i
    $i += 1
 WEnd
;MsgBox($MB_SYSTEMMODAL, "Browsers Found", "Number of browser instances in the array: " & $aIE[0])
EndFunc
 

 

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