Questions about COM VB program

Please post any questions regarding the program here.

Moderator: 2020vision

Questions about COM VB program

Postby ians1711 » Sun Jun 06, 2010 9:14 pm

Finally got a COM program working. Have a few questions about what I am seeing:

First - the VB code goes to sleep between 10pm and 11am. At 11am it finds the "Horse Racing - Todays Card" sport and then scans the list of events looking for the first race of interest. When found, I call openmarket. But nothing happens. All subsequent calls work OK. Got a chance to check the status of BA today at 11am. If I look at the markets list, the race I tried to open is highlighted, but the race itself hasn't been loaded into the tab. Anyone else seeing this or can explain?

Second, sometimes when I find a race I haven't seen before, it is already in a CLOSED state, so I ignore it and move on to the next race. However my code is also ignoring the next race which isn't CLOSED. How long should I be waiting after calling openmarket before I can safely assume that the fields in the main body of the worksheet that are populated by BA refer to the next market - I am assuming that I am checking too quickly and still seeing the CLOSED state from the repvious market?

Third - I had to shut down BA and EXCEL, and when I restarted I opened two tabs in BA and connected the second tab to the worksheet with the VB COM code. When this started running the openmarket call was loading the next market into the first tab - does the com interface only work on the first tab?

Thanks
Ian S
ians1711
 
Posts: 72
Joined: Fri Jul 11, 2008 9:33 pm

Postby GaryRussell » Mon Jun 07, 2010 8:47 am

First - the VB code goes to sleep between 10pm and 11am. At 11am it finds the "Horse Racing - Todays Card" sport and then scans the list of events looking for the first race of interest. When found, I call openmarket. But nothing happens. All subsequent calls work OK. Got a chance to check the status of BA today at 11am. If I look at the markets list, the race I tried to open is highlighted, but the race itself hasn't been loaded into the tab. Anyone else seeing this or can explain?

I will look into this.

Second, sometimes when I find a race I haven't seen before, it is already in a CLOSED state, so I ignore it and move on to the next race. However my code is also ignoring the next race which isn't CLOSED. How long should I be waiting after calling openmarket before I can safely assume that the fields in the main body of the worksheet that are populated by BA refer to the next market - I am assuming that I am checking too quickly and still seeing the CLOSED state from the repvious market?

It's due to the multi threaded nature of the program. There is a small delay before the prices are loaded after the market is loaded. Once cell N3 contains the market id you just opened you can rely on the status.

Third - I had to shut down BA and EXCEL, and when I restarted I opened two tabs in BA and connected the second tab to the worksheet with the VB COM code. When this started running the openmarket call was loading the next market into the first tab - does the com interface only work on the first tab?

It only works with the first tab at present. Proper multi tab page support will be added in the future, but in the meantime there is an undocumented property: tabIndex. Set it to 0 to for the first tab, 1 for the second etc. That is the only way you can currently access more than one tab, you can't open or close tabs, etc.
User avatar
GaryRussell
Site Admin
 
Posts: 9872
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK

Postby ians1711 » Mon Jun 07, 2010 11:46 am

Gary
Thanks for the quick response
Ian S
ians1711
 
Posts: 72
Joined: Fri Jul 11, 2008 9:33 pm

Postby ians1711 » Mon Jun 07, 2010 11:52 am

Gary
By the way - I'm running version 66w
Ian S
ians1711
 
Posts: 72
Joined: Fri Jul 11, 2008 9:33 pm

Postby ians1711 » Tue Jun 08, 2010 3:52 pm

Gary
Found the following in the BA_Diagnostic.txt file. Since the messages are also output at other times when the market switch has worked successfully I am not sure whether they are relevant:

11:01:01:838: Attempted market change, but requests are pending.
11:01:02:229: retried market.

Ian S
ians1711
 
Posts: 72
Joined: Fri Jul 11, 2008 9:33 pm

Postby GaryRussell » Tue Jun 08, 2010 3:58 pm

They are not relevant. Can you confirm you have this problem every time the VBA code has been idle for an hour?
User avatar
GaryRussell
Site Admin
 
Posts: 9872
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK

Postby ians1711 » Tue Jun 08, 2010 7:49 pm

Gary
I guess so. Happens every morning - not sure what you mean by idle. The Excel VB code is executing every refresh waiting for the time to reach 11am

Ian S
ians1711
 
Posts: 72
Joined: Fri Jul 11, 2008 9:33 pm

Postby GaryRussell » Wed Jun 09, 2010 8:06 am

ians1711 wrote:Gary
I guess so. Happens every morning - not sure what you mean by idle. The Excel VB code is executing every refresh waiting for the time to reach 11am

Ian S

I was referring to what you said
the VB code goes to sleep between 10pm and 11am.
although I suppose "idle" isn't the correct word.

I am still looking into it.
User avatar
GaryRussell
Site Admin
 
Posts: 9872
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK


Return to Help

Who is online

Users browsing this forum: No registered users and 41 guests

Sports betting software from Gruss Software


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.