when calling a com method you can do
$com(name,method,3,bstr* txt,hello)

and then later on reference what you passed by doing $com(name,txt) which would return hello.

if a method dispatches another object and you want the dispached object as a parameter of another function then

$com(name,method,3,dispatch* txt)
$com(name,method2,3,dispatch*,txt)

would pass the object txt to method2.

My problem however is that i seem to miss support for "simple" variables such as bstr etc which are made accessible through properties. A combination of the 2 previous explained situations as you will.

example:
Code:
alias download {
  clear
  .comopen xml msxml2.xmlhttp
  var %x $com(xml,open,1,bstr,get,bstr,http://www.mirc.com,bool,-1) $&
    $com(xml,send,1) $com(xml,responseText,3,dispatch* txt)
  comopen ado adodb.stream
  echo -a Mode: $com(ado,Mode,4,int,3)
  echo -a Type: $com(ado,Type,4,int,2)
  echo -a Open: $com(ado,Open,3)
  echo -a WriteText: $com(ado,WriteText,3,dispatch*,txt)
  echo -a Save: $com(ado,SaveToFile,3,bstr,C:\test.txt,int,2)
  echo -a Close: $com(ado,Close,3) - $com(xml,txt)
  cc
  run C:\test.txt
}
alias cc {
  if ($com(xml)) comclose xml
  if ($com(txt)) comclose txt
  if ($com(ado)) comclose ado
}


Unless im horribly mistaken this seems impossible and a bug/missing feature in mIRC.

Last edited by Mpdreamz; 20/04/08 07:13 PM.

$maybe