Bet Angel - Command Line parameters

User to User support only. For technical support visit www.betangel.com/support/
Post Reply
User avatar
jimibt
Posts: 3641
Joined: Mon Nov 30, 2015 6:42 pm
Location: Narnia

Hello there,

I've got a little query that I can't find an answer for anywhere in ther help or on the forum. I would like to be able to launch BA in such a way that both my settings and screen defaults are identified via the command line. i.e.

C:\Program Files (x86)\Bet Angel Limited\Bet Angel - Professional\BetAngle.exe -display BackDefault -settings BackRegular

Does such a paradigm exist and if not, would it be possible to showhorn it into a future build?? The reason for this is that I have automated the creation of the markets.cfg file via a webservice and small helper app and have several instances that use different rules with different markets.cfg files. By allowing these parameters to be set on the command line, i'd be able to fully have a HANDS OFF setup for each of my rule sets and would only need to double click my app (with these parameters) at the start of each session for each rule -and bingo..

hope this is doable.

[edit] - just highlighting another thread where the OP looking for a similar startup commandline approach:
viewtopic.php?f=20&t=14624&p=136102&hil ... ne#p136102
Bet Angel
Bet Angel
Bet Angel
Posts: 3999
Joined: Tue Apr 14, 2009 3:47 pm

I would think that's possible - might be some restrictions such as the profile names can't include a space or something like that. We can look into it.
One thing I will point out though is that you'd still have to manually enter your password on the login screen. There's no way betfair would allow any application the supports the storage of a password (even if it's in the command line properties).
User avatar
jimibt
Posts: 3641
Joined: Mon Nov 30, 2015 6:42 pm
Location: Narnia

Bet Angel wrote:
Tue Oct 02, 2018 4:51 pm
I would think that's possible - might be some restrictions such as the profile names can't include a space or something like that. We can look into it.
One thing I will point out though is that you'd still have to manually enter your password on the login screen. There's no way betfair would allow any application the supports the storage of a password (even if it's in the command line properties).
yeah completely get that (re BF) - arriving on the login screen with the defaults filled out actually would (for such a minimal change) be a HUGE workflow saver!! I'm certain I'm not the only one that would benefit and would be happy to create a small post to highlight the various use cases it could be put to...

cheers and thanks ;)
User avatar
jimibt
Posts: 3641
Joined: Mon Nov 30, 2015 6:42 pm
Location: Narnia

FYI - i had been getting round the command line issue by writing out a bespoke comms.cfg file as part of my app launch, but obviously, this requires other plumbing code/overhead and is brittle to future enhancements to this file content..
Bet Angel
Bet Angel
Bet Angel
Posts: 3999
Joined: Tue Apr 14, 2009 3:47 pm

The general release of v1.51.1 (now on the download page) contains those command line parameters to prefill the profile options on the login screen.

So you've got :-

/SETTINGS:profile_name
/LAYOUT:profile_name

If your profile name happened to contain a space, then you'd put the name in quotes. e.g. /SETTINGS:"profile name"
User avatar
jimibt
Posts: 3641
Joined: Mon Nov 30, 2015 6:42 pm
Location: Narnia

Bet Angel wrote:
Tue Oct 09, 2018 8:59 pm
The general release of v1.51.1 (now on the download page) contains those command line parameters to prefill the profile options on the login screen.

So you've got :-

/SETTINGS:profile_name
/LAYOUT:profile_name

If your profile name happened to contain a space, then you'd put the name in quotes. e.g. /SETTINGS:"profile name"
sorry, was just watching bake off!! brilliant, thanks so much for that -appreciated.. this will be of HUGE benefit for those that run multiple sessions.

/THANKS_AGAIN ;)
User avatar
jimibt
Posts: 3641
Joined: Mon Nov 30, 2015 6:42 pm
Location: Narnia

Morning... Tried to implement this new feature as part of my current process, but alas have come unstuck. I'm using System.Diagnostics.Process along the following lines (cut down example from my working code):

Code: Select all

const string filePath = @"C:\\Program Files (x86)\\Bet Angel Limited\\Bet Angel - Professional\\";
string settingsName = "BackSet3";
string layoutName = "Standard";
var processBa = new System.Diagnostics.Process
{
    StartInfo =
    {
        // required path as well as exe name!!
        FileName = filePath + "BetAngel.exe",
        WorkingDirectory = filePath,
        Arguments = string.Format(@"/SETTINGS:{0} /LAYOUT:{1}", settingsName, layoutName),
    }
};
processBa.Start();
Although BA launches as expected, neither of the parameters are actioned. Both named parameters exist as saved settings. I'm not sure if there's some sort of clash going on as I can't debug down to the level of the parameters being passed in. I *have* to use the arguments in this manner as they are dynamically derived from a webrequest in another part of the process, thus can't hardcode a set of shortcuts with the arguments.

Hopefully you'll be able to use the above example as a test bed.

cheers
jim
Bet Angel
Bet Angel
Bet Angel
Posts: 3999
Joined: Tue Apr 14, 2009 3:47 pm

Yes, your example works perfectly.

Perhaps check the timestamp of your BetAngel.exe, in case the download of the general release version failed somewhere.
The timestamp should be: 8th Oct 5:10pm
User avatar
jimibt
Posts: 3641
Joined: Mon Nov 30, 2015 6:42 pm
Location: Narnia

Bet Angel wrote:
Wed Oct 10, 2018 10:52 am
Yes, your example works perfectly.

Perhaps check the timestamp of your BetAngel.exe, in case the download of the general release version failed somewhere.
The timestamp should be: 8th Oct 5:10pm
hmm- maybe i was a complete n00b and FORGOT to download the latest version on my dev server :D. will keep you posted.
User avatar
jimibt
Posts: 3641
Joined: Mon Nov 30, 2015 6:42 pm
Location: Narnia

ok,i did a complete fresh installation and although it's reporting as v1.51.1, the timestamp is 26/09/2018 15:40. hope you can help :D

[edit] - my bad, was downloading the beta, rather than the genral release BAP_1_51_1.exe - sorted now and working perfectly!! lol
sa7med
Posts: 800
Joined: Thu May 18, 2017 8:01 am

Nice! Didn't know one could do this. Very useful. Possible to log in with user name and pass as well?
User avatar
jimibt
Posts: 3641
Joined: Mon Nov 30, 2015 6:42 pm
Location: Narnia

i had a word with the devs on this point (login details) and betfair make it very clear that usernames and passwords should not be stored and made accessible to any API based commercial application (even if on the command line) due to security reasons. would have been nice tho - even better if a complete silent login!! ;)
User avatar
GaryCook
Posts: 128
Joined: Sat Jan 27, 2018 6:35 pm

I wish we could store values like this as well. It is how most apps do it. Would make the interpolation much more powerful. I mean Excel is great and all but command line (CLI) is used a lot for good reasons.
Post Reply

Return to “Support”