TattsDownloads
I am trying to add the win pool to some code that I got off this site that was written by Shaun with my failed attempt at the bottom.
I just want to add the win and place pools in, or around, cell O1 and then add the meeting name to cell C3 Any help would be greatly appreciated. Ta, Martin |
Tatts changed their web access a couple of years ago and you may have some problems downloading what you want.
now, in most cases, you need to use the XML access |
Hi Aussie,
It is the xml code I am accessing - look at the address in cell E1 They still have the tabonline.com.au page up which is where I am getting my html feed from But I want to check to see if the xml feed is now staying up to date with divs and pools - last time I checked it was often way behind their web page and the html feeds. Ta, Martin |
Quote:
where's the file |
can you attach a copy of the file so we are both singing from the same hymn sheet please and i will have a gander at it
|
1 Attachment(s)
whoops I thought I had attached it. will try again
forgot to hit the upload button........... Ta, Martin |
1 Attachment(s)
How about this?
|
Quote:
LG |
1 Attachment(s)
It complained about some conversion issues - hopefully they're just stylistic.
|
Ta mate
LG |
Holy hot-cakes walkermac.. it works!
Cheers LG |
That's great - works for me too. Now I can check out the xml data and compare to their webpage. And hopefully go from html to xml
Thanks for all the help Ta, Martin |
No worries folks.
|
Have been comparing between this and their webpage and html and it is looking very excellent. So now I can update my app.
Thanks again for the help. Ta, Martin |
1 Attachment(s)
I am having a problem moving the code to my app.
When I try to compile it comes up "argument not optional" on Set Pool = poolList.Item(J) - it does not like "Pool" Note I am calling this from a multisheet app - so I have changed all the "Sheet1" to wks (wks as worksheet) as this is what my app uses. Any help would be greatly appreciated. I have put the code in a blank wkbk cause my app is huge Ta, Martin |
Are you guys working on getting historical results (or have them already) as well or is it still on the TO DO list?
Cheers LG |
no, I am working on getting current downloads of divs for races happening now
Ta, Martin |
Sorry, but it works fine at my end. I just added a button to a blank worksheet that called LoadRaceField(ActiveSheet) on being pressed, changed the xml address from cell E-whatever to a string and added a reference Microsoft XML v6.0 (which I presume you've done, as it would've fallen over much earlier).
Code ran through and wrote the odds for the race onto the worksheet; no problems. If it's still not working for you, maybe upload the whole workbook someplace else and I can have a look to whatever is unique to your situation. ...you haven't done something silly and defined your own function/subroutine called Item, have you? |
1 Attachment(s)
I have uploaded my Personal wkbk - all 350 odd modules of really badly written code! I have been writing and using it since Feb 2002 - every day.
The Public Sub LoadRaceField(wks As Worksheet) is on mod 104. It showing on OZmium so you should be able to upload it. It is 7828kb I put the sub in a separate wkbk by itself and it compiled no problem. But not in my Personal wkbk. Any help you can offer would be greatly appreciated. Now 240am so must go to bed. Ta, Martin |
Forgot to mention that the sub is now a public sub with .wks as worksheet. And I have changed the cell references around to fit my workbooks - I download up to 70 races a day.
Ta, Martin |
2 Attachment(s)
the full days download
go to sheet 3 and put the date in cells b1 to d1 invoke macro by clicking " prices and results" button days program data on sheet 1 - doesn't show jockey or barrier though days results W&P in sheet 4 i then link to another spreadsheet you can then pick up into another spreadsheet |
Quote:
Run time error 438 Object doesn't support this property or method Don't you just hate it when that happens?? LG |
Hi Aussie - thanks for that.
Unforetunetly it does not fix my problem. My app automatically downloads the divs and win pools at preset intervals for 30 mins up to the gate closing. It does this on up to 70 works sheets a day depending on how many races there are. It then runs an analytical package to see if each race is a bet or not. Over the years I have focused on the analytical package. I was using xml schemas to get the xml feed but when Tatts took over the downloads got very shonky. So I went back to html. Now I have some time I am trying to get back to xml feed. The problem is Shaun's code is for a single sheet, mine is multiple sheets. And I am not a good programmer. So when an error message comes up I tend to hit the wall. I did manage to get the race number to load - do not ask me how! But now I need to get "Pool" to become an optional argument. This is not a problem as a single sheet app but multisheet is a no go. Ta, Martin |
Hi Lord,
By 2nd I take it you mean the '97 version, sounds like something is either not supported or not loaded in Tools, References of your version of xl. Other than that.....up the same creek. Ta, Martin |
yes it seems like a few references have to be opened.
i have attached a picture of what they should be: |
Quote:
right click and open in a new tab. i couldnt post a picture |
Thanks Aussie,
I have all of those opened. I also had a bunch of soaps open which I have now closed. Plus I have MD Forms 2.0 Object Library which I cannot close as it is being used whereas you have it closed. Ta, Martin |
Quote:
and you are using office 2010 or 2007 another way would be for you to copy each macro into your own version of excel and step by step through it to see what happens. i don't recall doing anything overly fancy |
I am in 2010. I have copied it into my own wkbk but not happening. The step by step thing would be a huge exercise even with only a 10 race book. I really need to get the thing to compile first and that means getting past the issue with it not accepting the pool issue.
Ta. Martin |
Quote:
ok strip out what you don't want me to see and upload a copy of your workbook and i will see if i can get it to work. cheers aussie |
Will do, may take a while to do the stripping
Ta, Martin |
On second thoughts don't worry about it. It will take me hours to try and condense the code down to something sensible. It currently has both the html and the old schema download tools in it which makes it complicated.
Really all I need to know is why the compiler is rejecting "pool" when it accepts "runner" doing the same thing. I will do some more research and possible try the xml pages. Thanks for your help Aussie. I will post my solution when I get there. Ta, Martin |
ok good luck
|
Thanks I need it - time spent in forums so often just reminds me of how tragic life really is........
|
Why I got out of the IT industry reason #googleplex.
Rename pool to poolb. Or simon. Or anything. 'Pool' must be the name of a some function or data type that has been included amongst the references in this project that wasn't included in the other. ...how the heck is this thing supposed to run anyway? I could only figure out how to test the code by removing the paramater for LoadRaceFields (and setting wks explicitly) so I could run it as a macro. |
1 Attachment(s)
Thanks Walkermac - it now compiles. Now I just have to merge it with the rest of the monster and hopefully I can go back to xml feed
I have attached a file - look at module 2. It has the timer sub from which the beast fires. At preset intervals it gets updates and after the last download it runs an analytical package which tells me whether or not to bet. when i started it in 2001 I never thought it was going to be this big. Thanks again for your help Ta, Martin ps I will probably be back to beg more help..... |
No worries. Don't count on me though! My knowledge is pretty dated :)
(incidentally, I always wondered why it was convention to use a lowercase letter to begin variable names: e.g. thisIsMyVariable, vs ThisIsMyFunction. Had you followed this convention you would've known something was up when 'pool' kept changing into 'Pool' :) ) |
re pool my limited knowledge..... I always use a capital in a variable so that when I have finished typing in lower case the first letter changes to a capital which then tells me I am using a proper variable (not just one in my head). I tend to have more frustration than knowledge (the thought of spending hours reading books just for 1 tidbit of information). That is why I have put off this job for so long. The analytical stuff takes most of my time and I can just get it done although I know my code is crap - it is easier just to get a faster processor and more memory.
Ta, Martin |
Quote:
Where I work we have to have a library file of declared variables and where and for what they are used. Pain initially but saves much time later, also copy and paste of code is almost a sackable offense. Well not quite but you would not want to be caught twice. |
Agree - conventions and standards are excellent. If the banking industry had stuck to them the crash would not have happened.
But I am a self-taught hobbyist who has never worked as a programmer - I wish I had - so I do not have the benefit of other people's experience. And I appreciate how much a novice like me must frustrate the pro's. Curious about not copying code - why reinvent the wheel? Assuming it is legal of course. In the meantime I will keep on hack, hack, hacking on Heaven's door - I am sure that is what Dylan meant to sing. Ta, Martin |
All times are GMT +10. The time now is 04:52 PM. |
Powered by: vBulletin Version 3.0.3
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.