Other Identifiers

 

$+(n1,...,nN)

Combines all of the specified parameters, the same as using $+ in between each item.

 

$?*!="message"

Prompts the user for input and returns the result.

 

//echo $?="What is your name?"

 

If the user enters their name in the editbox and presses the OK button, $? will return whatever the user entered. If the user clicks on the Cancel button, $? returns nothing.

 

//echo $?*="What is your password?"

 

In this case the $?* makes any text that the user types into the editbox appear as ***** characters to prevent anyone seeing what is being entered.

 

//echo $?!="Shall I continue?"

 

In this case, a Yes/No dialog pops up. If the user clicks on Yes, $true is returned, otherwise $false is returned.

 

The input dialog is extended vertically to display the whole message if it is very long. You can also make text appear on different lines by using the $crlf identifier to separate the lines, eg.

 

//echo $?="This is on the first line. $crlf $+ And this is on the 2nd line."

 

Note: This identifier cannot be used in a script event. One way around this is to use a /timer to initiate an input request after the script ends.

 

$ansi2mirc(text)

Returns text with the ANSI codes converted into mIRC color codes.

 

$away

Returns the value $true or $false depending on whether you are marked as away or not.

 

You can also use $awaymsg and $awaytime to return your current away settings.

 

$caller

Returns the type of feature that directly called the current command or identifier.

 

The type can be: activex, command, dde, dll, dragdrop, editbox, event, funckey, identifier, menu, mouse, play, sendmsg, tabcomp, timer, or other.

 

$cb

Returns the clipboard contents.

 

$cb(N,u,%var|&binvar)

Returns $crlf delimited lines from text currently in the clipboard.

 

if N is -1, stores entire clipboard.

 

If the u parameter is specified, returns UTF-8 encoded text.

 

The %var|&binvar parameters are optional. If specified, results are stored in them and the identifier returns the length of the text.

 

Properties: len

 

$cb(0)                returns the number of lines in the clipboard

$cb(0).len        return the total length of all lines in the clipboard

$cb(1)                returns line 1 from the clipboard

$cb(1).len        returns the length of line 1

 

 

$chantypes

mIRC supports numeric 005 token CHANTYPES, and can handle a dynamic set of channel prefixes. $chantypes returns the list of channel prefixes which can be joined. When not connected to a server, mIRC uses a default $chantypes value of CHANTYPES=#&.

 

$chanmodes

mIRC supports numeric 005 token CHANMODES, and can handle a dynamic set of channel modes. The $chanmodes identifier returns the list of supported channel modes. When not connected to a server, mIRC uses a default $chanmodes value of CHANMODES=bIe,k,l.

 

$cmdbox

Returns $true if a command or script was initiated via the command editbox in a channel window.

 

$cmdline

Returns the command line that was passed to mIRC when it was first run.

 

$codepage(N)

Returns the list of available codepages on your system.

 

Properties: name, desc, id

 

$color(name/N)

Returns the Nth color index of the specified color name eg. $color(action text). If you do not specify the full name the first partial match is returned eg. $color(action)

 

If you specify an N value, returns the RGB value for the Nth color box.

 

Properties: dd

 

$color(action).dd        returns number in double-digit format

 

$comchar

Returns the command prefix character.

 

$cr

Returns the carriage return character, the same as $chr(13).

 

$creq

Returns current /creq settings in the DCC Options chat section dialog.

 

$crlf

Returns a carriagereturn/linefeed combination.

 

$dccignore

Returns $true if ignore types is turned on in the DCC Folders dialog, otherwise returns $false.

 

$dccignore(N/filename)

Returns the Nth item in the dcc ignore types editbox in the DCC Folders dialog.

 

If n is zero, returns number of items in list, otherwise returns Nth item in list. If a filename is specified, returns $true if it matches item in list, otherwise $false.

 

$dccport

Returns the port being used by the DCC Server.

 

$dll(name.dll,procname,data)

Returns the value resulting from a call to a DLL designed to work with mIRC.

 

$ebeeps

Returns $true if sounds are enabled in the Sounds dialog.

 

$editbox(window,N)

Returns the text in the editbox of the specified window. If N = 1, returns the text in the second editbox in a channel window, if it is open.

 

Properties: selstart, selend

 

$emailaddr

Returns the email address specified in the Connect dialog.

 

$eval(text,N)

Evaluates the contents of text N times. If N is not specified, the default is N = 1. If N is zero, text is not evaluated.

 

This allows you to recursively evaluate identifiers and variables in a line of text.

 

$eventparms

Returns the event-specific parameters passed to an executed command in a script.

 

$envvar(name|N)

Returns environment variables. If N is zero, returns total number of environment variables.

 

Properties: name, value

 

$exiting

Returns 0, or 1 if mIRC is in the process of exiting, and 2 if mIRC is exiting and restarting.

 

$font(N/Name)

Returns the list of available fonts on the system.

 

Properties: size, pitch, type

 

$fromeditbox

Returns $true/$false if command or identifier was called directly from an editbox.

 

$fullname

Returns the full name specified in the Connect dialog.

 

$hash(text,B)

Returns a hash number based on text where B is the number of bits to use when calculating the hash number.

 

$highlight

Returns $true if highlighting is turned on in the Highlight dialog, otherwise returns $false.

 

$highlight(N/text)

Returns the Nth line in the highlight listbox, or if text is specified, returns the properties for the highlight line that matches text.

 

Properties: text, color, sound, flash, message, nicks, regex, cs, chans

 

$hmac(text|&binvar|filename, key, hash, N)

Returns an HMAC (keyed-Hash Message Authentication Code) based on the supplied key where hash = md5, sha1 (default), sha256, sha384, or sha512, and N = 0 for plain text (default), 1 for &binvar, 2 for filename.

 

$host

Returns your Local host name.

 

$hotp(key, count, hash, digits)

Returns an HOTP (HMAC-based One-Time Password) based on the specified parameters.

 

The key is required and can be in a hex format of 40/64/128/256 chars, base32 format of 16/26/32 chars, or plain text. It can also be in a Google Authenticator format ie. lowercase with spaces.

 

The hash can be md5, sha1, sha256, sha384, sha512.

 

The digits can range from 3 to 10.

 

The count is required, and hash and digits are optional and default to sha1 and 6.

 

$iif(C,T,F)

Returns T or F depending on whether the evaluation of the Conditional C is true or false.

 

$iif(1 == 2, yes, no)  returns "no"

 

$iif() returns F if the conditional returns zero, $false, or $null. For any other value $iif() returns T.

 

If you do not specify the F parameter, $iif returns a T value if the condition is true, and returns nothing if it is false.

 

$iif(1 == 2, yes)  returns nothing

 

You can find out more about conditionals in the if-then-else section.

 

$ifmatch

Returns the first parameter of matching if-then-else comparison.

 

In the case of this comparison:

 

if (text isin sometext) { ... }

 

$ifmatch returns "text"

 

$ignore(N/address)

Returns the Nth address in the ignore list.

 

Properties: type, secs

 

$ignore(0)        returns the total number of addresses in the ignore list

$ignore(1)        returns the 1st address in the ignore list

$ignore(2).type        returns the ignore flags for the 2nd address in the ignore list

$ignore(2).secs        returns number of seconds until ignore is removed if /ignore -uN was used

 

Note: If you specify an address, the first matching address in the ignore list is returned.

 

$inpaste

Returns $true if a user typed Control+V or Shift+Insert to paste text into an editbox, mainly useful when processing an on INPUT event.

 

$input(prompt,options,window,title,text)

Prompts the user for input and returns the result.

 

The input dialog is extended vertically to display the prompt message if it is very long. You can also make text in the prompt message appear on different lines by using the $crlf identifier to separate lines.

 

Options can be a combination of the following:

 

e - show input editbox

p - show input password editbox

o - ok button

y - yes no buttons

n - yes no cancel buttons

r - retry cancel buttons

v - return $ok, $yes, $no, $cancel for buttons

g - right-align buttons

b - disables buttons for a second when dialog is displayed

f - return $no/$cancel for edit/combo boxes if no/cancel is pressed

 

By default, buttons return $true or $null, same as $?. If there is an input editbox, the ok/yes buttons always return the contents of the editbox.

 

iqwhtc - show the info, question, warning, halt, start, and bin icons respectively.

d - play system sound associated with icon.

 

s - indicates that window name has been specified

a - activate dialog

u - use current active window as parent window

x - opens the dialog on the desktop

 

kN - an N second timeout value. On timing out, $timeout is returned if v is specified, no value if e is specified, and $false otherwise.

 

m - indicates that multiple text parameters have been specified. They will be displayed in a combobox. The first text item is the default item (a reference to an item in the list), the rest are the items in the list.

 

window - name of the window to be used as parent window.

 

title - the titlebar text.

 

text - the default text placed in the input editbox.

 

The options, window, title, and text are optional parameters.

 

Note: This identifier cannot be used in a script event. One way around this is to use a /timer to initiate an input request after the script ends.

 

$ip

Returns your IP address.

 

$isadmin

Returns $true if mIRC is running in an elevated, administrator state, otherwise $false.

 

$isalias(name,[N])

Returns $true if the specified name is an alias command that exists in your aliases or scripts.

 

Properties: fname, alias, ftype

 

$isalias(join)        returns $true if you have an alias for /join

$isalias(join).fname        returns the filename in which the alias exists

$isalias(join).alias        returns the alias definition for /join

$isalias(join).ftype        returns alias or remote

 

Note: The N parameter is optional and returns the Nth line in a multi-line alias when used with the .alias property.

 

$isid

Returns $true if an alias was called as an identifier, otherwise $false.

 

$lf

Returns the linefeed character, the same as $chr(10).

 

$lock(item/#/N)

Returns $true or $false for the lock settings on items in the Lock dialog.

 

Properties: startup, send, get, chat, query, fserve, channels, tray, tips

 

You can also use $lock(N) where N returns the Nth channel in the limit channels listbox, or you can specify a channel name instead of N.

 

$locked

Returns $true if mIRC is currently locked.

 

$maxlens, $maxlenm, $maxlenl

Return the maximum lengths for small, medium, and large strings used in mIRC.

 

Note: Although it is possible in some situations, eg. when assigning values to variables, to store slightly longer strings, the values returned by the above identifiers should be treated as maximums.

 

$md5(text|&binvar|filename,[N])

Returns md5 hash value for the specified data, where N = 0 for plain text (default), 1 for &binvar, 2 for filename.

 

$mircpid

Returns mIRC's process id.

 

$modespl

mIRC supports numeric 005 token MODES.

 

$modespl returns the maximum number of parameters allowed per /mode, eg. if $modespl is equal to 5, you can use /mode +ooooo to set five modes at a time.

 

$msgstamp

Returns UTC timestamp for a server message that has an IRCv3 @time prefix tag, such as when CAP server-time or znc.in/server-time[-iso] are enabled on a server.

 

$msgtags

mIRC removes @ prefixed tags (IRCv3 message tags) from incoming server messages and stores them in the $msgtags identifier.

 

$msgtags(tag|N)

Returns the individual tags listed in the $msgtags identifier, where N = 0 returns number of tags.

 

Properties: tag, key

 

$network

Returns the name of the IRC network you are currently connected to.

 

Note: It may not be possible to get this information if a network does not provide it.

 

$os

Returns the version number of the operating system. The reply can be XP, 2003, 2003R2, Vista, 2008, 7, 2008R2, 8, 2012, 8.1, 2012R2, 10, 11, 2016, 2019, or 2022.

 

Properties: major, minor, build, platform, type, spmajor, spminor, suite

 

$parms

Returns an untokenized $1- for events and other command/identifier calls.

 

$passivedcc

Returns $true if passive dcc is enabled in the DCC Options dialog.

 

$port

Returns the port number of the server to which you are currently connected.

 

$portable

Returns $true or $false depending on whether mIRC was run as portable.

 

$prefix

mIRC supports numeric 005 token PREFIX, and can handle a dynamic set of channel nickname prefixes.

 

$prefix returns the list of channel nickname prefixes ie. op, halfop, voice, etc. that are supported on a server.

 

When not connected to a server, mIRC uses a default $prefix value of PREFIX=(ohv)@%+.

 

$result

Stores the number value returned to a calling routine by the /return command.

 

$server

Returns the name of the server to which you are currently connected.

 

If you are not currently connected to a server, it returns $null.

 

$server(N/address,[group])

Returns the address of the Nth server in your irc servers list.

 

Properties: desc, port, group, pass, method, methodpass, keytype, key, itype, nick, anick, user, email, encoding

 

$server(0)                returns the total number of servers in the servers list

$server(2)                returns the address of the 2nd server

$server(2).desc                returns the description of the 2nd server

$server(3).port                returns the port(s) of the 3rd server

 

If you specify an irc server address and it is in your servers list, returns its associated info.

 

If you specify the group parameter, returns only servers in that group. If N = 0, returns total servers in group.

 

Note: If N=-1 is used, it returns values for the active status window.

 

$serverip

Returns server IP address.

 

$servertarget

Returns the address specified in the /server command whether you are connected to the server or not.

 

$sha1(text|&binvar|filename,[N])

Returns sha1 hash value for the specified data, where N = 0 for plain text (default), 1 for &binvar, 2 for filename.

 

Note: You can also use $sha256(), $sha384(), and $sha512() to generate the corresponding hashes using the above  format.

 

$show

Returns $false if a command is prefixed with a . to make it quiet, otherwise returns $true.

 

$sreq

Returns current /sreq settings in the DCC Options send section dialog.

 

$ssl

Returns $true if the current server connection is using SSL.

 

$sslhash(method, type)

Returns the client or server certificate fingerprint, where method can be md5, sha1, sha256, sha512, ecdsa, and type can be p for the client certificate and s for the server certificate.

 

Properties: babble, colons

 

$sslcertvalid

Returns $true if the SSL certificate is valid for the current SSL connection.

 

$sslready

Returns $true if mIRC is ready to make secure connections using SSL.

 

$sslversion, $ssldll, $ssllibdll

Return information regarding the version and file locations of the SSL library being used.

 

$starting

Returns 0, or 1 if mIRC is in the process of starting up.

 

$status

Returns server connection status.

 

Note: This returns closing during the on DISCONNECT event if the status window being closed is the cause of the disconnection.

 

$titlebar

Returns the text in the mIRC titlebar, set by the /titlebar command.

 

$totp(key, time, hash, digits, timestep)

Returns a TOTP (Time-based One-time Password) based on the specified parameters.

 

The key is required and can be in a hex format of 40/64/128/256 chars, base32 format of 16/26/32 chars, or plain text. It can also be in a Google Authenticator format ie. lowercase with spaces.

 

The time is a unix timestamp, such as that returned by $ctime.

 

The hash can be md5, sha1, sha256, sha384, sha512.

 

The digits can range from 3 to 10.

 

The timestep can range from 1 second to 48 hours.

 

The time, hash, digits, and timestep are optional and default to $ctime, sha1, 6, and 30.

 

$unsafe(text)

This identifier is designed to be used with, for example, external user input in commands that may evaluate text later on, such as /timer commands. It delays evaluation of text for one level of evaluation.

 

$url

Returns the currently active URL in your web browser.

 

$url(N)

Returns the Nth address in your URL list.

 

Properties: desc, group

 

$url(0)                returns the total number of items in the URL list

$url(2)                returns the address of the 2nd item in the list

$url(2).desc        returns the description of the 2nd item in the list

$url(3).group        returns the group of the 3rd item in the list

 

$urlget(url,hgpuadfbrtikce,target,alias,headers,body)

Downloads content from specified http/https address. Returns id number. Calls alias with id number as parameter when transfer completes.

 

url = http/https://user:pass@address:port/file?parameters

 

options =

 hgpuad = head, get, post, put, patch, or delete

 fb = file or &binvar

 r = resume

 t = use .part file

 i = ignore SSL errors

 k = prevent redirects

 c = cancel

 e = save errors, such as 404 replies, to file or &binvar

 

target = file or &binvar

alias = called on completion

headers = &binvar

body = &binvar

 

If the call fails, for any reason, it returns an id of zero.

 

$urlget(N/id) can be used with properties: url, redirect, method, type, target, alias, id, state, size, resume, rcvd, time, reply

 

$usermode

Returns your current usermode on the irc server.

 

$version

Returns the version of mIRC that is being used.