Function GetIPAddress() Dim Flag, Source Set GetIPObj = WScript.GetObject("http://ipseeker.cn//") Flag = 0 For i=1 To 10 If GetIPObj.readyState = "complete" Then Flag=1 Exit For End If WScript.Sleep 500 Next
If Flag = 0 Then GetIPAddress = "Get IP Address Time Out ..." Else Source = GetIPObj.documentElement.innerText Set Rep = New RegExp Rep.Pattern="(/d+)/.(/d+)/.(/d+)/.(/d+)" For Each result in Rep.Execute(Source) GetIPAddress = result Exit For Next End If End Function
Function MailTo(MailAddress) Dim NameSpace, MailObject