joeloyzaga Posted April 11, 2009 Share Posted April 11, 2009 I have this script and it works by opening the url and then dumping the doc tags and values - but I want to get it to search for any open browsers (lets make it IE only for now) and ask me to choose which one to work on this is the scipt below to incorporate it into - I'd appreciate and help with this script - Thanks #include <IE.au3> $oIE = _IECreate ("www.google.com") $oElements = _IETagNameAllGetCollection ($oIE) $oExcel = ObjCreate("Excel.Application") $oExcel.Visible = True $oExcel.Workbooks.add $oExcel.ActiveWorkbook.Sheets(1).Cells(1, 1).Value = "Tag Name" $oExcel.ActiveWorkbook.Sheets(1).Cells(1, 2).Value = "Inner Text" $oExcel.ActiveWorkbook.Sheets(1).Cells(1, 3).Value = "outer Text" $oExcel.ActiveWorkbook.Sheets(1).Cells(1, 4).Value = "outerHTML" $oExcel.ActiveWorkbook.Sheets(1).Cells(1, 5).Value = "uniqueid" $oExcel.ActiveWorkbook.Sheets(1).Cells(1, 6).Value = "innerHTML" $RowNumber =2 For $oElement In $oElements $oExcel.ActiveWorkbook.Sheets(1).Cells($RowNumber, 1).Value = $oElement.tagname $oExcel.ActiveWorkbook.Sheets(1).Cells($RowNumber, 2).Value = $oElement.innerText $oExcel.ActiveWorkbook.Sheets(1).Cells($RowNumber, 3).Value = $oElement.outerText $oExcel.ActiveWorkbook.Sheets(1).Cells($RowNumber, 4).Value = $oElement.outerHTML $oExcel.ActiveWorkbook.Sheets(1).Cells($RowNumber, 5).Value = $oElement.uniqueid $oExcel.ActiveWorkbook.Sheets(1).Cells($RowNumber, 6).Value = $oElement.innerHTML $RowNumber = $RowNumber + 1 Next Link to comment Share on other sites More sharing options...
Authenticity Posted April 11, 2009 Share Posted April 11, 2009 (edited) Open browsers or open tabs? Edited April 11, 2009 by Authenticity Link to comment Share on other sites More sharing options...
joeloyzaga Posted April 11, 2009 Author Share Posted April 11, 2009 Open browsers or open tabs?I guess I need it to be any open tabs within any IE session Link to comment Share on other sites More sharing options...
Authenticity Posted April 11, 2009 Share Posted April 11, 2009 Well, it's quite hard to inspect each tab or it's just me:http://social.msdn.microsoft.com/Forums/en...f-c7f8816b9000/As for the windows, it's possible to enumerate and ask the user with which window to work.#include <IE.au3> Dim $avWin Dim $oIE While 1 $avWin = WinList('[CLASS:IEFrame]') For $i = 1 To $avWin[0][0] If MsgBox(0x24, 'Choose window', 'Work with "' & $avWin[$i][0] & '"?') = 6 Then ; Yes ExitLoop(2) EndIf Next WEnd ;$oIE = _IEAttach($avWin[$i][1], 'hwnd') Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now