Code:
UrlDownloadToFile,%Url%,%Name%-Status.txt
FileRead,html,%Name%-Status.txt
Loop,Parse,html,`n
{
IfInString,A_LoopField,AccountGadget_Handle
{
RegExMatch(A_LoopField,">[^<]+",CL_Name)
StringTrimLeft,CL_Name,CL_Name,1
}
IfInString,A_LoopField,TicketBalance
{
RegExMatch(A_LoopField,"TicketBalance[^<]+",CTix)
StringTrimLeft,CTix,CTix,15
StringReplace,CTix,CTix,`,
}
}
Key parts I don't understand are :
RegExMatch(A_LoopField,">[^<]+",CL_Name) ; in particular the >[^<]+ part
RegExMatch(A_LoopField,"TicketBalance[^<]+",CTix) ; in particular the ,"TicketBalance[^<]+", part
I'm essentially new to ahk and a friend gave me this code to build off of and "learn" how ahk works. I have programming experience, but I've never seen a parsing method like this. I can supply the txt file that this is originally designed for if needed.