Jump to content

ie question


 Share

Recommended Posts

i want to get a table from IE and create listview items for each row, is there any possibility?

i know _IEtable.... but can anyone give me an example on how to create list view items for each one?

PS: i dont know the content , but i know the headers...

thanks in advance

Link to comment
Share on other sites

i want to get a table from IE and create listview items for each row, is there any possibility?

i know _IEtable.... but can anyone give me an example on how to create list view items for each one?

PS: i dont know the content , but i know the headers...

thanks in advance

i know there is _IETableWriteToArray() but can anyone give me an example of how to use it to create listviews for every row?

EDIT:cmon i dont have much time, ill be away for one week, please help ;;;

Edited by c4nm7
Link to comment
Share on other sites

It's fairly straight forward, you can use _IETagNameGetCollection to grab the rows in the table, write it to an array, then create ListViewItems from that array.

#include <IE.au3>
#include <GUIConstants.au3>

Opt("GUIOnEventMode", 1)

$oIE = _IE_Example("table")
$oTable = _IETableGetCollection($oIE, 0)
$oRows = _IETagNameGetCollection($oTable, "TR")
$rowCount = @extended
Dim $tableRows[$rowCount]
For $i = 0 To $rowCount - 1
    $row = _IETagNameGetCollection($oTable, "TR", $i)
    $tableRows[$i] = $row.innerText
Next

$GUIWin = GUICreate("Table Example")
GUISetOnEvent($GUI_EVENT_CLOSE, "Quit")

$listView = GUICtrlCreateListView("Example", 10, 10, 380, 380)

For $i = 0 To UBound($tableRows) - 1
    GUICtrlCreateListViewItem($tableRows[$i], $listView)
Next

GUISetState()

While 1
    Sleep(10)
WEnd

Func Quit()
    Exit 0
EndFunc
IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font]
Link to comment
Share on other sites

I believe this is a duplicate post. I believe that bigdaddy provided him three enamples in the other thread.

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

Yeah, I found at least one other thread akin to this by c4nm7 as I browsed through this morning. :whistle:

IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font]
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...