Football scores to Guardian programatically - Script & Sample BAF

Football, Soccer - whatever you call it. It is the beautiful game.
User avatar
MemphisFlash
Posts: 2165
Joined: Fri May 16, 2014 10:12 pm
Location: Leicester

i get the same thing.
User avatar
jimibt
Posts: 3675
Joined: Mon Nov 30, 2015 6:42 pm
Location: Narnia

MemphisFlash wrote:
Sat Jan 30, 2021 2:11 pm
i get the same thing.
i may be wrong -just did the 1st google item on my search for Json.au3

https://github.com/J2TEAM/AutoIt-Imgur- ... e/JSON.au3
mtrend
Posts: 90
Joined: Sun Sep 06, 2009 6:46 pm

Yeah tried that script gets further but fails with one of the functions so figure it’s a different version.

If someone could post the version they have with the script working that would be good :)
sniffer66
Posts: 1681
Joined: Thu May 02, 2019 8:37 am

Sorry all. That UDF (user defined function) should ship with Auto-It and be included as part of the default install. Not sure why it's not in yours

The UDF can be downloaded as a zip file at the very bottom of the first post on this page.

https://www.autoitscript.com/forum/topi ... -udf-jsmn/

Its called: Json(2019.01.17).zip

Copy that to your \includes folder where you installed Auto-It, and unzip, and all should work
User avatar
Shaung89
Posts: 181
Joined: Wed Aug 08, 2018 5:39 pm

jimibt wrote:
Fri Jan 29, 2021 9:46 am
Nice one Stu -this will be a very useful jump-on point for folks using the csv->sv functionality... i can see this being easily adapted for use on the greys using sportinglife!!

thanks!!
Hi Jimbit,

Sounds like just what im looking for. Never linked excel to guardian before however I want to be able to create a csv of X races a day with varying number of runners per race which (when linked) will assign those selection(s) as automated nomation 1,2,3,4 etc.

Is there a template or example on how to do this for 2+ races? I'll be able to figure it out for a whole days worth then :)
Anbell
Posts: 2062
Joined: Fri Apr 05, 2019 2:31 am

Very nice work.
mtrend
Posts: 90
Joined: Sun Sep 06, 2009 6:46 pm

sniffer66 wrote:
Sat Jan 30, 2021 4:02 pm
Sorry all. That UDF (user defined function) should ship with Auto-It and be included as part of the default install. Not sure why it's not in yours

The UDF can be downloaded as a zip file at the very bottom of the first post on this page.

https://www.autoitscript.com/forum/topi ... -udf-jsmn/

Its called: Json(2019.01.17).zip

Copy that to your \includes folder where you installed Auto-It, and unzip, and all should work
Thanks Sniffer, for anyone else having issues, I had to download this version of binarycall.au3 as well, added to the includes folder and now working:

https://github.com/J2TEAM/AutoIt-Imgur-UDF


Cheers
sniffer66
Posts: 1681
Joined: Thu May 02, 2019 8:37 am

Good stuff.

I've been using Auto-It for years and have downloaded many UDFs in that time. Sometimes it's easy to forget which are part of the default install and which need adding.

On another note, it's a relatively simple task to add in any of the in play statistics from each match. Shots on/off Target, Possession, Attacks etc.
Combined with saving SVs to History Lists it would be a cool way to add in stats based decisions to Guardian

If there is any interest in those I can improve the script. Let me know
Or if you have the ability it's not hard to update yourself. Just takes a little reading to get your head around the JSON format.
mtrend
Posts: 90
Joined: Sun Sep 06, 2009 6:46 pm

sniffer66 wrote:
Sun Jan 31, 2021 8:55 am
Good stuff.

I've been using Auto-It for years and have downloaded many UDFs in that time. Sometimes it's easy to forget which are part of the default install and which need adding.

On another note, it's a relatively simple task to add in any of the in play statistics from each match. Shots on/off Target, Possession, Attacks etc.
Combined with saving SVs to History Lists it would be a cool way to add in stats based decisions to Guardian

If there is any interest in those I can improve the script. Let me know
Or if you have the ability it's not hard to update yourself. Just takes a little reading to get your head around the JSON format.
Yeah in play stats would be awesome, I'm trying to find info the SofaScore API but cant find anything published about it.
sniffer66
Posts: 1681
Joined: Thu May 02, 2019 8:37 am

mtrend wrote:
Sun Jan 31, 2021 9:27 am
sniffer66 wrote:
Sun Jan 31, 2021 8:55 am
Good stuff.

I've been using Auto-It for years and have downloaded many UDFs in that time. Sometimes it's easy to forget which are part of the default install and which need adding.

On another note, it's a relatively simple task to add in any of the in play statistics from each match. Shots on/off Target, Possession, Attacks etc.
Combined with saving SVs to History Lists it would be a cool way to add in stats based decisions to Guardian

If there is any interest in those I can improve the script. Let me know
Or if you have the ability it's not hard to update yourself. Just takes a little reading to get your head around the JSON format.
Yeah in play stats would be awesome, I'm trying to find info the SofaScore API but cant find anything published about it.

Very little published info on most sites APIs.

A good place to start is that AutoIt link I posted previously for that UDF. Json_dump() is a very handy function that will dump the contents of the json get to the console, but in readable format. Once you get your head around it, it's then relatively simple to query and return the right stats per team

Should have some free time tomorrow and will update the script with the stats.
petermikael
Posts: 4
Joined: Fri Jun 19, 2020 9:40 am

Trying to download scores but no score.csv is to find on my computer. This feature is great so help is much appreciated. I have let the script run for several minutes before i terminated the process. I go to tools->Go and the console looks like this >"C:\Program Files (x86)\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "C:\Program Files (x86)\AutoIt3\Examples\Football.au3" The score.csv should be saved down to the same folder as Football.au3 if i understand it correct?
Wonkymuffin
Posts: 6
Joined: Wed Nov 09, 2016 8:46 am

sniffer66 wrote:
Sun Jan 31, 2021 9:34 am
mtrend wrote:
Sun Jan 31, 2021 9:27 am
sniffer66 wrote:
Sun Jan 31, 2021 8:55 am
Good stuff.

I've been using Auto-It for years and have downloaded many UDFs in that time. Sometimes it's easy to forget which are part of the default install and which need adding.

On another note, it's a relatively simple task to add in any of the in play statistics from each match. Shots on/off Target, Possession, Attacks etc.
Combined with saving SVs to History Lists it would be a cool way to add in stats based decisions to Guardian

If there is any interest in those I can improve the script. Let me know
Or if you have the ability it's not hard to update yourself. Just takes a little reading to get your head around the JSON format.
Yeah in play stats would be awesome, I'm trying to find info the SofaScore API but cant find anything published about it.

Very little published info on most sites APIs.

A good place to start is that AutoIt link I posted previously for that UDF. Json_dump() is a very handy function that will dump the contents of the json get to the console, but in readable format. Once you get your head around it, it's then relatively simple to query and return the right stats per team

Should have some free time tomorrow and will update the script with the stats.
Hi Sniffer66,

Have you been able to update the script with in-play stats? This would be extremely useful in improving my automation results. Thank you.
sniffer66
Posts: 1681
Joined: Thu May 02, 2019 8:37 am

petermikael wrote:
Sun Mar 07, 2021 11:21 am
Trying to download scores but no score.csv is to find on my computer. This feature is great so help is much appreciated. I have let the script run for several minutes before i terminated the process. I go to tools->Go and the console looks like this >"C:\Program Files (x86)\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "C:\Program Files (x86)\AutoIt3\Examples\Football.au3" The score.csv should be saved down to the same folder as Football.au3 if i understand it correct?
To be honest, I've not used this since I created it as I don't trade football on auto in BA - just thought it would be useful

I've just tested it though and ran fine for me - CSV file saves to same folder location as the script

Returned

1
* * *Central Coast Mariners* * S Score 1
* * *Macarthur FC* * S Score 0
* * *Abeldos United* * S Score 0
* * *Ab ovo* * S Score 0
* * *Bangalore Dream United FC* * S Score 0
* * *Income Tax SC* * S Score 0

Did you download the addititonal UDF's mentioned previously in the thread, and are you seeing any errors in the Scite Console ?
11percent
Posts: 1
Joined: Mon Nov 09, 2020 9:18 am

Installed software, and run script and its happily pulling scores from sofascore site.

Many thanks for posting instructions on this Stu, this will be a really useful addition to my automation.
Wonkymuffin
Posts: 6
Joined: Wed Nov 09, 2016 8:46 am

The work you have done so far with the scores is working brilliantly for me. My comment was in relation to the in-play stats from Sofascore as you had previously mentioned that it would be easy (well for you anyway!) to add these in to the csv. Thanks again.
Post Reply

Return to “Football trading”