Code:
alias comtest {
  .comopen a MSScriptControl.ScriptControl
  if (!$comerr) {
    var %vb set s = createobject("Shell.Application") $lf set f = s.namespace( $qt($1) ).items $lf s.namespace( $qt($2) ).copyhere(f)
    if ($com(a,Language,4,bstr,VBScript)) && (!$comerr) {
      echo -a $v1 -- $com(a,ExecuteStatement,1,bstr,%vb) -- $comerr
      .comclose a 
    }
  }
}
The following code create a little vb script to extract files from a zip file. To use it:
//noop $comtest(C:\file.zip,path\to)
This extract files from C:\file.zip to path\to. Both parameters must be complete filename/path.

I use a zip file with only one .txt file in it and pretty much everytime, if mIRC doesn't crash right after, you get this:

Quote:
1 -- -- 0
* No such Com 'a' open (line 20, script10.mrc)
Although the operation was successful, files have been extracted.

Now this leaves mIRC in a quite unstable state, mIRC will crash soon after using that alias, reusing that alias usually results in the crash being there faster, but it's not required to get the crash.

I'm using mIRC 7.29 and Windows 7.

Is this a direct consequences of mIRC's implementation of com object?


#mircscripting @ irc.swiftirc.net == the best mIRC help channel