Компьютерный форум OSzone.net  

Компьютерный форум OSzone.net (http://forum.oszone.net/index.php)
-   AutoIt (http://forum.oszone.net/forumdisplay.php?f=103)
-   -   html Таблицу в массив (http://forum.oszone.net/showthread.php?t=183059)

serg-pl-1 16-08-2010 12:41 1474676

html Таблицу в массив
 
У меня есть вот такой кусок кода

Код:

#include <IE.au3>
#include <Array.au3>

Global $oIE
_Login("http://voyna-plemyon.ru", "-=Смольный=-", "123456", "Мир 1")

$oTable = _IETableGetCollection($oIE, 0)
$aTableData = _IETableWriteToArray($oTable)
_ArrayDisplay($aTableData)

Func _Login($sURL, $sLogin, $sPass, $sWorld)
    $oIE = _IECreate($sURL,0 ,1)
    $oLogin = _IEGetObjById($oIE, "user")
    $oPass = _IEGetObjById($oIE, "password")
    _IEFormElementSetValue($oLogin, $sLogin)
    _IEFormElementSetValue($oPass, $sPass)

    $oLinks = _IELinkGetCollection($oIE)
    For $oLink In $oLinks
        $sLinkText = _IEPropertyGet($oLink, "innerText")
        If StringInStr($sLinkText, "Вход") Then
            _IEAction($oLink, "click")
        EndIf
    Next

    ; Listener
    While _SelectWorld($sWorld)
        Sleep(100)
    WEnd

    _IELoadWait($oIE)

EndFunc

Func _SelectWorld($sWorld)
    $oWorlds = _IELinkGetCollection($oIE)
    For $oWorld In $oWorlds
        $sWorldText = _IEPropertyGet($oWorld, "innerText")
        If StringInStr($sWorldText, $sWorld) Then
            _IEAction($oWorld, "click")
            Return 0
        EndIf
    Next
    Return 1
EndFunc

Но вот эта часть

Код:

$oTable = _IETableGetCollection($oIE, 0)
$aTableData = _IETableWriteToArray($oTable)

возвращает ошибку

--> IE.au3 V2.4-0 Warning from function _IETableGetCollection, $_IEStatus_NoMatch
--> IE.au3 V2.4-0 Error from function _IETableWriteToArray, $_IEStatus_InvalidDataType

Хотя на других сайтах работает изумительно


Время: 06:00.

Время: 06:00.
© OSzone.net 2001-