#include <IE.au3>
$sDate = '17.02.2011'
$sUrl = 'http://bank.gov.ua/kurs/last_kurs1.htm'
$iError = 1
$oIE = _IECreate($sUrl);, 0, 0)
If @error Then
MsgBox(16, 'Error', '_IECreate')
Exit
EndIf
For $i = 1 To 1
$oFrame = _IEFrameGetObjByName($oIE, 'content2')
If @error Then ExitLoop
$oForm = _IEGetObjById($oFrame, 'Form2')
If @error Then ExitLoop
$oDate = _IEFormElementGetObjByName($oForm, 'Text1')
If @error Then ExitLoop
_IEFormElementSetValue($oDate, $sDate)
If @error Then ExitLoop
$oSub = _IEFormElementGetObjByName($oForm, 'exe_but')
If @error Then ExitLoop
_IEAction($oSub, 'click')
If @error Then ExitLoop
_IELoadWait($oFrame)
If @error Then ExitLoop
$oForm_1 = _IEGetObjById($oFrame, 'tableForm')
If @error Then ExitLoop
$oTags = _IETagNameGetCollection($oForm_1, 'tr')
If @error Then ExitLoop
For $oTag In $oTags
If StringInStr($oTag.innertext, 'США') Then
$oRate = _IETagNameGetCollection($oTag, 'td', 4)
If @error Then ExitLoop 2
$sRate = $oRate.innertext
ExitLoop
EndIf
Next
$iError = 0
Next
;_IEQuit($oIE)
If $iError Then
MsgBox(16, 'Error', 'Error')
Else
MsgBox(64, $sDate, '100$' & @TAB & $sRate & ' гр.')
EndIf