Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Retrieve Address/Title/Status Bar of iexplore/explorer


  • Please log in to reply
3 replies to this topic
Sean
  • Members
  • 2462 posts
  • Last active: Feb 07 2012 04:00 AM
  • Joined: 12 Feb 2007
This script retrieves hWnd/URL/Title/StatusText of all running iexplore/explorer Windows, including Tabs.
The shell should be set to explorer.exe for the script to work.

NEED COM Standard Library.

COM_Init()
psh :=	COM_CreateObject("Shell.Application")
psw :=	COM_Invoke(psh, "Windows")
Loop, %	COM_Invoke(psw, "Count")
	pwb := COM_Invoke(psw, "Item", A_Index-1), sInfo .= COM_Invoke(pwb, "hWnd") . " : """ . COM_Invoke(pwb, "LocationURL") . """,""" . COM_Invoke(pwb, "LocationName") . """,""" . COM_Invoke(pwb, "StatusText") . """,""" . COM_Invoke(pwb, "Name") . """,""" . COM_Invoke(pwb, "FullName") . """`n", COM_Release(pwb)
COM_Release(psw)
COM_Release(psh)
COM_Term()

MsgBox, % sInfo


xscope
  • Members
  • 2 posts
  • Last active: Apr 16 2011 05:37 PM
  • Joined: 07 Apr 2011
Not working for IE9

  • Guests
  • Last active:
  • Joined: --
This is for AutoHotkey Basic not _L which has COM built-in.

  • Guests
  • Last active:
  • Joined: --
For _L.
ComError := ComObjError(false)
For pwb in ComObjCreate("Shell.Application").Windows {
	sInfo .= pwb.hWnd " : " pwb.LocationURL " , "
		. pwb.LocationName ", "
		. pwb.StatusText ", "
		. pwb.Name ", "
		. pwb.FullName "`n"
}
MsgBox, % sInfo 
ComObjError(ComError)