Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: Skype UDF
;Winbatch 2009B - Skype UDFS uses : concatenation ; ;adapted from vbscript code Written by Rob van der Woude ; ;Stan Littlefield, September 17, 2009 ;/////////////////////////////////////////////////////////////////////////////////////////// GoSub udfs ;no error handling ;using RegEx Message("Skype Stuff",skypeinstalled():@CRLF:GetSkypeVersion()) ;or using binary tags ;Message("Skype Stuff",skypeinstalled():@CRLF:GetSkypeVersion()1) Exit ;/////////////////////////////////////////////////////////////////////////////////////////// :udfs #DefineFunction skypeinstalled() If !RegExistKey(@REGCLASSES,"Skype.Detection") Then Return("Skype Is Not Installed") oSkype = CreateObject( "Skype.Detection" ) retval="Skype Version Installed: ":oSkype.SkypeVersion oSkype = 0 Return(retval) #EndFunction #DefineFunction GetSkypeVersion() cResp="Cannot Obtain Latest Skype Version" oHTTP = CreateObject( "WinHttp.WinHttpRequest.5.1" ) oHTTP.Open("GET", "http://www.skype.com/intl/en/download/skype/windows/", @FALSE) UserAgent = "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3" oHTTP.SetRequestHeader("UserAgent", UserAgent) oHTTP.Send() If oHTTP.Status == 200 Then cResp = oHTTP.ResponseText oReg = CreateObject("VBScript.RegExp") oReg.Pattern = "<title>Skype ([0-9]+(\.[0-9]+)) for Windows" oReg.IgnoreCase = @FALSE oReg.Global = @TRUE oMatch = oReg.Execute( cResp ) If oMatch.Count > 0 Then cResp = "Latest Version Available: ":oMatch.Item(0).Submatches.Item(0) oMatch = 0 oReg = 0 EndIf oHTTP = 0 Return(cResp) #EndFunction #DefineFunction GetSkypeVersion1() cResp="Cannot Obtain Latest Skype Version" oHTTP = CreateObject( "WinHttp.WinHttpRequest.5.1" ) oHTTP.Open("GET", "http://www.skype.com/intl/en/download/skype/windows/", @FALSE) UserAgent = "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3" oHTTP.SetRequestHeader("UserAgent", UserAgent) oHTTP.Send() If oHTTP.Status == 200 Then cResp = oHTTP.ResponseText size=StrLen(cResp) bb=BinaryAlloc(size) BinaryEodSet(bb,size) BinaryPokeStr(bb,0,cResp) str=BinaryTagInit(bb,"<title>","</title>") str=BinaryTagFind(str) Message("",str) cResp=BinaryTagExtr(str,0) bb=BinaryFree(bb) EndIf oHTTP = 0 Return(cResp) #EndFunction Return ;///////////////////////////////////////////////////////////////////////////////////////////
Article ID: W18166
Filename: SkyPe UDFs.txt
File Created: 2009:12:09:11:12:50
Last Updated: 2009:12:09:11:12:50