Moderator: 2020vision
by laffo16 » Mon Jun 24, 2013 10:18 pm
by laffo16 » Tue Jun 25, 2013 12:00 am
by kiint » Tue Jun 25, 2013 4:43 pm
by laffo16 » Fri Jun 28, 2013 10:45 pm
by osknows » Sat Jun 29, 2013 9:41 am
Option Explicit
Public WithEvents ba As BettingAssistantCom.ComClass
Private Sub Class_Initialize()
Set ba = New BettingAssistantCom.ComClass
End Sub
Private Sub Class_Terminate()
Set ba = Nothing
End Sub
Private Sub ba_betPlaced(ByVal ref As String, ByVal selecId As Long, ByVal avgPriceMatched As Double, ByVal sizeMatched As Double, ByVal resultCode As String, ByVal token As String)
Debug.Print ref
Debug.Print selecId
Debug.Print avgPriceMatched
Debug.Print sizeMatched
Debug.Print resultCode
Debug.Print token
End Sub
Private Sub ba_pricesUpdated()
Dim prices As Variant
Dim priceItem As Variant
Dim i As Long
On Error Resume Next 'Event will cause error in Excel Edit mode
prices = ba.getPrices
i = 4
For Each priceItem In prices
i = i + 1
Sheets(ba.tabindex + 1).Cells(i, 1).value = priceItem.Selection
Sheets(ba.tabindex + 1).Cells(i, 2).value = priceItem.backOdds1
Sheets(ba.tabindex + 1).Cells(i, 3).value = priceItem.layOdds1
Sheets(ba.tabindex + 1).Cells(i, 4).value = priceItem.lastMatched
Sheets(ba.tabindex + 1).Cells(i, 5).value = priceItem.totalMatched
Next
On Error GoTo 0
End Sub
Option Explicit
Dim baObj(1) As clsBA 'Two Tabs Index starts at 0
Sub test()
'Assumes 2 tabs
If baObj(0) Is Nothing Then
Set baObj(0) = New clsBA
baObj(0).ba.tabindex = 0
End If
If baObj(1) Is Nothing Then
Set baObj(1) = New clsBA
baObj(1).ba.tabindex = 1
End If
' baObj(i).ba.keepbettype = 1
' baObj(i).ba.tabindex = 0
' refs = baobj(i).ba.placebets(selecId, betType, odds, stake, False, token) 'async
End Sub
Private Sub ba_pricesUpdated()
'**Cycle each tab on alternate events
On Error Resume Next 'Event will cause error in Excel Edit mode
prices = ba.getPrices
i = 4
For Each priceItem In prices
i = i + 1
Sheets(ba.tabindex + 1).Cells(i, 1).value = priceItem.Selection
Sheets(ba.tabindex + 1).Cells(i, 2).value = priceItem.backOdds1
Sheets(ba.tabindex + 1).Cells(i, 3).value = priceItem.layOdds1
Sheets(ba.tabindex + 1).Cells(i, 4).value = priceItem.lastMatched
Sheets(ba.tabindex + 1).Cells(i, 5).value = priceItem.totalMatched
Next
If ba.tabindex = tabCount Then
ba.tabindex = 0
Else
ba.tabindex = ba.tabindex + 1
End If
On Error GoTo 0
End Sub
Private Sub ba_pricesUpdated()
'**Update all tabs on same event
Dim tabInc As Long
On Error Resume Next 'Event will cause error in Excel Edit mode
For tabInc = 0 To tabCount
ba.tabindex = tabInc
prices = ba.getPrices
i = 4
For Each priceItem In prices
i = i + 1
Sheets(tabInc + 1).Cells(i, 1).value = priceItem.Selection
Sheets(tabInc + 1).Cells(i, 2).value = priceItem.backOdds1
Sheets(tabInc + 1).Cells(i, 3).value = priceItem.layOdds1
Sheets(tabInc + 1).Cells(i, 4).value = priceItem.lastMatched
Sheets(tabInc + 1).Cells(i, 5).value = priceItem.totalMatched
Next
Next tabInc
On Error GoTo 0
End Sub
by laffo16 » Sat Jun 29, 2013 9:52 am
by laffo16 » Sat Jun 29, 2013 10:15 am
by osknows » Sat Jun 29, 2013 11:06 am
by osknows » Sat Jun 29, 2013 11:11 am
by laffo16 » Mon Jul 01, 2013 9:47 pm
by laffo16 » Mon Jul 01, 2013 9:53 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.