Jump to content

how to remove/stop a timer on an IE page?


Recommended Posts

"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

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

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:

#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)

WEnd

For 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 by FreeFry
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...