Jump to content
Sign in to follow this  

Forum Raffle Predictor

Recommended Posts


Okay, what i'm trying to do is pull past winning numbers off of a site. This is a 3 ball lotto. Say the last winning numbers were stored at www.lottosite.com/index.php?act=stash&a=203&n=342246 and the ones before that were index.php?act=stash&a=203&n=342245 . This is how the page shows the winning numbers via the code: <td>Numbers Picked For This Raffle:</td></tr><tr align=center><td>

<img src="/images/l/11.gif"> <img src="/images/l/10.gif"> <img src="/images/l/7.gif">

How can I go about pulling these past say 100 winning numbers and adding them to an xml/text file for parsing. Also, how would I go about searching this text file for hot/cold numbers? Any help with this will receive a +1 in my book, i'm just basically doing this as a fun project to keep me occupied, but need help! Thanks in advance!

Edited by adroitfulone

Share this post

Link to post
Share on other sites

N/M I got it. Thanks alot for this!

I get error reading log to array error:1 error when receiving history using your code :)

It's fine tho, i'm just gonna write a script to compare the images and write the numbers to the .dat file

Thanks for all your help

Edited by adroitfulone

Share this post

Link to post
Share on other sites

Func Get_Data()
    GUICtrlSetData($Edit, "")
    $ProgressA = ProgressOn($Title, "Downloading JSP Lottery Data...", "Initializing download...")
    $Size = InetGetSize("http://forums.d2jsp.org/index.php?act=stash&a=202")
    InetGet("http://forums.d2jsp.org/index.php?act=stash&a=202", @TempDir & "\Lotto.dat", 0, 1)
    While 3
        ProgressSet((@InetGetBytesRead / $Size) * 100, (@InetGetBytesRead / $Size) * 100 & "% Done.")
        If @InetGetBytesRead = $Size Or @InetGetActive = 0 Then ExitLoop
    Dim $aRecords
    If Not _FileReadToArray(@TempDir & "\Lotto.dat", $aRecords) Then
        MsgBox(4096, "Error", " Error reading log to Array   error:" & @error)
    For $x = 1 To $aRecords[0] - 1
        If $x <= 3 Then ContinueLoop
        $text = StringStripWS($aRecords[$x], 6)
        $text = StringSplit($text, " ")
        GUICtrlSetData($Edit, $text[1] & "  " & $text[2] & "  " & $text[3] &  "|", 1)
EndFunc  ;==>Get_Data

I need this to take $Size = InetGetSize("http://forums.d2jsp.org/index.php?act=stash&a=202") and format it to where it can be read by GUICtrlSetData($Edit, $text[1] & " " & $text[2] & " " & $text[3] & "|", 1) with just the 3 winning lotto numbers. I'm completely stumped on this one.

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