Reputation: 189
JavaScript has a very hand setTimeout
function that can be used to delay execution of a chunk of code. Is there something equivalent in vbscript ?
Upvotes: 1
Views: 2592
Reputation: 18827
From this link
<html>
<head>
<script language="vbscript">
dim x : x=0
dim i : i=0
function myfunction()
x=100
i=i+1
end function
function mymonitor()
msgbox ("i=" & i & vbcrlf & "x=" & x)
end function
sub window_onload
setTimeout "myfunction()",1000
setTimeout "mymonitor()",2500
end sub
</script>
</head>
</html>
Upvotes: 1