From WikiChip
Difference between revisions of "mirc/identifiers/$did"
< mirc‎ | identifiers

m (PatrolBot moved page $did identifier - mIRC to mirc/identifiers/$did: per new naming convention)
m
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
The '''$did''' identifier allows you to get the settings and values of controls in a dialog and use them to assist in performing the functions of buttons, radio boxes, etc.
+
{{mirc title|$did Identifier}}The '''$did''' identifier allows you to get the settings and values of controls in a dialog and use them to assist in performing the functions of buttons, radio boxes, etc.
  
  
 
== Synopsis ==
 
== Synopsis ==
 
  $did(<name>,<id>,[N])[.property]
 
  $did(<name>,<id>,[N])[.property]
 +
 +
'''Note:''' Inside the on dialog event, you can omit the whole dialog <name> parameter:
 +
 +
$did(<id>,[N])[.property]
 +
  
 
== Properties ==
 
== Properties ==
Line 77: Line 82:
 
{{mIRC identifier list}}
 
{{mIRC identifier list}}
  
[[Category:MIRC identifiers]]
+
[[Category:mIRC identifiers|did]]

Revision as of 15:00, 20 September 2017

The $did identifier allows you to get the settings and values of controls in a dialog and use them to assist in performing the functions of buttons, radio boxes, etc.


Synopsis

$did(<name>,<id>,[N])[.property]

Note: Inside the on dialog event, you can omit the whole dialog <name> parameter:

$did(<id>,[N])[.property]


Properties

  • text - returns line or Nth line
  • len - returns length of line or length of Nth line
  • lines - returns number of lines
  • sel - returns line number of Nth selected line
  • seltext - returns selected text in an editbox, or first selected item in a listbox
  • selstart - returns selected start character in the editbox
  • selend - returns selected end character in editbox line
  • edited - returns $true if text in editbox was changed, and is not empty.
  • state - returns state of checkboxes, radio buttons, 0 = off, 1 = on, 2 = indeterminate (for 3stage checkbox)
  • next - returns id of next control in order of tab keypress.
  • prev - returns id of previous control in order of tab keypress.
  • visible - returns $true if control is visible, otherwise $false
  • enabled - returns $true if control is enabled, otherwise $false
  • isid - returns $true if id exists in the dialog, otherwise $false
  • csel - returns line number of Nth checked box in a listcb control, if N = 0, returns number of checkmarked lines
  • cstate - returns 0 = off, 1 = on for item in a listcb control

Parameters

  • <name> - name of the dialog
  • <id> - id of the controls
  • [N] - usually a line number, it can also be an id number with menus, use 0 if you want to access the editbox of a combo control.
  • [.property] - used to check features of the dialog id, such as button state, selected line in a combo control, or number of lines in an editbox.

Example

This example will monitor what events are triggering, what event ID is triggering the event, and any current captions or titles of the event ID which triggered an event. Created a custom alias called /whatEvents which will open up the local dialog whatEvents:

alias whatEvents dialog - $+ $iif($dialog(whatEvents),v,m) whatEvents whatEvents
dialog -l whatEvents {
  title "Events? What Events?"
  size -1 -1 136 112
  option dbu
  text "Event Type", 1, 8 8 73 8
  text "", 2, 82 8 49 8
  text "Event Item ID", 3, 8 18 73 8
  text "", 4, 82 18 49 8
  text "Event Item Caption/Value", 5, 8 28 73 8
  text "", 6, 82 28 49 7
  button "Click me", 7, 8 40 37 12
  edit "Type in me", 8, 48 40 66 13
  check "Check/Uncheck Me", 9, 8 64 58 10
  text "0", 10, 8 73 58 10
  text "Scroll Me", 11, 72 64 57 8, center
  scroll "", 12, 72 72 58 8, range 0 100 horizontal bottom
  button "&Close", 13, 93 90 37 16, ok
}
ON *:DIALOG:whatEvents:*:*: {
  did -ra $dname 2 $devent
  did -ra $dname 4 $did
  did -ra $dname 6 $iif($did == 0,NA,$iif($did($did),$v1,$iif($did($did).sel,$v1,$iif($did($did) == 0,0,NA))
  did -ra $dname 10 $did(9).state
}

Once saved into a script file inside of the mIRC remotes, the above example can be executed by typing the following command:

/whatEvents

Almost all events are accounted for. The dialog properly tracks mouse movements, the ID of the elements being altered/used, and any other sorts of attainable event information.

Compatibility

Added: mIRC v5.5
Added on: 08 Jan 1999
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