soulhealer Posted January 18, 2008 Share Posted January 18, 2008 hi, does anyone know how to remove or stop a timer that is running on an IE page? Link to comment Share on other sites More sharing options...
DaleHohm Posted January 18, 2008 Share Posted January 18, 2008 "timer" is a very generic term. Please be specific. 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 Link to comment Share on other sites More sharing options...
soulhealer Posted January 18, 2008 Author Share Posted January 18, 2008 "timer" is a very generic term. Please be specific.Dalea meta refresh tag timer that refresh/forward the page in few seconds.thanks Link to comment Share on other sites More sharing options...
FreeFry Posted January 18, 2008 Share Posted January 18, 2008 Doesn't it work by just editing the meta tags out on the fly? I know I did something similar once. - Not related to timers though... Link to comment Share on other sites More sharing options...
soulhealer Posted January 18, 2008 Author Share Posted January 18, 2008 please post an example, thank you Link to comment Share on other sites More sharing options...
FreeFry Posted January 18, 2008 Share Posted January 18, 2008 Well, it was just a test I was doing, I don't think I have the script anymore, but it used the IE.au3 UDF to edit the html on the fly... Link to comment Share on other sites More sharing options...
DaleHohm Posted January 18, 2008 Share Posted January 18, 2008 Something like: $oMetas = _IETagnameGetCollection($oIE, "meta") ConsoleWrite("Meta tags found: " & @extended & @CR) ; for debug For $oMeta in $oMetas ConsoleWrite(_IEPropertyGet($oMeta, "outerhtml") & @CR) ; for debug If StringInStr(_IEPropertyGet($oMeta, "outerhtml"), "refresh") Then _IEPropertySet($oMeta, "outerhtml", "") EndIf Next ;Show we got rid of it $oMetas = _IETagnameGetCollection($oIE, "meta") ConsoleWrite("Meta tags found: " & @extended & @CR) ; for debug For $oMeta in $oMetas ConsoleWrite(_IEPropertyGet($oMeta, "outerhtml") & @CR) Next 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 Link to comment Share on other sites More sharing options...
FreeFry Posted January 18, 2008 Share Posted January 18, 2008 (edited) Hmm, I don't think that's how I did it, but perhaps, that is a better way to do it? I can remember that mine use _IEDocReadHTML() and _IEDocWriteHTML() to change the code on the fly(which suprisingly had effect instantly, as I was expecting to have to refresh/apply the modified code somehow, but no).Edit:Wie, I found the old script:expandcollapse popup#include <IE.au3> #include <Array.au3> _IEErrorHandlerRegister() Opt("TrayIconDebug", 1) Dim $HasAttached = False While 1 If ProcessExists("iexplore.exe") And Not $HasAttached Then $ieObj = _IEAttach("google", "URL") If @error Then ContinueLoop $HasAttached = True ElseIf Not ProcessExists("iexplore.exe") Then $ieObj = 0 $HasAttached = False ContinueLoop EndIf _IELoadWait($ieObj, 0, 5500) $BodyHtml = _IEDocReadHTML($ieObj) If @error Then $HasAttached = False ContinueLoop EndIf If StringInStr($BodyHtml, "name=btnG>") Or StringInStr($BodyHtml, "name=btnI>") Then $BodyHtml = StringSplit($BodyHtml, @CRLF, 1) For $i = 1 To $BodyHtml[0] If StringInStr($BodyHtml[$i], "name=btnG") Then $trim = StringLeft($BodyHtml[$i], StringInStr($BodyHtml[$i], "name=btnG>") + 8) $trim = StringTrimLeft($trim, StringInStr($trim, ">", 0, -1)) & ">" $BodyHtml[$i] = StringReplace($BodyHtml[$i], $trim, "") EndIf ;~ If StringInStr($BodyHtml[$i], "name=btnI>") Then $trim = StringLeft($BodyHtml[$i], StringInStr($BodyHtml[$i], "name=btnI>") + 8) $trim = StringTrimLeft($trim, StringInStr($trim, ">", 0, -1)) & ">" $BodyHtml[$i] = StringReplace($BodyHtml[$i], $trim, "") EndIf ;~ If StringInStr($BodyHtml[$i], "name=q>") Then $trim = StringLeft($BodyHtml[$i], StringInStr($BodyHtml[$i], "name=q>") + 5) $trim = StringTrimLeft($trim, StringInStr($trim, ">", 0, -1)) & ">" $BodyHtml[$i] = StringReplace($BodyHtml[$i], $trim, "") EndIf Next $BodyHtml = _ArrayToString($BodyHtml, @CRLF, 1, $BodyHtml[0]) _IEDocWriteHTML($ieObj, $BodyHtml) EndIf Sleep(100) WEndFor this example, I created a simple html file(place it in the same directory as the script):http://freefry.dynalias.com/files/Redirect%20Test.html Edited January 19, 2008 by FreeFry 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