#cs ----------------------------------------------------------------------------

AutoIt Version: 3.3.6.1
Author: H. Tsubota

Script Function:
    Webサイトのテーブルからデータを取得

#ce ----------------------------------------------------------------------------
#include <IE.au3>

$oIE = _IECreate ("stocks.finance.yahoo.co.jp/stocks/history/?code=998407.O")

$oTable = _IETagNameGetCollection ( $oIE, "table", 1)
$oLines = _IETagNameGetCollection ( $oTable, "tr")

Run( "notepad.exe")
WinWaitActive("[CLASS:Notepad]")

$iLines = $oLines.length -1
For $i=1 To $iLines    
    $line = $oLines($i)
    $oData = _IETagNameGetCollection ($line, "td")
    $sDate = $oData(0).innerText
    $sStart = $oData(1).innerText
    $sHeigh = $oData(2).innerText
    $sLow = $oData(3).innerText
    $sEnd = $oData(4).innerText
    ControlSend("[CLASS:Notepad]", "", "Edit1", $sDate & ":" & $sStart & " / " & $sHeigh & " / " & $sLow & " / " & $sEnd &"{Enter}")
Next

_IEQuit($oIE)

Blog <実験記録 No.02>.