Jump to content
lillo78

Error trying to access a table from a website

Recommended Posts

lillo78

Hi, 

i am trying to access to this site and get the values from it's first table. Here is my code:

Local $oIE = _IECreate($sWeb)

Local $oTable = _IETableGetCollection($oIE, 0)
If @error Then MsgBox(0, "", "Error " & @error)
 

So, the error i'm getting is number 7  ($_IEStatus_NoMatch) - No Match  and i have no clue what's going wrong.  Any idea why Autoit is not getting the table?

Thank you in advance!

Share this post


Link to post
Share on other sites
lillo78

Well, i think it's because i'm trying to access a table withing a frame directly with  _IETableGetCollectio. I guess i should get the frames first and then get to the table.

I'll try it and see what happens.

Share this post


Link to post
Share on other sites
lillo78

yup, it works perfectly now. Here's the code:

Local $oFrames = _IEFrameGetCollection($oIE)

Local $iNumFrames = @extended

If @error Then MsgBox(0, "", "Error " & @error)
For $i = 0 To ($iNumFrames - 1)
        $oFrame = _IEFrameGetCollection($oIE, $i)
Next
Local $oTable = _IETableGetCollection($oFrame, 0)
Local $aTableData = _IETableWriteToArray($oTable, True)

Thank you!

Edited by lillo78

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

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.