jbc1 Posted August 24, 2009 Posted August 24, 2009 Hi, I have a HTML page which is like a 'loading' bar. I wan't to know when this page moves to the next page in a sequence, but the only differance between the 'loading' page and the one after it, is one line of code: <DIV id=status style="DISPLAY: none"> -> "Loading page" <DIV id=status style="DISPLAY: block"> -> "Next page" The code for each page is contained in an "Internet Explorer_Server" Object. I already know how to get the HTML code from this Object, but is there a way of monitoring for the above change? Is this possible ? Thanks.
PsaltyDS Posted August 24, 2009 Posted August 24, 2009 Hi,I have a HTML page which is like a 'loading' bar. I wan't to know when this page moves to the next page in a sequence, but the only differance between the 'loading' page and the one after it, is one line of code:<DIV id=status style="DISPLAY: none"> -> "Loading page"<DIV id=status style="DISPLAY: block"> -> "Next page"The code for each page is contained in an "Internet Explorer_Server" Object. I already know how to get the HTML code from this Object, but is there a way of monitoring for the above change?Is this possible ?Thanks._IELoadWait()? >_< Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
DaleHohm Posted August 25, 2009 Posted August 25, 2009 use _IECreate or _IEAttach and _IENavigate as appropriate to start... then $oStatus = _IEGetObjById($oIE, "status") Do Sleep(1000) Until String(_IEPropertyGet($oStatus, "innerHTML")) = ' -> "Next page"' do more stuff Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble
jbc1 Posted August 25, 2009 Author Posted August 25, 2009 use _IECreate or _IEAttach and _IENavigate as appropriate to start... then $oStatus = _IEGetObjById($oIE, "status") Do Sleep(1000) Until String(_IEPropertyGet($oStatus, "innerHTML")) = ' -> "Next page"' do more stuff Dale Hi Dale, Thanks for your response. Sorry if my post was not clear. The HTML code I want to monitor is this on the first page: <DIV id=status style="DISPLAY: none"> and this on the second: <DIV id=status style="DISPLAY: block"> So is there any way to monitor when the 'style' attribute changes? Thanks.
Pantera975 Posted August 25, 2009 Posted August 25, 2009 (edited) Hi Dale, Thanks for your response. Sorry if my post was not clear. The HTML code I want to monitor is this on the first page: <DIV id=status style="DISPLAY: none"> and this on the second: <DIV id=status style="DISPLAY: block"> So is there any way to monitor when the 'style' attribute changes? Thanks. $oIE = _IECreate ("https://www.google.com", 0, 1) Do $sHTML = _IEBodyReadHTML ($oIE) if StringInStr($sHTML,'<DIV id=status style="DISPLAY: block">') Then $x = 1 Else $x = 0 EndIf until $x=1 Edited August 25, 2009 by Pantera975
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