From WikiChip
$com Identifier - mIRC
< mirc‎ | identifiers
Revision as of 17:12, 3 April 2018 by Ouims (talk | contribs)

$com calls a member of an open COM connection with the specified method and parameter, or returns informations about a currently opened COM


Synopsis

$com(name,member,method,type1,value1,...,typeN,valueN) - calls a member of an open COM connection with the specified method and parameters, returns 1 if the call succeeds, 0 = fail.


$com(name/N) - returns the name of the Nth open COM connection or the name of that connection if it's open

Paramters

  • name/N - The name of the connection or the Nth connection
  • member - The name of the function of the object
  • method - A combination of the following value added together:
    • 1 = DISPATCH_METHOD
    • 2 = DISPATCH_PROPERTYGET
    • 4 = DISPATCH_PROPERTYPUT
    • 8 = DISPATCH_PROPERTYPUTREF
Value Method
1 Call a member of an object
2 Return a value
3 (1+2) Call a member and return a value *
4 Set a property
5 (1+4) Set a property with a member call *
6 (2+4) Set a property and return a value *
7 (1+2+4) Set a property and return a value with a member call *
8 Set a property by reference
9 (1+8) Set a property by reference with a member call *
10 (2+8) Set a property by reference and return a value *
  • type1 - The variable type, can be:
Type Description Values
i1 single byte signed integer 0 to 225
ui1 single byte unsigned integer 0 to 255
i2 two byte signed integer -32768 to 32767
ui2 two byte unsigned integer 0 to 65535
i4 four byte signed integer +/- 2147483647
ui4 Holds unsigned 32-bit (4-byte) integers 0 through 4,294,967,295
int integer -2147483648 to 2147483647
uint unsigned integer 0 to 4294967295
r4 real, 4-byte floating point number 1.17549435E-38 to 3.40282347E+38
r8 double real, 8-byte floating point number 2.2250738585072014E-308 - 1.7976931348623157E+308
cy eight byte curreny number -922337203685477.5625 to 922337203685477.5625
date contains date and time, stored as an 8-byte floating-point number +/-79,228,162,514,264,337,593,543,950,335
decimal Holds signed 128-bit (16-byte) values representing 96-bit (12-byte) integer numbers. +/-79,228,162,514,264,337,593,543,950,335
bool contain any string or numeric representation.
bstr null-terminated unicode character string value. A string can contain from 0 to approximately 2 billion (2^31) Unicode characters.
variant can contain string, date, time, boolean, or numeric values. When used, a data type must follow it: for example: variant int 5
dispatch This data type indicates a pointer to an IDispatch interface on an OLE object (DBTYPE_IDISPATCH).
unknown This data type indicates a pointer to an IUnknown interface on an OLE object (DBTYPE_IUNKNOWN).
error This data type indicates a 32-bit error code (DBTYPE_ERROR)

To make a variable by reference, postfix the data type with an asterisk and a variable name, for example: int* pIntOfBeer.

  • value1 - the value assigned to the variable type

Example

Echo the value of $dlevel to the active window:

//echo -a Default user level: $dlevel

Compatibility

Added: mIRC v4.72
Added on: 09 Jan 1997
Note: Unless otherwise stated, this was the date of original functionality.
Further enhancements may have been made in later versions.


See Also

v · d · e mIRC identifier list

$ $$, $, $0, $1-, $!, $&, $*, $+, $++, $?

A $abook, $abs, $acos, $active, $activecid, $activewid, $adate, $address, $addtok, $addtokcs, $agent, $agentname, $agentstat, $agentver, $alias, $and, $anick, $ansi2mirc, $aop, $appactive, $appstate, $asc, $asctime, $asin, $atan, $atan2, $auto, $avoice, $away, $awaymsg, $awaytime

B $banlist, $banmask, $base, $beta, $bfind, $bindip, $bitoff, $biton, $bits, $bnick, $bvar, $bytes

C $calc, $caller, $cancel, $cb, $cd, $ceil, $chan, $chanmodes, $channel, $chantypes, $chat, $chr, $cid, $clevel, $click, $cmdbox, $cmdline, $cnick, $color, $colour, $com, $comcall, $comchan, $comchar, $comerr, $compact, $compress, $comval, $cos, $cosh, $count, $countcs, $cr, $crc, $creq, $crlf, $ctime, $ctimer, $ctrlenter

D $date, $day, $daylight, $dbuh, $dbuw, $dccignore, $dccport, $dde, $ddename, $debug, $decode, $decompress, $deltok, $devent, $dialog, $did, $didreg, $didtok, $didwm, $dir, $disk, $dlevel, $dll, $dllcall, $dname, $dns, $donotdisturb, $dqwindow, $duration

E $ebeeps, $editbox, $email, $emailaddr, $encode, $envvar, $error, $eval, $evalnext, $event, $eventid, $eventparms, $exists, $exiting

F $false, $feof, $ferr, $fgetc, $file, $filename, $filtered, $find, $finddir, $finddirn, $findfile, $findfilen, $findtok, $findtokcs, $fline, $flinen, $floor, $font, $fopen, $fread, $fromeditbox, $fserv, $fserve, $fulladdress, $fulldate, $fullname, $fullscreen

G $get, $getdir, $getdot, $gettok, $gmt, $group

H $halted, $hash, $height, $hfile, $hfind, $hget, $highlight, $hmac $hmatch, $hnick, $host, $hotline, $hotlinepos, $hotlink, $hotp, $hregex, $hypot

I $iaddress, $ial, $ialchan, $ibl, $idle, $iel, $ifmatch, $ifmatch2, $ignore, $iif, $iil, $inellipse, $ini, $initopic, $inmidi, $inmode, $inmp3, $inpaste, $inpoly, $input, $inrect, $inroundrect, $insong, $insongpause, $instok, $int, $intersect, $inwave, $inwho, $ip, $iptype, $iql, $isadmin, $isalias, $isbit, $isdde, $isdir, $isfile, $isid, $islower, $istok, $istokcs, $isupper, $isutf

K $keychar, $keyrpt, $keyval, $knick

L $lactive, $lactivecid, $lactivewid, $left, $leftwin, $leftwincid, $leftwinwid, $len, $level, $lf, $line, $lines, $link, $lock, $locked, $lof, $log, $log10, $logdir, $logstamp, $logstampfmt, $longfn, $longip, $lower, $ltimer

M $maddress, $mask, $matchkey, $matchtok, $matchtokcs, $maxlenl, $maxlenm, $maxlens, $md5, $me, $menu, $menubar, $menucontext, $menutype, $mid, $mididir, $mircdir, $mircexe, $mircini, $mkfn, $mklogfn, $mknickfn, $mnick, $mode, $modefirst, $modelast, $modespl, $mouse, $mousecx, $mousecy, $mousedx, $mousedy, $mousekey, $mouselb, $mousex, $mousey, $mousewin, $mp3, $mp3dir, $msfile, $msgstamp, $msgtags

N $N, $naddress, $network, $newnick, $nhnick, $nick, $nickmode, $no, $nofile, $nopath, $nopnick, $noqt, $not, $notags, $notify, $null, $numeric, $numtok, $nvnick

O $ok, $online, $onlineserver, $onlinetotal $onpoly, $opnick, $or, $ord, $os

P $parmN, $parms, $parseline, $parsetype, $parseutf, $passivedcc, $pi, $pic, $play, $pnick, $portable, $portfree, $pos, $poscs, $prefix, $prop, $protect, $puttok

Q $qt, $query

R $r, $raddress, $rand, $rands, $rawbytes, $rawmsg, $read, $readini, $readn, $regbr, $regerrstr, $regex, $regml, $regmlex, $regsub, $regsubex, $remote, $remove, $removecs, $remtok, $remtokcs, $replace, $replacecs, $replacex, $replacexcs, $reptok, $reptokcs, $result, $rgb, $right, $rnick, $round

S $samepath, $scid, $scon, $script, $scriptdir, $scriptline, $sdir, $send, $server, $serverip, $servertarget, $sfile, $sha1, $sha256, $sha384, $sha512, $shortfn, $show, $signal, $sin, $sinh, $site, $sline, $snick, $snicks, $snotify, $sock, $sockbr, $sockerr, $sockname, $sorttok, $sorttokcs, $sound, $speak, $sqrt, $sreq, $ssl, $sslcertsha1, $sslcertsha256, $sslcertvalid, $ssldll, $ssllibdll, $sslready, $sslversion, $starting, $status, $str, $strip, $stripped, $style, $submenu, $switchbar, $sysdir

T $tan, $tanh, $target, $tempfn, $ticks, $time, $timeout, $timer, $timestamp, $timestampfmt, $timezone, $tip, $tips, $titlebar, $token, $toolbar, $topic, $totp, $treebar, $true, $trust

U $ulevel, $ulist, $unsafe, $upper, $uptime, $url, $usermode, $utfdecode, $utfencode

V $v1, $v2, $var, $vc, $vcmd, $vcmdstat, $vcmdver, $version, $vnick, $vol

W $wavedir, $wid, $width, $wildsite, $wildtok, $wildtokcs, $window, $wrap

X $xor

Y $yes

Z $zip

= =$nick