' Change this to your Coolmon directory
const outFile = "C:\Program Files\DaisyManSoftware\ECCP109.txt"
' Change this to your username
const userName = "RessurectionJoe" ' <-- CHANGE THIS
set http = createobject("microsoft.xmlhttp")
set fso = CreateObject("Scripting.FileSystemObject")
set fOutput = fso.CreateTextFile(outFile,true)
' Get ECCP109 data
http.open "GET",sourceURL,False
http.send
' Create array with each line as an element
htmlArray = Split(http.responsetext, vbLf)
' Loop through the array, and find our user
for i = 0 To UBound(htmlArray)
if (InStr(htmlArray(i),userName) > 0) then
a = InStr(htmlArray(i - 1), " <td> ") + 7
b = InStr(htmlArray(i - 1), " </td>") - a
fOutput.WriteLine Mid(htmlArray(i - 1), a, b) ' User Rank
a = InStr(htmlArray(i + 1), " <td> ") + 7
b = InStr(htmlArray(i + 1), " </td>") - a
fOutput.Write Mid(htmlArray(i + 1), a, b) ' DP Submitted
foutput.write " - "
a = InStr(htmlArray(i + 2), " <td> ") + 7
b = InStr(htmlArray(i + 2), " </td>") - a
fOutput.WriteLine Mid(htmlArray(i + 2), a, b) ' New DP
a = InStr(htmlArray(i + 3), " <td> ") + 7
b = InStr(htmlArray(i + 3), " </td>") - a
fOutput.WriteLine Mid(htmlArray(i + 3), a, b) ' Days Inactive
exit for ' All done
end if
next