Jump to content

IE help


Recommended Posts

The thing is, in my code, the [$row][$col] that I have assigned is giving me the correct info when msgBox the field out. Do you see any flaw in the code?

You're not really asking me what could be wrong that's causing your script to work correctly, are you?!

:rolleyes:

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

attached is what the site looks like, of course with information changed....just so you know exactly what I'm looking at.

Good idea, that helped a lot! But I'm seeing the strange row/col to col/row reversal I mentioned earlier. It's not hard to compensate for, just unexpected. The number you want clearly shows up in the page at the third row down [2], and the second column [1]. But when the _ArrayDisplay() shows that table "Table: 0", you see it at [1][2].

This demo pulls the data from that page two different ways. First it shows the contents of all the tables, then it only pulls data from the one table:

#include <ie.au3>
#include <array.au3>

$HtmlFile = "C:\Temp\License_Confirmation.htm" ; the downloaded file
$oIE = _IECreate($HtmlFile)

; Reading all the tables
$colTables = _IETableGetCollection($oIE)
MsgBox(64, "Tables", "There are " & @extended & " tables.")
$n = 0
For $oTable In $colTables
    _ArrayDisplay(_IETableWriteToArray($oTable), "Table: " & $n)
    $n += 1
Next

; Reading only the table of interest
$oTable = _IETableGetCollection($oIE, 0)
$avTable = _IETableWriteToArray($oTable)
$ProductKey = $avTable[1][2]
MsgBox(64, "Product Key", "The product key is: " & $ProductKey)

Cheers!

:rolleyes:

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

AutoIt arrays do not have a concept of rows and columns - how would you apply it to a 3 or 4 or 5 dimensional array? I can understand why you would say that the assignment of rows and columns to the array is backwards however.

I might add a transpose option to the function in the future, but for now you'll simply need to adjust your perspective.

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

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...