Moderator: 2020vision
by Captain Sensible » Thu Apr 12, 2007 5:03 pm
by dgs2001 » Thu Apr 12, 2007 6:53 pm
by tkp » Thu Apr 12, 2007 7:08 pm
by GeorgeUK » Thu Apr 12, 2007 10:31 pm
Public ie As InternetExplorer
Sub RacingPost_Login()
Set ie = CreateObject("InternetExplorer.Application")
ie.Visible = True
'Go to this Web Page!
ie.navigate "https://reg.racingpost.co.uk/cde/login_iframe.sd"
'Check for good connection to web page loop!
Do Until ie.readyState = READYSTATE_COMPLETE
DoEvents
Loop
Do Until ie.Busy = False
DoEvents
Loop
With ie.document.forms(0)
.in_un.Value = "USERNAME"
.in_pw.Value = "PASSWORD"
.submit
End With
'Check for good connection to web page or you won't login
Do Until ie.readyState = READYSTATE_COMPLETE
DoEvents
Loop
Do Until ie.Busy = False
DoEvents
Loop
End Sub
Sub RacingPost_Results_Import()
Call RacingPost_Login
'Check first page loads ok or it will hang.
Do Until ie.readyState = READYSTATE_COMPLETE
DoEvents
Loop
Do Until ie.Busy = False
DoEvents
Loop
1
r = 0
c = 0
'Go to this Web Page!
ie.navigate "http://www.racingpost.co.uk/horses/desktop_results.sd"
'Check for good connection to web page loop!
Do Until ie.readyState = READYSTATE_COMPLETE
DoEvents
Loop
Do Until ie.Busy = False
DoEvents
Loop
' type STOP in cell A1 to stop the macro/refresh
If Range("A1").Value = "STOP" Then ie.Quit
If Range("A1").Value = "STOP" Then Exit Sub
'****************************************
'NOTE: this part will clear the entire worksheet that is currently open.
'Amend so that only the result details are being deleted before the new data comes in.
'I am just testing so am pasting into Sheet2. Just don't delete anything important. Please!
'****************************************
Cells.Select
Selection.Clear '.Delete
Range("A1").Select
Dim oResultPage As HTMLDocument
Dim AllTables As IHTMLElementCollection
Dim xTable As HTMLTable
Dim TblRow As HTMLTableRow
Dim myWkbk As Worksheet
'copy "data" table
Set oResultPage = ie.document
Set AllTables = oResultPage.getElementsByTagName("table")
'Set xTable = AllTables.Item(10)
Set myWkbk = ActiveWorkbook.Sheets("Sheet2")
For Each xTable In AllTables
For Each TblRow In xTable.Rows
r = r + 1
For Each tblCell In TblRow.Cells
c = c + 1
myWkbk.Cells(r, c) = tblCell.innerText
Next tblCell
c = 0
Next TblRow
Next xTable
' refresh values every 5 secs
s = Now
Do Until Now >= s + TimeValue("00:00:05")
DoEvents
Loop
GoTo 1
End Sub
by dgs2001 » Thu Apr 12, 2007 11:26 pm
by GeorgeUK » Fri Apr 13, 2007 12:19 am
by GeorgeUK » Fri Apr 13, 2007 3:20 pm
The strength of Gruss Software is that it’s been designed by one of you, a frustrated sports punter, and then developed by listening to dozens of like-minded enthusiasts.
Gruss is owned and run by brothers Gary and Mark Russell. Gary discovered Betfair in 2004 and soon realised that using bespoke software to place bets was much more efficient than merely placing them through the website.
Gary built his own software and then enhanced its features after trialling it through other Betfair users and reacting to their improvement ideas, something that still happens today.
He started making a small monthly charge so he could work on it full-time and then recruited Mark to help develop the products and Gruss Software was born.
We think it’s the best of its kind and so do a lot of our customers. But you can never stand still in this game and we’ll continue to improve the software if any more great ideas emerge.