VBS_TIMEOUT doesn't work for me.
When I run this VBScript, it causes a VBScript timeout message after 10 seconds : "Script control : script you are executing is taking longuer then expected ... choose End or Continue". When continuing, the code ends successfully after approximately 35 seconds.
I added Let>VBS_TIMEOUT=50000 before the code to extend the VBScript timeout to 50 seconds, but I still have the same timeout message !
How to eliminate the timeout message ? Thanks.
Code: Select all
Let>VBS_TIMEOUT=50000
VBSTART
' VBScript to get public IP
On Error Resume Next
strComputer = "."
' Main Program
Getip
Function Getip
on error resume next
const URL = "http://www.domaintools.com/research/my-ip/myip.xml"
Dim info
set xmldoc = CreateObject("Microsoft.XMLDOM")
xmldoc.async=false
xmldoc.load(URL)
for each x in xmldoc.documentElement.childNodes
if x.NodeName = "ip_address" then
myip = x.text
end if
next
info = info & "IP address : " & myip & vbCRLF
Getip = info
end function
VBEND
VBEval>Getip,result
MDL>%result%