Jump to content


Photo

Retrieve Address/Title/Status Bar of iexplore/explorer


  • Please log in to reply
3 replies to this topic

#1 Sean

Sean
  • Members
  • 2462 posts

Posted 16 May 2007 - 11:52 AM

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


#2 xscope

xscope
  • Members
  • 2 posts

Posted 20 April 2011 - 12:12 AM

Not working for IE9

#3 Guests

  • Guests

Posted 23 February 2012 - 10:10 AM

This is for AutoHotkey Basic not _L which has COM built-in.

#4 Guests

  • Guests

Posted 23 February 2012 - 10:43 AM

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)