mIRC Home    About    Download    Register    News    Help

Print Thread
#109545 30/01/05 08:08 PM
Joined: Sep 2004
Posts: 7
P
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
P
Joined: Sep 2004
Posts: 7
Is there a command that can halt a script for N seconds?
If not will there be one in a futur version?

#109546 30/01/05 08:19 PM
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
It has been suggested in the past, try the Search feature. Online also made a snippet using COM, which can be found here. Be sure to read the documentation that comes with it.

A slightly modified version of it would be:

Code:
alias sleep {
  var %a = $ticks $+ .vbs
  write %a WScript.Sleep $$1
  .comopen %a WScript.Shell
  if !$comerr { .comclose %a $com(%a,Run,3,bstr,%a,uint,0,bool,true) }
  .remove %a
}


The N stands for the amount of milliseconds.

Btw Online, if you are reading this: I'm curious why you use jscript and a .wsf file. Is there an advantage over vbscript?

Greets


Gone.
#109547 30/01/05 08:32 PM
Joined: Sep 2004
Posts: 7
P
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
P
Joined: Sep 2004
Posts: 7
tnx smile

#109548 31/01/05 06:52 AM
Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
There is also WhileFix.dll
Code:
;/wsleep <milliseconds>
alias wsleep {
  var %t = $ticks + $$1
  while $ticks < %t { dll WhileFix.dll WhileFix }
}

//echo -a $ticks | wsleep 1234 | echo -a $ticks


Link Copied to Clipboard