Jump to content
Sign in to follow this  
Michael Lester

looking at forms tables

Recommended Posts

Michael Lester

I am trying to run one of the example programs but it doesn't work.

I recently installed the latest release.

If this small example works for you please let me know your AutoIT version as well as the include versions.

Thanks

Mike

-----------------------------------------------------------------------------------------------------------------------------

#include <IE.au3>

#include <Array.au3>

$oIE = _IE_Example ("table")

$oTables = _IETableGetCollection ($oIE)

$iNumTables = @extended

MsgBox(0, "Table Info", "There are " & $iNumTables & " tables on the page")

For $oTable In $oTables

$aTable = _IETableWriteToArray($oTable, 1)

_ArrayDisplay($aTable)

Next

; the error message IE.au3 V2.4-0 Error from function _IETableWriteToArray, $_IEStatus_InvalidObjectType

; This appears twice because the example kas two tables in it.

Share this post


Link to post
Share on other sites
Authenticity

Yup, it works great on my end.

Share this post


Link to post
Share on other sites
Michael Lester

Yup, it works great on my end.

Odd that it would work for you and not me.

Could you check the include dates?

Mine are:

Array.au3

Version : 3.2.10++

IE.au3

Version: T1.4

Last Update: 7/24/05

Autoit3.exe version

3.3.0.0

Share this post


Link to post
Share on other sites
Authenticity

Your IE.au3 is not the latest, DaleHohm updated it on "Last Update: 4/26/08"

Edit: "Version: V2.4-1"

Edited by Authenticity

Share this post


Link to post
Share on other sites
Michael Lester

Your IE.au3 is not the latest, DaleHohm updated it on "Last Update: 4/26/08"

Edit: "Version: V2.4-1"

My mistake. Actually I was using that version (as poined out in the error message)

It seems like the object being returned from the

line

_IETableGetCollection ($oIE)

or

the $oTable object in

For $oTable In $oTables

$aTable = _IETableWriteToArray($oTable, 1)

ArrayDisplay($aTable)

Next

is not a table object

I changed the code in ie.au3 to the following and the "MsgBox" popped up.

-------------------------------- Part of the function _IETableWriteToArray() in ie.au3 ------------------------------

If Not __IEIsObjType($o_object, "table") Then

MsgBox(0, "Table Info", "error _IETableWriteToArray")

__IEErrorNotify("Error", "_IETableWriteToArray", "$_IEStatus_InvalidObjectType")

SetError($_IEStatus_InvalidObjectType, 1)

Return 0

EndIf

-----------------------------------------------------------

Any idea how the object could NOT be a table?????

Share this post


Link to post
Share on other sites
Authenticity

Do you have any adblocker like software? What OS you use? Do you have the latest internet explorer version?

Dunno what is the cause of this behavior.

Share this post


Link to post
Share on other sites
Michael Lester

Do you have any adblocker like software? What OS you use? Do you have the latest internet explorer version?

Dunno what is the cause of this behavior.

I have Googles popup blocker

I am running XP professional

and IE 6.0.2900

How about you????

Share this post


Link to post
Share on other sites
Authenticity

IE 7.0.5730.13

No ad blocker either built or external

and XP Professional

Share this post


Link to post
Share on other sites
Michael Lester

IE 7.0.5730.13

No ad blocker either built or external

and XP Professional

Thanks for your help.

I installed IE 7.0 and now the exaple works fine.

I will report that it doesn't work with IE 6.0 to the author of the include file. (ie.au3)

Share this post


Link to post
Share on other sites
DaleHohm

Thanks for your help.

I installed IE 7.0 and now the exaple works fine.

I will report that it doesn't work with IE 6.0 to the author of the include file. (ie.au3)

Consider it reported -- but be assured that that example code ran fine in IE6. It was initially developed and tested with IE6.

Dale (IE.au3 author)


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

Share this post


Link to post
Share on other sites
shahafv

Consider it reported -- but be assured that that example code ran fine in IE6. It was initially developed and tested with IE6.

Dale (IE.au3 author)

sad to report that i use IE 7.0.5730.13

i have the debugbar, and the <IE.au3> version you mentioned.

this code will give me 0 tables found on every $link.

I assume that the problem is deeper than just changing IE version.

I will try this code on other computers, then i will try re-installing autoit/IE etc...

#include <IE.au3>

$link= "http://www.dpreview.com/"

$oIE = _IECreate($link, 0, 1)

_IELoadWait( $oIE )

$j = _IETableGetCollection( $oIE )

MsgBox( 0, "tables found:", Ubound( $j ) )

Share this post


Link to post
Share on other sites
Authenticity

This is not a bug. The function return either an indexed or a collection object and it's not an array of collections... Try this and see:

#include <IE.au3>
$link= "http://www.dpreview.com/"
$oIE = _IECreate($link)
$j = _IETableGetCollection( $oIE )
MsgBox( 0, "tables found:", $j.Length )
Edited by Authenticity

Share this post


Link to post
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
Sign in to follow this  

×