<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>I can't make my script do nothing!</title><link>http://blogs.msdn.com/ericlippert/archive/2003/10/07/53155.aspx</link><description>Yes, the title is grammatical. A few days ago I was discussing the semantics of data that isn't there. Today I want to talk a little about programs that do nothing. What do you do when you want a program to pause briefly, for whatever reason?</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>RE: I can't make my script do nothing!</title><link>http://blogs.msdn.com/ericlippert/archive/2003/10/07/53155.aspx#53156</link><pubDate>Tue, 07 Oct 2003 20:20:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:53156</guid><dc:creator>Mike</dc:creator><description>Hey Eric,

We use this &amp;quot;trick&amp;quot; to mimic a non-CPU intensive delay in our scripts and it does allow event handling on the main thread (or at least databinding which is our main concern).

function sleep(numberMillis) 
{
var dialogScript = &amp;quot;window.setTimeout(&amp;quot; + &amp;quot; function () { window.close(); }, &amp;quot; + numberMillis + &amp;quot;);&amp;quot;;
var result = window.showModalDialog(&amp;quot;javascript:document.writeln(&amp;quot; +&amp;quot; '&amp;lt;script&amp;gt;&amp;quot; + dialogScript + &amp;quot;&amp;lt;&amp;quot; + &amp;quot;/script&amp;gt;')&amp;quot;);
}</description></item><item><title>RE: I can't make my script do nothing!</title><link>http://blogs.msdn.com/ericlippert/archive/2003/10/07/53155.aspx#53157</link><pubDate>Tue, 07 Oct 2003 20:26:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:53157</guid><dc:creator>Eric Lippert</dc:creator><description>Indeed, that is another good example of what I'm talking about.  There is no way we could have implemented a &amp;quot;setTimeout&amp;quot; method in the script engines -- such a method requires detailed knowledge of the internals of IE, and would work in IE and nowhere else.  Therefore the sensible place to put it is in IE, not in the language runtime.
</description></item><item><title>re: Why Can't I Create The WScript Object?</title><link>http://blogs.msdn.com/ericlippert/archive/2003/10/07/53155.aspx#129839</link><pubDate>Tue, 11 May 2004 19:04:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:129839</guid><dc:creator>Fabulous Adventures In Coding</dc:creator><description /></item><item><title>re: I can't make my script do nothing!</title><link>http://blogs.msdn.com/ericlippert/archive/2003/10/07/53155.aspx#576659</link><pubDate>Sat, 15 Apr 2006 00:22:31 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:576659</guid><dc:creator>Christopher Yeleighton</dc:creator><description>I am calling a COM object from WSH. &amp;nbsp;The call is asynchronous and I have to wait for the notification that it has completed. &amp;nbsp;As I have nothing else to do until I get the data, I go to sleep for a very long time.&lt;br&gt;My question is: how should I wake up when I get the data back? &amp;nbsp;I am used to the paradigm when the interrupt handler stores the data in a buffer and IRETs; the data are processed during normal execution and not in the handler. &amp;nbsp;Can this paradigm be followed in WSH? &amp;nbsp;Or is the analogy wrong and the code should follow the pseudo message loop pattern: initialize, sleep, handle events in the meantime, quit explicitly when you are done? &amp;nbsp;Or is sleeping forever prohibited and I should take naps in a loop? &amp;nbsp;But then I need a hint how short those naps should be.</description></item><item><title>Pausing execution of an ASP Script | keyongtech</title><link>http://blogs.msdn.com/ericlippert/archive/2003/10/07/53155.aspx#9361439</link><pubDate>Thu, 22 Jan 2009 05:05:07 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9361439</guid><dc:creator>Pausing execution of an ASP Script | keyongtech</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://www.keyongtech.com/1164738-pausing-execution-of-an-asp"&gt;http://www.keyongtech.com/1164738-pausing-execution-of-an-asp&lt;/a&gt;&lt;/p&gt;
</description></item></channel></rss>