Yes, that was not really correct. Before it wasn't possible to handle such result from mIRC's COM implementation, now with the latest beta it's possible:
Code
alias myips {
  .comopen loc WbemScripting.SWbemLocator
  .comclose loc $com(loc, ConnectServer, 3, dispatch* query)
  noop $com(query, ExecQuery, 3, bstr, Select * from Win32_NetworkAdapter WHERE NetConnectionStatus = 2, dispatch* adapter)
  var %a $comval(adapter,0)
  while (%a) {
    hadd -m getips $comval(adapter,%a,Index) $comval(adapter,%a,NetConnectionID)
    dec %a 
  }
  noop $com(query, ExecQuery, 3, bstr, Select * from Win32_NetworkAdapterConfiguration WHERE IPEnabled = True, dispatch* ips)
  var %cv $comval(ips,0)
  while (%cv) {
    if ($hget(getips,$comval(ips, %cv, Index)) != $null) {
      noop $comval(ips, %cv, IPAddress,&test).result
      breplace &test 0 32
      echo -s $bvar(&test,1-).text
    }
    dec %cv
 
  }
  :error
  if ($error || %err) {
    echo -a /myips: $v1
    reseterror
  }
  hfree getips
  .comclose query
  .comclose adapter
  .comclose ips
}
This finds the network adapter which are connected (status = 2) and then find the ip addresses belonging to them.

Note that when the value returned is an array like this, $comval(name,N,IPAddress) would return $null, but it now returns the first element in the array (while you can access the full array using a binvar and splitting on byte 0)


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