anna_denri Posted January 17, 2020 Share Posted January 17, 2020 Hello. After going over $ sUrl, starts working JS, its working time is always different, so I used the function Sleep($ max). Only this greatly slows down the script. I wrote the function Povtor($ sDivId), but here's the error: -> IE.au3 T3.0-2 Warning from function _IEGetObjById, $ _IESTATUS_NoMatch (bloodrain) Please help solve this problem without using sleep (). Local $oIE = _IECreate($sUrl) Povtor("bloodrain") Func Povtor($sDivId) While Sleep(500) Local $oDiv = _IEGetObjById($oIE, $sDivId) If IsObj($oDiv) Then _IEAction($oDiv, "click") _IELoadWait($oIE) Else ExitLoop EndIf WEnd EndFunc Link to comment Share on other sites More sharing options...
Nine Posted January 17, 2020 Share Posted January 17, 2020 (edited) Could you show the DOM area of the object "bloodrain" ? Beside it is just a warning not an error ! Use this : Local $oIE = _IECreate($sUrl) ConsoleWrite (Povtor("bloodrain") & @CRLF) Func Povtor($sDivId) Local $Count = 0 While True Sleep(100) Local $oDiv = _IEGetObjById($oIE, $sDivId) If IsObj($oDiv) Then _IEAction($oDiv, "click") _IELoadWait($oIE) Return True Else $Count += 1 if $Count > 500 then return False EndIf WEnd EndFunc Edited January 17, 2020 by Nine anna_denri 1 “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
anna_denri Posted January 17, 2020 Author Share Posted January 17, 2020 4 minutes ago, Nine said: Could you show the DOM area of the object "bloodrain" ? <a href="" class="off_tap" onclick="return endBTTiming()"> <div id="bloodrain"> <div> <div> <img src="src/die_msg153.png" alt=""> <div>Нажмите, чтобы продолжить..</div> </div> </div> </div> </a> Do you need the code for the whole page? Link to comment Share on other sites More sharing options...
anna_denri Posted January 17, 2020 Author Share Posted January 17, 2020 32 minutes ago, Nine said: Beside it is just a warning not an error ! Yes, a warning. My script runs faster than JS works, and does not find the "bloodrain" object. If use then everything works, but I don’t like it .... Local $oIE = _IECreate($sUrl) _IELoadWait($oIE) Sleep(60000) Local $oDiv = _IEGetObjById($oIE, $sDivId) If IsObj($oDiv) Then _IEAction($oDiv, "click") _IELoadWait($oIE) Else ExitLoop EndIf Link to comment Share on other sites More sharing options...
Nine Posted January 17, 2020 Share Posted January 17, 2020 Try the code I gave you. Make the count the value you want. Also you can disable notification with _IEErrorNotify (False) function temporary. “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
anna_denri Posted January 17, 2020 Author Share Posted January 17, 2020 16 minutes ago, Nine said: Try the code I gave you. Make the count the value you want. Also you can disable notification with _IEErrorNotify (False) function temporary. Yes, the code works! Thanks! Thanks! Thanks! Can I turn off notifications directly in the body of the Povtor () function? Link to comment Share on other sites More sharing options...
Nine Posted January 17, 2020 Share Posted January 17, 2020 26 minutes ago, anna_denri said: Can I turn off notifications directly in the body of the Povtor () function? Yes you can do it inside the function. “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now