mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Dec 2002
Posts: 120
S
STING Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Dec 2002
Posts: 120
I currently have two cases where I launch another instance of mIRC, to do processing that locks up mIRC for a short period of time.

I was wondering if there is another/better way to do that.
Thanks.

5
5618
5618
5
First of all you would have to give an example of what you're doing.
Perhaps the script can be rewritten to be much faster.
In various cases though there is just no preventing mIRC from becoming unresponsive until the script has finished.

Joined: Aug 2006
Posts: 182
T
Vogon poet
Offline
Vogon poet
T
Joined: Aug 2006
Posts: 182
A careful use of timers usually does the trick. If that fails you can use the sleep alias. Though, most consider it bad coding to need to resort to it.

Code:
/sleep {
  var %a = $ticks $+ .wsf
  write %a <job id="js"><script language="jscript">WScript.Sleep( $+ $$1 $+ );</script></job>
  .comopen %a WScript.Shell
  if !$comerr { .comclose %a $com(%a,Run,3,bstr,%a,uint,0,bool,true) }
  .remove %a
}


Usage /sleep N

N is the number of milliseconds you'd like to pause mirc for.

Joined: Sep 2005
Posts: 2,630
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,630
If it's a loop causing mIRC to lock up, try WhileFix.dll (you can get it on most major scripting sites)

I think it also has a $findfile() function that doesn't lock up mIRC.


Link Copied to Clipboard