Jump to content

Should i learn another language to automate this?

Recommended Posts


Hi, I'm currently working on a study about the football betting market, and i would like to automatize some of the process of getting data into my databases (excels for example).

The problem here is i only know AutoIT as a programming language.

~Example of 1 task i wanted to do:

Open this (http://www.meusresultados.com/equipa/real-madrid/W8mj7MDD/); Get Real Madrid's last game goals; Store into a variable then Excel;

In this example i would use maybe _FFReadHTML and _StringBetween, but in this case some of the source code is hidden in a thing called "<div id"

So, people in this forum seem to understand a little bit more.. What language should i learn to facilitate my job?


Edited by karudish

Share this post

Link to post
Share on other sites

Does this work for you?

#include <Array.au3>
#include <IE.au3>

Local $aUltimos_Resultados = _GetResults("http://www.meusresultados.com/equipa/real-madrid/W8mj7MDD/", "fs-summary-results")
Local $aAgendados = _GetResults("http://www.meusresultados.com/equipa/real-madrid/W8mj7MDD/", "fs-summary-fixtures")
Local $aEquipa = _GetResults("http://www.meusresultados.com/equipa/real-madrid/W8mj7MDD/", "block-summary-squad")

Func _GetResults($sURL, $sTableId)
    Local $aTable, $aUnique
    Local $oIE = _IECreate($sURL, 1)
    Local $oDivs = _IEGetObjById($oIE, $sTableId)
    Local $oTables = _IETagNameGetCollection($oDivs, "table")
    For $oTable in $oTables
        $aTable = _IETableWriteToArray($oTable, True)
    If UBound($aTable) > 1 Then
        For $i = UBound($aTable, 2) - 1 To 0 Step - 1
            ConsoleWrite($i & @CRLF)
            $aUnique = _ArrayUnique($aTable, $i)
            If $aUnique[0] = 1 And StringStripWS($aUnique[1], 8) = "" Then _ArrayColDelete($aTable, $i)
        Local $aTable[1][2] = [[0, ""]]
    Return $aTable


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.