Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
objShell = CreateObject("Shell.Application") objInstances = objShell.windows objIE = 0 If objInstances.Count > 0 ; make sure we have instances open. ForEach objIE In objInstances sName = StrLower(objIE.FullName) If StrIndex( sName, 'iexplore.exe', 1, @FWDSCAN ) != 0 ; internet explorer not windows explorer. ret = AskYesNo( "Found instance of Internet Explorer ":objIE.LocationURL, "Would you like to view html?" ) If ret objInstances = 0 objShell = 0 Break EndIf EndIf Next EndIf If objIE == 0 Pause('Notice', 'Unable to locate any running instances of InternetExplorer') EndIf objDoc = objIE.Document objMainhtml = objDoc.GetElementsbyTagname("HTML").item(0) Pause('Webpage data', objMainhtml.innerhtml) objMainhtml = 0 objDoc = 0 objIE = 0
;Getting a OLE document handle for an open MSIE window ;Check to see if ClassID installed myShellWindowsClsid="{9BA05972-F6A8-11CF-A442-00A0C90A8F39}" ;ShellWindows myShellWindowsKey="AAA.TEST\CLSID" If RegExistValue(@REGCLASSES,myShellWindowsKey) == @FALSE RegSetValue(@REGCLASSES,myShellWindowsKey,myShellWindowsClsid) If RegExistValue(@REGCLASSES,myShellWindowsKey) == @FALSE Message("CLSID Not installed.","Need Admin access") Exit EndIf EndIf SWs=ObjectAccess("AAA.TEST",1) count=Sws.count Message("Count",count) For xx=0 To count-1 windowobject=Sws.Item(xx) lu = windowobject.LocationURL Message("Debug", windowobject.HWND) ; If StrIndexNC(lu, "file://", 1, @FWDSCAN) != 0 ;this would be a IE window Message("Found IE Window",lu) Message("Debug", StrCat(windowobject.name, @CRLF, windowobject.fullname)) ; <----- this seems to be more clear doc = windowobject.document ; EndIf Next
Article ID: W16120
File Created: 2012:01:25:12:24:00
Last Updated: 2012:01:25:12:24:00