Sign in to follow this  
Followers 0
Hawkwing

Get website countdown timer data

4 posts in this topic

I've never really used any of the IE stuff in autoit because I use google chrome, but is there a way to get data from a countdown timer on a website?


The Wheel of Time turns, and Ages come and pass, leaving memories that become legend. Legend fades to myth, and even myth is long forgotten when the Age that gave it birth comes again.

Share this post


Link to post
Share on other sites



You should be able to read the value of that page element, yes. Do you have a website that you could share that you want to do this on?

Share this post


Link to post
Share on other sites

Sorry, shoulda put a website in the first post. http://countdown.onlineclock.net/


The Wheel of Time turns, and Ages come and pass, leaving memories that become legend. Legend fades to myth, and even myth is long forgotten when the Age that gave it birth comes again.

Share this post


Link to post
Share on other sites

This was kinda tricky because they use javascript to do the countdown, and based on what time it's supposed to display it shows a different image...

But this seems to work. >_<

#include <IE.au3>
#include <Array.au3>

Global $aTime[10]
Global $varLastTime

$oIE = _IECreate ("http://countdown.onlineclock.net/")

While 1
    $varCount = 0
    $oImgs = _IEImgGetCollection ($oIE)
    $iNumImg = @extended
    For $oImg In $oImgs
        If $oImg.nameProp = "clear.gif" Then ContinueLoop
        $var = StringReplace ($oImg.nameProp, ".gif", "")
        $var = StringReplace ($var, "colon", ":")
        
        If StringLeft($var, 1) = "c" Then $var = StringTrimLeft ($var, 1)
        
        $aTime[$varCount] = $var
        $varCount += 1
    Next

    $string = ""
    For $x = 0 to 9
        $string &= $aTime[$x]
    Next
    
    If $string <> $varLastTime Then
        ToolTip ($string, 0, 0)
        $varLastTime = $string
    EndIf
    Sleep (100)
WEnd

Btw, holla from up the road in Waukee.

Share this post


Link to post
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
Sign in to follow this  
Followers 0