Function FritzBoxTaskbarInfo() FritzBoxTaskbarInfo = GetWANTraffic() End Function Function MakeVolSumStr(high_in,high_out,low_in,low_out) low2mb = 1000000 low2kb = 1000 high2mb = 4295 'low2mb = 1048576 'low2kb = 1024 'high2mb = 4096 ret = 0 postfix = " MB" if ((high_in>0) or (high_out>0)) then low_in = low_in / low2mb low_out = low_out / low2mb high_in = high_in * high2mb high_out = high_out * high2mb ret = (Int(high_in+low_in)+1)+(Int(high_out+low_out)+1) else low_in = low_in / low2kb low_out = low_out / low2kb if ((low_in+low_out) < low2kb) then ret = (Int(low_in)+1) + (Int(low_out)+1) postfix = " kB" else ret = (Int(low_in/low2kb)+1) + (Int(low_out/low2kb)+1) end If end If MakeVolSumStr = CStr(ret) + postfix End Function Function GetWANTraffic() GetWANTrafficTemp1 = ReturnHTML("http://fritz.box/cgi-bin/webcm?getpage=../html/de/menus/menu2.html&var:lang=de&var:menu=internet&var:pagename=inetstat") GetWANTrafficTemp2 = InStr (1, GetWANTrafficTemp1, "ThisWeek") + Len("ThisWeek") GetWANTrafficTemp1 = Right (GetWANTrafficTemp1, Len (GetWANTrafficTemp1) - GetWANTrafficTemp2) GetWANTrafficTemp2 = InStr (1, GetWANTrafficTemp1, "ThisMonth") - Len("ThisMonth") GetWANTrafficTemp1 = Left (GetWANTrafficTemp1, GetWANTrafficTemp2) GetWANTrafficTempinh2 = InStr (1, GetWANTrafficTemp1, "inh =") + Len("inh =") GetWANTrafficTempinh1 = Right (GetWANTrafficTemp1, Len (GetWANTrafficTemp1) - GetWANTrafficTempinh2) GetWANTrafficTempinh2 = InStr (1, GetWANTrafficTempinh1, ";") - 1 GetWANTrafficTempinh1 = Left (GetWANTrafficTempinh1, GetWANTrafficTempinh2) GetWANTrafficTempinl2 = InStr (1, GetWANTrafficTemp1, "inl =") + Len("inl =") GetWANTrafficTempinl1 = Right (GetWANTrafficTemp1, Len (GetWANTrafficTemp1) - GetWANTrafficTempinl2) GetWANTrafficTempinl2 = InStr (1, GetWANTrafficTempinl1, ";") - 1 GetWANTrafficTempinl1 = Left (GetWANTrafficTempinl1, GetWANTrafficTempinl2) GetWANTrafficTempouth2 = InStr (1, GetWANTrafficTemp1, "outh =") + Len("outh =") GetWANTrafficTempouth1 = Right (GetWANTrafficTemp1, Len (GetWANTrafficTemp1) - GetWANTrafficTempouth2) GetWANTrafficTempouth2 = InStr (1, GetWANTrafficTempouth1, ";") - 1 GetWANTrafficTempouth1 = Left (GetWANTrafficTempouth1, GetWANTrafficTempouth2) GetWANTrafficTempoutl2 = InStr (1, GetWANTrafficTemp1, "outl =") + Len("outl =") GetWANTrafficTempoutl1 = Right (GetWANTrafficTemp1, Len (GetWANTrafficTemp1) - GetWANTrafficTempoutl2) GetWANTrafficTempoutl2 = InStr (1, GetWANTrafficTempoutl1, ";") - 1 GetWANTrafficTempoutl1 = Left (GetWANTrafficTempoutl1, GetWANTrafficTempoutl2) inh = CDbl(GetWANTrafficTempinh1) outh = CDbl(GetWANTrafficTempouth1) inl = CDbl(GetWANTrafficTempinl1) outl = CDbl(GetWANTrafficTempoutl1) GetWANTraffic = MakeVolSumStr(inh,outh,inl,outl) End Function Function GetWANIP() GetWANIPTemp1 = ReturnHTML("http://fritz.box/cgi-bin/webcm?getpage=../html/de/menus/menu2.html&var:lang=de&var:menu=home&var:pagename=home") GetWANIPTemp2 = InStr (1, GetWANIPTemp1, "write(IpAdrDisplay(") + Len("write(IpAdrDisplay(") GetWANIPTemp1 = Right (GetWANIPTemp1, Len (GetWANIPTemp1) - GetWANIPTemp2) GetWANIPTemp2 = InStr (1, GetWANIPTemp1, ")") - 2 GetWANIPTemp1 = Left (GetWANIPTemp1, GetWANIPTemp2) GetWANIP = "WAN IP: " + GetWANIPTemp1 End Function Private Function ReturnHTML(sURL) Dim objXMLHTTP,HTML Set objXMLHTTP = CreateObject("Microsoft.XMLHTTP") objXMLHTTP.Open "GET", sURL, False objXMLHTTP.Send HTML = objXMLHTTP.responseBody Set objRS = CreateObject("ADODB.Recordset") objRS.Fields.Append "txt", 200, 45000, &H00000080 objRS.Open objRS.AddNew objRS.Fields("txt").AppendChunk HTML ReturnHTML = objRS("txt").Value objRS.Close Set objRS = Nothing Set objXMLHTTP = Nothing End Function