Discussion:
VBS Equivalent of JS SetTimeout(...) function?
(too old to reply)
f***@gmail.com
2015-07-31 08:48:55 UTC
Permalink
Well, I have found a way to do it, and the reason for doing it is I have to
instantiate a winsock connection over dialup to remote locations, but I have to
check if the connection is already busy first and loop until the connection is
free.
I'm sure there are a whole bunch of situations one might wish to timeout on the
server...
setTimeout sets up a timer event... What would you do with that on the
server side (assuming you could do it)?
If what you're really after is extending the timeout for an ASP page beyond
the default 90 seconds, then use Server.ScriptTimeout = n ' in seconds at
the beginning of the server side code...
--
Michael Harris
Would've been nice if you would had written an example here for other people. I'm struggling with same problem (to find out how to delay an action in a (non-browser) script). I'm aware of "WScript.Sleep", but I'd like to use something like setTimeout, because if I have to tune first Sleep in a series of sleeps, I need to tune all the rest, if I want them to act in specific time-range.
Evertjan.
2015-07-31 10:23:31 UTC
Permalink
Post by f***@gmail.com
Well, I have found a way to do it, and the reason for doing it is I
have to instantiate a winsock connection over dialup to remote locations,
but I have to check if the connection is already busy first and loop
until the connection is free.
I'm sure there are a whole bunch of situations one might wish to
timeout on the server...
setTimeout sets up a timer event... What would you do with that on
the server side (assuming you could do it)?
If what you're really after is extending the timeout for an ASP page
beyond the default 90 seconds, then use Server.ScriptTimeout = n ' in
seconds at
the beginning of the server side code...
--
Michael Harris
Would've been nice if you would had written an example here for other
people. I'm struggling with same problem (to find out how to delay an
action in a (non-browser) script). I'm aware of "WScript.Sleep", but I'd
like to use something like setTimeout, because if I have to tune first
Sleep in a series of sleeps, I need to tune all the rest, if I want them
to act in specific time-range.
You are demonstrating timeout very well,
answering a posting 15 years and 2 days later
as that is rather a long Sleep, even for WScript!

I postulate you are, however, not aware of the consequences
in the sense of the sense of such action.

No wonder you are struggling.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Loading...