Sign in to follow this  
Followers 0
smstroble

Transform your summer odds ticker

1 post in this topic

#1 ·  Posted (edited)

Haha one of these days the odds are going to be good and I'm going to get me a mountain dew refrigerator!

;Odds of winning
#include <GUIConstants.au3>


Dim $pages[12], $baselabels[12]
$pages[0] = "http://pepsi.yahoo.com/transformyoursummer/ultimate_gaming.php"
$baselabels[0] = "Ultimate Gaming Package:              "
$pages[1] = "http://pepsi.yahoo.com/transformyoursummer/trip_mlb.php"
$baselabels[1] = "Today's Trip or Cash Prize:               "
$pages[2] = "http://pepsi.yahoo.com/transformyoursummer/pana_dvd.php"
$baselabels[2] = "Panasonic DVD Player-Recorder:            "
$pages[3] = "http://pepsi.yahoo.com/transformyoursummer/pana_cam.php"
$baselabels[3] = "Panasonic Camcorder:                  "
$pages[4] = "http://pepsi.yahoo.com/transformyoursummer/xbox.php"
$baselabels[4] = "Xbox" & Chr(153) & " Console:                     "
$pages[5] = "http://pepsi.yahoo.com/transformyoursummer/prize_100.php"
$baselabels[5] = "$100 Cash:                            "
$pages[6] = "http://pepsi.yahoo.com/transformyoursummer/dvd_collection.php"
$baselabels[6] = "Paramount DVD Collection:             "
$pages[7] = "http://pepsi.yahoo.com/transformyoursummer/pepsi_prime.php"
$baselabels[7] = "Optimus Prime® Collectible:              "
$pages[8] = "http://pepsi.yahoo.com/transformyoursummer/dew_fridge.php"
$baselabels[8] = "Mountain Dew" & Chr(153) & " Mini Fridge:             "
$pages[9] = "http://pepsi.yahoo.com/transformyoursummer/prize_25.php"
$baselabels[9] = "$25 Cash:                         "
$pages[10] = "http://pepsi.yahoo.com/transformyoursummer/hoodie.php"
$baselabels[10] = "Mountain Dew" & Chr(153) & " Hoodie:                 "
$pages[11] = "http://pepsi.yahoo.com/transformyoursummer/yahoo_music.php"
$baselabels[11] = "Y! Music Unlimited Downloads:            "

Dim $posswinners[12], $current[12], $label[12], $oldodds[12]

$maingui = GUICreate("Pepsi" & Chr(153) & " Sweepstakes Odds", 500, 130)
For $i = 0 to 5
    $label[$i] = GUICtrlCreateLabel($baselabels[$i], 3, $i*20+7, 244)
    $label[$i+6] = GUICtrlCreateLabel($baselabels[$i+6], 253, $i*20+7, 244)
Next

GUISetState()

While 1
    For $i = 0 to 11
        InetGet($pages[$i], "Temp.html")
        $file = FileOpen("Temp.html", 0)
       
        If $i = 10 Then
            $line = FileReadLine($file, 134)
        ElseIf $i = 1 Then
            $line = FileReadLine($file, 115)
        Else
            $line = FileReadLine($file, 120)
        EndIf

        $split = StringSplit($line, "<>")
        $posswinners[$i] = $split[7]

        If $i = 10 Then
            $line = FileReadLine($file, 139)
        ElseIf $i = 1 Then
            $line = FileReadLine($file, 120)
        Else
            $line = FileReadLine($file, 125)
        EndIf
        $split = StringSplit($line, "<>")
        $current[$i] = $split[7]

        FileClose($file)
        FileDelete("Temp.html")
        $odds = ($posswinners[$i]/$current[$i])*100
        $newlabel = $baselabels[$i] & Round($odds, 3) & "%"
       
        GUICtrlSetData($label[$i], $newlabel)
        If $odds = $oldodds[$i] Then
            GUICtrlSetColor($label[$i], Dec("000000"))
        Else
            GUICtrlSetColor($label[$i], Dec("000000"))
            sleep(100)
            GUICtrlSetColor($label[$i], Dec("FF0000"))
            $oldodds[$i] = $odds
        EndIf
    Next
    sleep(5000)
WEnd

Now no stealing my mt.dew refrigerator with my own script :) .

EDIT: Ooohhhhh... Neat, when did they make the autoit box scrollable?

EDIT2: Fixed tm Character problem.

Edited by smstroble

MUHAHAHAHAHA

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