|
|
To advertise on these forums, e-mail us. |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
Auto Execute Bets-VBA-NZ TAB-Project
Hi Guys
I would like help to create a Macro that looks at an Excel Spreadsheet. Accomplishes 1/ Logging into NZ TAB using A1 (User name) and A2 (Password) 2/ Looks at Cells B2 (Horse Number) and B2 ($ Bet Amount) and enters Values into appropriate box's on Web Page 3/ Then completes the Submit process That's it. I have found Code that fills in Username and Password for https://www.tab.co.nz/racing/?action=schedule# Bit clunky but the only one I could find that actually works, message box's disappear after 1 second but sometimes on first call I need to click 1st one, sure there's a better code. And still can't get it to Actually Login "Click" / "Submit". Things to look at A/ Clicking correct Radio Button for selected horse B2 (Horse Number) B/ Clicking Win or Place C/ Entering Bet Amount in Bet Amount box B2 ($ Bet Amount) D/ Clicking Login E/ Clicking Submit Bet 8/ Clicking the final "OK" I think that's about it All that is needed is Tenacity knowledge and Skill : ) I will of course help where I can One may need a NZ TAB account really, to go through whole process. Regards Mike |
#2
|
|||
|
|||
Mike
You might also post this in the General forum as there are people there who don't visit this forum who have excel knowledge.
__________________
Dear Lord Please let me break even. I need the money. |
#3
|
|||
|
|||
Hiya,
Part of the way there with this attachment. Attempts to login (and fails if you're already logged in or the Try Again button is active due to a previously unsuccessful attempt). Specifies a Win bet, clicks the appropriate horse (without handling the error if it were scratched), enters a bet amount and....that's it. Couldn't figure out how to click the Submit Bet button. They've hidden that one well. Or I'm tired. Pretty sure it might be both. And probably something to do with my lapsed coding skills. I don't have an NZ TAB account, so my attempt to log in fails and it just fills out everything else anyway. I don't know if the source code would change on a successful log in. You'll undoubtedly want to add another field to the spreadsheet indicating which race it is you want to bet on. Otherwise it just seems to go to the next race - which there isn't this time of night, in case anyone uses it before they click over until tomorrow. (Effort somewhat due to SpeedyBen's earlier benevolence - it's a caring, sharing forum... ) |
#4
|
|||
|
|||
Hi SpeedyBen
Ok will post in General Forum too will fix B2 to C2 as well Cheers : ) Hi WalkerMac Tried spreadsheet As is worked great Put in real Username and Password, i'm 100% sure it worked first time but then tried again and now comes up with "Object Doesn't Support This Property Or Method" Mucked about with it but it didn't help, ha ! But very promising cool Error checking to see if one is Logged in or not first, is a good idea i think. Great stuff so far Mike : ) |
#5
|
|||
|
|||
Hey
Calling WalkerMac : ) Been mucking around with your code all weekend : ) all good learning a bit i suppose but can't get it to do what oi want : ( Any chance you could get the Code to just Fill in Username Pw Win Selection number Bet Amount Then i will click Login and Submit manually If ya could that would be great my main man i owe ya : ) Respec Mike : ) Sorry Mr Moderator I didn't Know : ( |
#6
|
|||
|
|||
Hiya,
I've rewritten it properly, and commented liberally - so it should give you a better idea of what's going on (or how to fix it if I've stuffed it up). Now it logs on if the username/password fields are visible, fills in the bet type and amount, selects the horse (so long as it isn't scratched - tried a couple of things but couldn't get it to work out automatically whether the horse was scratched or not) and then leaves you to click the Submit bet button. |
Thread Tools | Search this Thread |
Display Modes | |
|
|