Trying to use jethrow's IEGet ( but looks like I am not getting it ( no pun intended).
Code: Select all
WinActivate, badwindow - Internet Explorer
WinWaitActive, badwindow - Internet Explorer
IEGet()
while wb.Busy
Sleep 200
Astatus := wb.Document.getElementsByClassName("navLabel")
MsgBox % Astatus.length
IEGet(Name="", HwndFilter="") {
if (Name = "") ;// Get active window name if no parameter
WinGetTitle, Name, % "ahk_id" HwndFilter:=WinExist("ahk_class IEFrame")
Name := (Name="New Tab - Windows Internet Explorer")? "about:Tabs":RegExReplace(Name, " - (Windows|Microsoft) Internet Explorer")
for wb in ComObjCreate("Shell.Application").Windows
if wb.LocationName=Name and InStr(wb.FullName, "iexplore.exe")
if Not HwndFilter or (HwndFilter and wb.hwnd=HwndFilter)
return wb
}