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
  #1  
Old 6th February 2014, 08:08 PM
Keen2xL Keen2xL is offline
Member
 
Join Date: Oct 2013
Posts: 19
Smile 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
Attached Files
File Type: xlsm TAB_ User Name _ Password.xlsm (20.0 KB, 1318 views)
Reply With Quote
  #2  
Old 7th February 2014, 01:54 AM
SpeedyBen SpeedyBen is offline
Member
 
Join Date: Oct 2012
Posts: 464
Default

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.
Reply With Quote
  #3  
Old 7th February 2014, 02:13 AM
walkermac walkermac is offline
Member
 
Join Date: Nov 2013
Posts: 603
Default

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... )
Attached Files
File Type: xlsm loginExample.xlsm (24.9 KB, 1293 views)
Reply With Quote
  #4  
Old 7th February 2014, 05:45 AM
Keen2xL Keen2xL is offline
Member
 
Join Date: Oct 2013
Posts: 19
Default

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 : )
Reply With Quote
  #5  
Old 9th February 2014, 02:54 PM
Keen2xL Keen2xL is offline
Member
 
Join Date: Oct 2013
Posts: 19
Default

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 : (
Reply With Quote
  #6  
Old 10th February 2014, 05:22 PM
walkermac walkermac is offline
Member
 
Join Date: Nov 2013
Posts: 603
Default

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.
Attached Files
File Type: xlsm loginExample.xlsm (28.4 KB, 1260 views)
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 12:39 AM.


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