Smartgambler
Pro-Punter

Go Back   OZmium Sports Betting and Horse Racing Forums > Public Forums > General Topics
User Name
Password
Register FAQ Search Today's Posts Mark all topics as read

To advertise on these
forums, e-mail us.

Reply
 
Thread Tools Search this Thread Display Modes
  #31  
Old 6th February 2012, 03:32 PM
Puntz Puntz is offline
Member
 
Join Date: Jan 2012
Posts: 291
Default

Shaun, I am partially lost at this point,(THE BASICS PART 3) but impressed at the speed of the imports to say the least using the XML thing.

The way I do my "refresh" is race by race on the race start time order list.
By "refresh" I mean a Loop in starting at the top using the
Do until
-----------------------
So it's ( your code )

Quote:
Sub LoadRaceField()

Application.Calculation = xlAutomatic
Application.ScreenUpdating = False
Sheets("Sheet1").Select

Do Until _
Sheets("Sheet1").Range("J2").Value = "PAYING" Or _
Sheets("Sheet1").Range("J2").Value = "INTERIM" Or _
Sheets("Sheet1").Range("J2").Value = "CLOSED" Or _
Sheets("Sheet1").Range("J2").Value = "ABANDONED" Or _
Sheets("Sheet1").Range("J2").Value = 5

Dim xmldoc As MSXML2.DOMDocument


and the rest of your code at this point.
----------------
FOR TESTING,
I have used a counter method, so when it reaches "5", it simply gets the next race on the list. This will be deleted later on.
Quote:
Sheets("Sheet1").Range("J2").Value = Sheets("Sheet1").Range("J2").Value + 1

Loop

Application.Calculation = xlAutomatic
Sheets("Sheet1").Range("J2").Value = "0"
DELETE_RACE
LoadRaceField
'and so on
End Sub


How is the code written to get RaceDisplayStatus to appear in Sheet 1 Cell J2 please?
And the results if possible for that race.
Thanks.


Puntz
Reply With Quote
  #32  
Old 6th February 2012, 05:36 PM
Shaun Shaun is offline
Member
 
Join Date: Jan 1970
Location: Western Australia
Posts: 3,456
Default

So what you want it to do on the unitab site is select a race then keep refreshing then when the race is over you want it to move to the next race?
Reply With Quote
  #33  
Old 6th February 2012, 05:49 PM
Shaun Shaun is offline
Member
 
Join Date: Jan 1970
Location: Western Australia
Posts: 3,456
Default

That is for the new site correct.
Reply With Quote
  #34  
Old 6th February 2012, 06:53 PM
Puntz Puntz is offline
Member
 
Join Date: Jan 2012
Posts: 291
Default

Yes, that is for the tatts site cos that is the one I am working on now, but later I'll move on to the other sites.

For now,

the Do Until requires the status, whatever it is, if it's,
a "Time", "PAYING","INTERIM","CLOSED", "ABANDONED" "PHOTO" "PROTEST" etc etc
and/or whatever else the scenario may be.
Eventually it will get to "PAYING", which will be the official RESULTS.

The actual RESULTS payout figures may be best go to Sheet2.

During some testings I don't wait around for PAYING, and choose INTERIM then move on to the next race.

The time limit is important to.

If lets say a race has a advertised start time of 3:00pm and it's Looping, there has to be a limit or it will Loop forever, so therefore I implement a Variable factor of let's say 20 minutes after advertised race start time LIMIT.

So if at 3:20pm there is no status or they are still negotiating a PROTEST, then 20 minutes past 3:00pm ( Variable), Next Race...,

Puntz
Reply With Quote
  #35  
Old 6th February 2012, 07:21 PM
Shaun Shaun is offline
Member
 
Join Date: Jan 1970
Location: Western Australia
Posts: 3,456
Default

What do you use to get the race times in order and where do you get them?

I was having a look at your last sheet the screen updating is doing twice the work, have it set like this


Application.ScreenUpdating = False

Rest of macro here

Application.ScreenUpdating = True

What that does is stops the screen updating so it just looks like the info appears and you don't see the macro working, if you do the same for the clean up macro will look smother.all the
Reply With Quote
  #36  
Old 6th February 2012, 08:09 PM
Puntz Puntz is offline
Member
 
Join Date: Jan 2012
Posts: 291
Default

Ok, I did not include the entire macro, only the section.

-----------------------------
Quote:
What do you use to get the race times in order and where do you get them?

It's in another workbook
using the old html code
Quote:
With Selection.QueryTable
.Connection = "URL;http://tatts.com/racing/" & Range("A1") & ".html"


Cell A1 is: 2012/02/06/raceday
This brings up the entire race card
----------------------------------
Quote:
I was having a look at your last sheet the screen updating is doing twice the work, have it set like this


Application.ScreenUpdating = False

Rest of macro here

Application.ScreenUpdating = True

What that does is stops the screen updating so it just looks like the info appears and you don't see the macro working, if you do the same for the clean up macro will look smother.all the


Yes, I am still tweaking as I go along.

I'll post the new day's race list tomorrow at around just past 9.AM.

I need the RESULTS though or the project/workbook cannot be completed, and won't be able to get past BASIC 3.

Thanks

Puntz
Reply With Quote
  #37  
Old 7th February 2012, 10:06 AM
Puntz Puntz is offline
Member
 
Join Date: Jan 2012
Posts: 291
Default

Today's Race list
There are 3 sheets
1: with only horse and trots
2: horse-trots-greys
3: all races on card
the all races on card sheet, the overseas racetimes may show past midnight so effectively it is not in true time order.

The code I use to delete a race row goes something like:
add a sheet and call it: DAYSRACELIST
USE THE ONE POSTED HERE AS A BACK-UP, COPY AND PASTE FROM BACKUP TO DAYSRACELIST, THEN YOU NEVER LOSE THE ORIGINAL.
Quote:
Sub DELETE_RACE()
Application.Calculation = xlAutomatic
Application.ScreenUpdating = False

Sheets("DAYSRACELIST").Select

Sheets("DAYSRACELIST").Rows("3:3").Delete Shift:=xlUp

Sheets("DAYSRACELIST").Range("C1:I1").Value = _
Sheets("DAYSRACELIST").Range("C3:I3").Value
'----------------------------------------------------
Sheets("DAYSRACELIST").Range("A1").FormulaR1C1 = _
"=RC[5]&""/""&RC[6]&""/""&RC[7]&""/""&RC[2]&""/""&RC[3]"

Sheets("DAYSRACELIST").Range("A1").Value = _
Sheets("DAYSRACELIST").Range("A1").Value

'-----------------------------------------------------
ActiveWorkbook.Save

Application.ScreenUpdating = True
End Sub



Puntz
Attached Files
File Type: xlsx DAILY RACE LIST-20120207.xlsx (25.5 KB, 388 views)
Reply With Quote
  #38  
Old 13th February 2012, 09:47 PM
Puntz Puntz is offline
Member
 
Join Date: Jan 2012
Posts: 291
Default

Shaun,

On the Workbook you have here where it gets the prices using xml how is it coded to gather other information ?
For example
Length,Distance etc etc

This xml makes no sense, it's not like the code when Record Macro is written where it understandable-linear-->

xml looks like "2-way speak"

Set runnerNumber = runner.Attributes.getNamedItem("RunnerNo")
If Not runnerNumber Is Nothing Then
Sheet1.Cells(i + 5, 1) = runnerNumber.Text


Ya know?

It's not like,
"put race length in Cell B1"
Give this some thought, since when does a punter need to learn to program a PC to win a race when the punter already knows more than the programmer about racing and betting ?


But if your answer is something like, "well what goes round comes round, it is the age of the programmers"
I say ****, Pitsburgh Phil never used a computer!

http://en.wikipedia.org/wiki/George_E._Smith_(gambler)

Quote:
Methods

Smith took notice of every detail in horse racing. He kept detailed notes of which horses were good runners during muddy conditions and always inspected horses at the end of a race to look for subtle signs of lameness or impediments (i.e. loose girth straps) that may have negatively impacted a horse's speed.[1] As he became more famous and seemingly successful, bookmakers would often refuse to place his bets outright for fear of losing money when he won. As a result, Smith conducted most of his betting through "beards", or men that he would commission to place bets for him. Smith tried to keep the identity of his beards a secret and never revealed their identities, even to his other commissioners. His movements were continuously followed by agents for the bookmakers and by the Pinkerton detectives employed by The Jockey Club.
Reply With Quote
  #39  
Old 13th February 2012, 10:34 PM
Shaun Shaun is offline
Member
 
Join Date: Jan 1970
Location: Western Australia
Posts: 3,456
Default

xml is different from what i have been doing in this short course, xml is the website designers way of providing all the information that a person needs to put that in excel.

The VBA that i have posted is excels way of gathering information from the website that is why not all information is able to be separated in to individual bits before download.

This is why some times you can download individual tables and other times you have to get the whole page and take what you need.

I am not good with xml i can only understand some from there example so i am not the best person to ask about this.

As for your comments about computers helping punters win, well to be honest i think it is the punter helping the computer win.

Computers are no smarter than what information they are given, they can calculate things and display other things in a layout that is easier to understand.

The speed they can accomplish these things can be very fast.
Reply With Quote
  #40  
Old 13th February 2012, 11:35 PM
Puntz Puntz is offline
Member
 
Join Date: Jan 2012
Posts: 291
Default

comment are just my way of breaking monotony, I have a soft spot for programmers, I surely do.
I went to TAFE actually to enter a 6 year IT course and failed the intro.,
( I did not tell them my "secret" that I wanted to make my own horse race program) they said I need to go back to school and learn Trigonometry. I said OK.
So I went back the TAB and looked for a horse with a similar sounding name.
When I asked the woman at the counter after placing a bet,
"Do you know Trigonometry?"
She pointed to her wedding ring!

Anyway,

Quote:
This is why some times you can download individual tables and other times you have to get the whole page and take what you need.


Yes, that's what I been doing using another web query with html at the end,
and yeah, like you say, "take what you need"


Thanks

Last edited by Puntz : 13th February 2012 at 11:39 PM.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is On
Forum Jump



All times are GMT +10. The time now is 09:47 PM.


Powered by: vBulletin Version 3.0.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
©2008 OZmium Pty. Ltd. All rights reserved . ACN 091184655