#Object References sh=Set sh = CreateObject("WScript.Shell")\n| fso=Set fso = CreateObject("Scripting.FileSystemObject")\n| ie=Set ie = CreateObject("InternetExplorer.Application")\n| tla=Set tla = CreateObject("TLI.TLIApplication")\n| sc=Set sc = CreateObject("MSScriptControl.ScriptControl")\n| net=Set Net = CreateObject("WScript.Network")\n| #Code Snippets dyna=Dim aTmp()\nRedim aTmp(-1)\nRedim Preserve aTmp(UBound(aTmp) + 1)\naTmp(UBound(aTmp)) = | #Wrapper Procedures #read file wrapper rf=Function ReadFile(FilePath)\n\t'Given the path to a file, will return entire contents\n\t' works with either ANSI or Unicode\n\tDim FSO, CurrentFile\n\tConst ForReading = 1, TristateUseDefault = -2, _\n\t\tDoNotCreateFile = False\n\tSet FSO = createobject("Scripting.FileSystemObject")\n\tIf FSO.FileExists(FilePath) Then\n\t\tIf FSO.GetFile(FilePath).Size>0 Then\n\t\t\tSet CurrentFile = FSO.OpenTextFile(FilePath, ForReading, _\n\t\t\t\tFalse, TristateUseDefault)\n\t\t\tReadFile = CurrentFile.ReadAll: CurrentFile.Close\n\t\tEnd If\n\tEnd If\nEnd Function\n| #Capture Console Output wrapper cmd=Function Cmd(cmdline)\n\t' Wrapper for getting StdOut from a console command\n\tDim Sh, FSO, fOut, OutF, sCmd\n\tSet Sh = createobject("WScript.Shell")\n\tSet FSO = createobject("Scripting.FileSystemObject")\n\tfOut = FSO.GetTempName\n\tsCmd = "%COMSPEC% /c " & cmdline & " >" & fOut\n\tSh.Run sCmd, 0, True\n\tIf FSO.FileExists(fOut) Then\n\t\tIf FSO.GetFile(fOut).Size>0 Then\n\t\t\tSet OutF = FSO.OpenTextFile(fOut)\n\t\t\tCmd = OutF.Readall\n\t\t\tOutF.Close\n\t\tEnd If\n\t\tFSO.DeleteFile(fOut)\n\tEnd If\nEnd Function\n #Get via XML Function GetXml(sURL)\n\t' Create an xmlhttp object:\n\tDim Xml\n\tSet Xml = CreateObject("Microsoft.XMLHTTP")\n\tXml.open "GET",sURL\n\tXml.send\n\tDo:wscript.sleep 10:Loop While Xml.ReadyState<>4\n\tGetXml = Xml.responseText\nEnd Function\n|