#include <IE.au3>
$sUrl = 'http://www.consultant.ru/online/'
$j = 0
$fYes = False
$fNo = False
Dim $aDocs[$j + 1]
$oIE = _IECreate($sUrl)
_IELinkClickByText($oIE, 'Специальная интернет-версия')
_IELinkClickByText($oIE, 'за месяц')
$oTotalCount = _IEGetObjById($oIE, 'totalCount')
$iTotalCount = _IEPropertyGet($oTotalCount, 'innertext')
$oCurrIdx = _IEGetObjById($oIE, 'currIdx')
$hIE = _IEPropertyGet($oIE, 'hwnd')
$oList = _IEGetObjById($oIE, 'lst_cnt')
_IEAction($oList, 'focus')
If Not WinActive($hIE) Then WinActivate($hIE)
WinWaitActive($hIE)
BlockInput(1)
$iStart = TimerInit()
While 1
	ControlSend($hIE, '', '', '{DOWN}')
	$iCurrIdx = _IEPropertyGet($oCurrIdx, 'innertext')
	ToolTip($iCurrIdx, 0, 0)
	If $iCurrIdx == $iTotalCount Then ExitLoop
	If TimerDiff($iStart) > 300000 Then;5 min
		BlockInput(0)
		MsgBox(16, 'Info', 'Время вышло')
		_IEQuit($oIE)
		Exit
	EndIf
	Sleep(2)
WEnd
BlockInput(0)
$sText = _IEPropertyGet($oList, 'innertext')
_IEQuit($oIE)
If Not $sText Then Exit
$aTemp = StringSplit(StringStripCR($sText), @LF)
For $i = 1 To $aTemp[0]
	If StringRegExp($aTemp[$i], '\d+кб.', 0) Then
		$j += 1
		ReDim $aDocs[$j + 1]
		$fYes = True
		$fNo = False
	Else
		$fNo = True
	EndIf
	If $fYes And $fNo Then
		$aDocs[$j] &= $aTemp[$i] & @CRLF
		$fNo = False
	EndIf
Next
$aDocs[0] = $j
$hFile = FileOpen(@ScriptDir & '\' & @MDAY & '_' & @MON & '.txt', 2)
For $i = 1 To $aDocs[0]
	If $i <> $aDocs[0] Then
		FileWrite($hFile, $i & '. ' & $aDocs[$i] & '----------------------------------------------' & @CRLF)
	Else
		FileWrite($hFile, $i & '. ' & $aDocs[$i] & '----------------------------------------------')
	EndIf
Next
FileClose($hFile)