#include #include #include #include #include #include ; #include #Include #Include #include #include #include #include Opt("TrayIconDebug",1) $sUrl = 'https://moskva.beeline.ru/customers/products/mobile/services/archive/' Local $oIE = _IECreate ($sUrl, 1) _IELoadWait($oIE) Sleep(3000) Local $oSpans=_IETagNameGetCollection($oIE, "span") For $oSpan In $oSpans If $oSpan.getAttribute("data-url") = "/complexwidget/getwidget/?itemId=466660&ui-page=426824&ui-part=466650&ui-culture=ru-ru&ui-region=moskva" Then _IEAction($oSpan, "click") ExitLoop EndIf Next Sleep(7000) $aHTML = _IEBodyReadHTML($oIE) $File=FileOpen ("html.htm", 2) FileWrite($File, $aHTML) FileClose($File) Sleep(3000) htm(); Sleep(1000) $kod_f = FileReadLine('kod_phone.txt', 1); $oPhoneCode = _IEGetObjById($oIE, $kod_f) _IEFormElementSetValue($oPhoneCode, '905') $kod_f2 = FileReadLine('kod_phone.txt', 2); $oPhone = _IEGetObjByName($oIE, $kod_f2) _IEFormElementSetValue($oPhone, '5230000') $oBody = _IEGetObjByName($oIE, 'Body') _IEFormElementSetValue($oBody, 'привет') $oCaptcha = _IEGetObjByName($oIE, 'Captcha') _IEFormElementSetValue($oCaptcha, '12345') Func htm(); $htm = 'html.htm'; $htmtxt = 'htm.txt'; $str30=_FileCountLines($htm); Sleep(100) $t280 = 1; While $t280 <= $str30; ;----- $sLine0 = FileReadLine($htm, $t280); If (StringInStr($sLine0, 'Phone') And StringInStr($sLine0, 'jQuery.fn.beephone')) Then FileWriteLine($htmtxt, $sLine0); If (StringInStr($sLine0, 'PhoneComplexElement') And StringInStr($sLine0, 'Не указан телефон')) Then FileWriteLine($htmtxt, $sLine0) ;----- $t280 = $t280 + 1 WEnd Sleep(200) $htmtxt1 = FileReadLine($htmtxt, 1); $kod = StringLeft($htmtxt1, 291); $kodn = StringRight($kod,36); FileWriteLine('kod_phone.txt', $kodn); Sleep(200) $htmtxt1 = FileReadLine($htmtxt, 2); $kod = StringLeft($htmtxt1, 392); $kodn = StringRight($kod, 56); FileWriteLine('kod_phone.txt', $kodn); EndFunc