On *:TEXT:!help*:#:{ haltdef if ($2 == $!me) notice $nick $!me identifies your current nick. It becomes very useful in scripting of all kinds. } if ($2 == $!1) notice $nick $!1 $!2 $!3 $!4- Identify parameters in text etc. These are both the simplest and most confusing of all identifiers since they can refer to a vast range of values. In text strings $!1 is the first word, $!2 is the second, and so on. Adding the dash '-' to the end means 'onwards'. So $!1- equals all words from the first. $!2- means from the second word onwards. } if ($2 == $!?) notice $nick $!? is a very useful and powerful identifier. $!? causes mIRC to prompt the user for a value to enter. You can also put your own text on the prompt. $!?="Enter your name" will cause mIRC to open a dialog box that has the text 'Enter your name', a text field for you to enter your data into, and 'OK' and 'Cancel' buttons. } if ($2 == $!$) notice $nick The double $!$ means that this command will only be executed if a parameter is specified. If you specify only one parameter in the above command it will not be executed. You can also do $!$?1 or $!?1 which means try to fill this value with parameter one if it exists. If parameter one doesn't exist, ask for it. } if ($2 == $!&) notice $nick This identifier allows you to break up a single line into multiple lines which are combined when the script is performed, so you can edit long commands more easily. } if ($2 == $!()) notice $nick This identifier can only be used in the text match section of an event definition. It allows you to create a match parameter dynamically. You can use $!1- to reference the incoming line. } if ($2 == $!away) notice $nick 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. } if ($2 == $!cb) notice $nick This identifier returns the clipboard contents. } if ($2 == $!0) notice $nick Returns the number of space-delimited tokens in the $1- line. } if ($2 == $!abook) notice $nick This returns information about a nick in the address book. Allowed formats: $!abook(nick) $!abook(N) $!abook(nick,N) where nick can also be a wildcard. } if ($2 == $!abs) notice $nick $!abs(N) Returns the absolute value of number N, so $!abs(5) returns 5, $!abs(-1) returns 1 } if ($2 == $!and) notice $nick $!and(A,B) Returns A binary and B. } if ($2 == $!active) notice $nick Returns the full name of the currently active window. } if ($2 == $!activecid) notice $nick Returns the server connection id for the current script. } if ($2 == $!activewid) notice $nick Returns window id for the currently active window. } if ($2 == $!address()) notice $nick Searches the Internal Address List for the address associated with the specified nickname. } if ($2 == $!addtok()) notice $nick Adds a token to the end of text but only if it's not already in text. } if ($2 == $!agent) notice $nick $!agent(N).char Returns the filename of the Nth available agent installed on your system. If you specify 0, returns total number of installed agents. } if ($2 == $!agentname) notice $nick Returns the name of the agent in an on AGENT event. } if ($2 == $!agentstat) notice $nick Returns 1 if Agent is ready, or 0 if busy/speaking. } if ($2 == $!agentver) notice $nick Returns the version of the Agent installed on your system, 0 if not installed. } if ($2 == $!alias) notice $nick $!alias(N/filename) Returns the filename for the Nth loaded alias file. If you specify a filename, it returns $null if the file isn't loaded. $!alias(0) return the number of alias files loaded. $!alias(moo.txt) returns $null if the file isn't loaded, or moo.txt if it is. } if ($2 == $!anick) notice $nick Returns your alternate nickname. } if ($2 == $!ansi2mirc) notice $nick $!ansi2mirc(text) Returns text with the ANSI codes converted into mIRC color codes. } if ($2 == $!aop) notice $nick The $!aop identifier returns $!true if auto-op is enabled, and $!false if it isn't. } if ($2 == $!appactive) notice $nick Returns $!true if mIRC is the active application, otherwise it returns $false. } if ($2 == $!appstate) notice $nick Returns the display state of the mIRC window: minimized, maximized, normal, hidden, or tray. } if ($2 == $!asc) notice $nick $!asc(C) Returns the ascii number of the character C. $!asc(A) returns 65. $!asc(*) returns 42. } if ($2 == $!asctime) notice $nick $!asctime(N,format) Returns the time and date in text format associated with the $!ctime time value. } if ($2 == $!sin) notice $nick $!sin(N) Returns the sine of N } if ($2 == $!asin) notice $nick $!asin(N) Returns the arcsine of N } if ($2 == $!tan) notice $nick $!tan(N) Returns the tangent N. } if ($2 == $!atan) notice $nick $!atan(N) Returns the arctangent of N } if ($2 == $!avoice) notice $nick The $!avoice identifier returns $!true if auto-voice is enabled, and $!false if it isn't. } if ($2 == $!banmask) notice $nick $!banmask refers to the banmask used to ban the user. } if ($2 == $!base) notice $nick $!base(N,inbase,outbase,zeropad,precision) Converts number N from inbase to outbase. The last two parameters are optional. $!base(15,10,16) Returns F, $!base(1.5,10,16) Returns 1.8, $!base(2,10,16,3) Returns 002. } if ($2 == $!bfind) notice $nick $!bfind(&binvar, N, M) Searches a &binvar for a matching value, starting from position N. M can be a character value, ie. 0 to 255, or text. The search is case-insensitive. } if ($2 == $!bitoff) notice $nick $!bitoff(A,N) Returns the A value with the Nth bit turned off. if ($2 == $!biton) notice $nick $!biton(A,N) Returns the A value with the Nth bit turned on. if ($2 == $!bnick) notice $nick $!bnick refers to the banned users nickname, however this would actually only be filled if the banmask itself includes a nickname. If the banmask does not include a nickname, $!bnick is $null. if ($2 == $!bvar) notice $nick $!bvar(&binvar,N,M) Returns M ascii values starting from the Nth byte if ($2 == $!bytes) notice $nick $!bytes(N,bkmgt3d) Returns comma formatted file-size. } if ($2 == $!calc) notice $nick $!calc(operations) Returns the result of the specified operations. This identifiers allows you to perform multiple operations easily. For example: $!calc(3.14159 * (2 ^ %x % 3) - ($ticks / (10000 + 1))) } if ($2 == $!cd) notice $nick The $!cd identifier is sometimes used to reference the current directory a fileserve is in. } if ($2 == $!ceil) notice $nick $!ceil(N) Returns N rounded to the next highest integer. } if ($2 == $!chan) notice $nick $!chan Returns the name of the channel for a specific event. For all non-channel events $chan will be $null. } if ($2 == $!chanmodes) notice $nick mIRC supports numeric 005 token CHANMODES, and can handle a dynamic set of channel modes. $!chanmodes returns the list of supported channel modes, eg. '+k moo' to set the channel key to 'moo'. When not connected to a server, mIRC uses a default $chanmodes value of CHANMODES=bIe,k,l. } if ($2 == $!chantypes) notice $nick 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, eg. #mIRC, &mIRC. When not connected to a server, mIRC uses a default $chantypes value of CHANTYPES=#&. } if ($2 == $!chat) notice $nick $!chat(N/nick[,N]) Returns the name of the Nth open dcc chat window. } if ($2 == $!chr) notice $nick $!chr(N) Returns the character with ascii number N. $!chr(65) returns A. $!chr(42) returns *. } if ($2 == $!cid) notice $nick $!cid Returns the server connection id for the current script. Some window identifiers have their own connection id counterpart, such as $!activecid and $!lactivecid. Most window related identifiers also have a .cid property. } if ($2 == $!clevel) notice $nick $!clevel Returns the matching event level for a triggered event. } if ($2 == $!click) notice $nick $!click(@,N) This stores a history of x,y clicks for a window. } if ($2 == $!cmdbox) notice $nick Returns $!true if a command or script was initiated via the command editbox in a channel window. } if ($2 == $!cmdline) notice $nick Returns the command line that was passed to mIRC when it was first run. } if ($2 == $!cnick) notice $nick $!cnick(N/nick, M) Returns Nth nick in nick color list, or if nick is specified returns Nth position of item in list that matches nick. If nick doesn't match any items, returns zero. } if ($2 == $!color) notice $nick $!color(name/N) Returns the Nth color index of the specified color name eg. $!color(action text). If you don't 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. } if ($2 == $!com) notice $nick $!com(name,member,method,type1,value1,...,typeN,valueN) This calls a member of an open COM connection with the specified method and parameters. } if ($2 == $!comcall(name,alias,..)) notice $nick $!comcall() uses the same format as $!com() apart from the alias. It is multi-threaded so it will not halt the script and will call the specified alias once the call returns. } if ($2 == $!comchan) notice $nick Returns the names of channels which both you and nick are on. } if ($2 == $!comerr) notice $nick This should be checked after a call to any COM command or identifier. Returns 1 if there was an error, 0 otherwise. } if ($2 == $!compress) notice $nick $!compress(file|&bvar, blN) Compresses the specified file or binary variable. The result is raw compressed data. } if ($2 == $!decompress) notice $nick $!decompress(file|&bvar) DeCompresses the specified file or binary variable. } if ($2 == $!comval) notice $nick Returns member value for the Nth instantiation of the enumerated collection in name. } if ($2 == $!cos) notice $nick $!cos(N) Returns the cosine of N. } if ($2 == $!acos) notice $nick $!acos(N) Returns the arccosine of N. } if ($2 == $!count) notice $nick $!count(string,substring,substring2,...,substringN) Returns the number of times substring occurs in string. } if ($2 == $!cr) notice $nick $!cr Returns the carriage return character, the same as $chr(13). } if ($2 == $!crc) notice $nick $!crc(text|&binvar|filename,[N]) Returns the CRC checksum of the specified item, where N = 0 for plain text, 1 for &binvar, 2 for filename (default). } if ($2 == $!creq) notice $nick Returns current /creq settings in the DCC Options chat section dialog. } if ($2 == $!crlf) notice $nick Returns a carriagereturn/linefeed combination. } if ($2 == $!ctime) notice $nick Returns total number of seconds elapsed since 00:00:00 GMT, January 1, 1970 based on your system time. } if ($2 == $!ctimer) notice $nick Returns name of /timer that triggered the current script. } if ($2 == $!ctrlenter) notice $nick This identifier is used to test whether Control+Enter was pressed when the user entered the text. } if ($2 == $!date) notice $nick Returns the current date in day/month/year format. For US Format use $!adate. } if ($2 == $!day) notice $nick Returns the name of the current day ie. Monday, Tuesday, etc. } if ($2 == $!daylight) notice $nick Returns seconds offset if daylight savings is in effect, and 0 if not. } if ($2 == $!dbuw) notice $nick The identifiers $!dbuw and $!dbuh return the dbu per pixel width and height values for the current display. This may or may not be an integer value. } if ($2 == $!dbuh) notice $nick The identifiers $!dbuw and $!dbuh return the dbu per pixel width and height values for the current display. This may or may not be an integer value. } if ($2 == $!dccignore) notice $nick Returns $!true if ignore types is turned on in the DCC Folders dialog, otherwise returns $!false. } if ($2 == $!dccport) notice $nick Returns the port being used by the DCC Server. } if ($2 == $!dde) notice $nick $!dde(name, topic, item, delay) Returns the value returned by the specified service name, topic, and item, by sending an XTYP_REQUEST. } if ($2 == $!ddename) notice $nick Returns the current dde service name in use by the mIRC DDE Server. } if ($2 == $!debug) notice $nick The $!debug identifier returns the name of debug file or @window. } if ($2 == $!decode) notice $nick $!decode(%var | &binvar, mubt, N) Decode text in %vars or &binvars using Uuencode or Mime. } if ($2 == $!deltok) notice $nick $!deltok(text,N-N2,C Deletes the Nth token from text. } if ($2 == $!dialog) notice $nick Dialogs created with $!dialog() are modal, ie. they halt the script until the dialog is closed, they return a value, and they don't allow access to other windows while the dialog is open. These types of dialogs should only be displayed for immediate user input. } if ($2 == $!did) notice $nick You can get the settings and values of controls in a dialog by using the $!did() dialog id identifier with the following formats and properties as appropriate to the control to which you are referring. } if ($2 == $!didreg) notice $nick $!didreg(name,id,regex,N) Returns the number of the line that matches the regular expression, with the search starting at line N. N is optional. } if ($2 == $!didtok) notice $nick $!didtok(name,id,C) Returns a tokenized list of the items in a list/combo/edit box. } if ($2 == $!disk) notice $nick $!disk(path|N) Returns information about the specified hard disk, where N = 0 for total available drives, and N > 0 to access each drive. } if ($2 == $!dlevel) notice $nick Returns the current default user level. } if ($2 == $!dll) notice $nick $!dll(name.dll,procname,data) Returns the value resulting from a call to a DLL designed to work with mIRC. } if ($2 == $!dns) notice $nick $!dns(N) This identifier can be used only in the on DNS event, and returns the address that was resolved and any associated IP addresses. } if ($2 == $!duration) notice $nick $!duration(seconds,N) Returns the specified number of seconds in a week/day/hour/minute/second format. The Nth paramater is optional. } if ($2 == $!ebeeps) notice $nick Returns $!true if sounds are enabled in the Sounds dialog. } if ($2 == $!editbox) notice $nick 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's open. } if ($2 == $!emailaddr) notice $nick Returns the email address specified in the Connect dialog. } if ($2 == $!error) notice $nick Returns the error message. } if ($2 == $!eval) notice $nick $!eval(text,N) Evaluates the contents of text N times. If N isn't specified, the default is N = 1. If N is zero, text is not evaluated. } if ($2 == $!event) notice $nick Returns the name of the event that was triggered. } if ($2 == $!exists) notice $nick $exists(file/dir) Returns $true if a file or dir exists and $false if it doesn't. } if ($2 == $!feof) notice $nick $!feof and $!ferr Return the results of the last file access attempt in any script, where $!feof indicates the end of file was reached, and $!ferr indicates there was a file error of some kind. } if ($2 == $!fgetc) notice $nick $!fgetc(name | N) Returns the next character. } if ($2 == $!file) notice $nick $!file(filename) Returns information about the specified file. } if ($2 == $!filename) notice $nick This triggers when a dcc send succeeds in sending a .txt or .ini file to a user. $!filename refers to the filename that was transmitted. } if ($2 == $!filtered) notice $nick Returns the number of lines that were filtered when using the /filter command. } if ($2 == $!finddir) notice $nick $!finddir(dir,wildcard,N,depth,@window | command) Searches the specified directory and its subdirectories for the Nth directory name matching the wildcard specification and returns the full path and directory if it is found. } if ($2 == $!finddirn) notice $nick The $!finddirn identifier returns the Nth position of directory that was found. } if ($2 == $!findfile) notice $nick $!findfile(dir,wildcard,N,depth,@window | command) Searches the specified directory and its subdirectories for the Nth filename matching the wildcard file specification and returns the full path and filename if it is found. } if ($2 == $!findfilen) notice $nick The $!findfilen identifier returns the Nth position of file that was found. } if ($2 == $!fline) notice $nick $!fline(@name,wildtext,N,T) Returns Nth position of line which matches the specified wildcard text. If T is 1, it references the listbox, 2 implies that wildtext is a regular expression, and 3 for both. } if ($2 == $!floor) notice $nick $!floor(N) Returns N rounded to the next lowest integer. } if ($2 == $!fopen) notice $nick $!fopen(name | N) Returns information about an open file. } if ($2 == $!fread) notice $nick $!fread(name | N) Returns the next $!crlf delimited line. } if ($2 == $!fserve) notice $nick $!fserve(N/nick,[N]) Returns the name of the Nth open fileserver window. } if ($2 == $!fulladdress) notice $nick Returns the full address of the user triggering an event in the form nick!user@host.} if ($2 == $!fulldate) notice $nick Returns the current date in the format: Wed Jun 26 21:41:02 1996. } if ($2 == $!fullname) notice $nick Returns the full name specified in the Connect dialog. } if ($2 == $!fullscreen) notice $nick Returns 1 if an application is currently running in full screen mode, 0 if not. This applies to both game and non-game applications. } if ($2 == $!get) notice $nick $!get(N/nick,[N]) Returns the nickname and filename of the Nth open dcc get window. } if ($2 == $!getdir) notice $nick Returns the DCC Get directory specified in the DCC Options dialog. } if ($2 == $!getdot) notice $nick $!getdot(@,x,y) Returns the RGB color value of the dot at the specified position. } if ($2 == $!gmt) notice $nick Returns the current GMT time value in $!ctime format. } if ($2 == $!group) notice $nick $!group(N/#) Returns the name or status of a #group in a script. } if ($2 == $!halted) notice $nick You can check if a script has already halted the default text by using the $halted identifier; it returns $!true if a user has used /halt or /haltdef in a ^ event, and $!false if not. } if ($2 == $!hash) notice $nick $!hash(text,B) Returns a hash number based on text where B is the number of bits to use when calculating the hash number. } if ($2 == $!height) notice $nick $!height(text,font,size) Returns height of text in pixels for the specified font. } if ($2 == $!hfind) notice $nick $!hfind(name/N, text, N, M) Searches table for the Nth item name which matches text. Returns item name. } if ($2 == $!hget) notice $nick $!hget(name/N) Returns name of a hash table if it exists, or returns the name of the Nth hash table. } if ($2 == $!highlight) notice $nick $!highlight Returns $!true if highlighting is turned on in the Highlight dialog, otherwise returns $!false. } if ($2 == $!hnick) notice $nick $!hnick refers to a person being given halfop, or having halfop taken from them. } if ($2 == $!host) notice $nick Returns your Local host name. } if ($2 == $!hotline) notice $nick The $!hotline identifier returns the full line which contained the hotlink trigger. } if ($2 == $!hotlinepos) notice $nick The $!hotlinepos identifier returns the line number and word position of the trigger. } if ($2 == $!ial) notice $nick $!ial(nick/mask,N) Returns the Nth address matching nick or mask in the Internal Address List. } if ($2 == $!ialchan) notice $nick $!ialchan(nick/mask,#,N) Returns the Nth address on the specified channel matching nick or mask in the Internal Address List. This works the same way as the $!ial() identifier. } if ($2 == $!$ibl) notice $nick $!ibl(#channel,N) Returns Nth item in the internal ban list, or if N is 0 returns total number of items in that list. } if ($2 == $!idle) notice $nick Returns your current idle time (same time as that returned by a ctcp finger). } if ($2 == $!iel) notice $nick $!iel(nick/mask,N) Returns the Nth address matching nick or mask in the Internal Exception List. } if ($2 == $!ifmatch) notice $nick Returns the first parameter of matching if-then-else comparison. } if ($2 == $!ignore) notice $nick $!ignore(N/address) Returns the Nth address in the ignore list. } if ($2 == $!iif) notice $nick $!iif(C,T,F) Returns T or F depending on whether the evaluation of the Conditional C is true or false. } if ($2 == $!iil) notice $nick $!iil(nick/mask,N) Returns the Nth address matching nick or mask in the Internal Invite List. } if ($2 == $!inellipse) notice $nick $!inellipse(x,y,x,y,w,h) Returns $!true if the point x y is inside the specified ellipse, and $!false if it isn't. } if ($2 == $!ini) notice $nick $!ini(file,topic/N,item/N) Returns the name/Nth position of the specified topic/item in an ini/text file. } if ($2 == $!inmidi) notice $nick $!inmidi Return $!true if the specified sound type is playing, $!false otherwise. } if ($2 == $!inpaste) notice $nick 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. } if ($2 == $!inpoly) notice $nick $!inpoly(x,y,a1,a2,b1,b2,...) Returns $!true if the point x y is inside the polygon defined by the specified points, and $!false if it isn't. } if ($2 == $!input) notice $nick $!input(prompt,options,window,title,text) Prompts the user for input and returns the result. } if ($2 == $!inrect) notice $nick $!inrect(x,y,x,y,w,h) Returns $!true if the point x y is inside the specified rectangle, and $!false if it isn't. } if ($2 == $!inroundrect) notice $nick $!inroundrect(x,y,x,y,w,h,w,h) Returns $!true if the point x y is inside the specified rounded rectangle, and $!false if it isn't. } if ($2 == $!insong) notice $nick $!insong Returns $!true if the specified sound type is playing, $!false otherwise. } if ($2 == $!instok) notice $nick $!instok(text,token,N,C) Inserts token into the Nth position in text, even if it already exists in text. } if ($2 == $!int) notice $nick $!int(N) Returns the integer part of a floating point number with no rounding. } if ($2 == $!inwave) notice $nick Return $!true if the specified sound type is playing, $!false otherwise. } if ($2 == $!ip) notice $nick Returns your IP address. } if ($2 == $!isalias) notice $nick $!isalias(name) Returns $!true if the specified name is an alias command that exists in your aliases or scripts. } if ($2 == $!isbit) notice $nick $!isbit(A,N) Returns 1 if the Nth bit in number A is turned on. } if ($2 == $!isdde) notice $nick $!isdde(name) Returns $!true if the specified dde name is in use, $!false otherwise. } if ($2 == $!isdir) notice $nick $!isdir(dirname) Returns $!true if the specified directory exists, otherwise $!false. } if ($2 == $!isfile) notice $nick $!isfile(filename) Returns $!true if the specified file exists, otherwise $!false. } if ($2 == $!isid) notice $nick Returns $!true if an alias was called as an identifier, otherwise $!false. } if ($2 == $!islower) notice $nick $!islower(text) Returns $!true if text is all lower case. } if ($2 == $!isupper) notice $nick $!isupper(text) Returns $!true if text is all upper case. } if ($2 == $!keychar) notice $nick Returns the actual letter of the key being pressed. } if ($2 == $!keyrpt) notice $nick Returns $!true if the key is repeating due to a user holding down the key.} if ($2 == $!keyval) notice $nick Returns the key code of the key being pressed. } if ($2 == $!knick) notice $nick This triggers when a user who has access level 5 is kicked out of any channel. $!knick refers to the nickname of the user who was kicked. } if ($2 == $!lactive) notice $nick Returns full window name of the last active window. } if ($2 == $!lactivewid) notice $nick Returns window id for the last active window. } if ($2 == $!left) notice $nick $!left(text,N) Returns the N left characters of text, $!left(goodbye,4) returns good, If N is a negative value, it returns all but N characters. } if ($2 == $!len) notice $nick $!len(text) Returns the length of text. } if ($2 == $!level) notice $nick $!level(address) Finds a matching address in the remote users list and returns its corresponding levels list. } if ($2 == $!if) notice $nick Returns the linefeed character, the same as $!chr(10). } if ($2 == $!line) notice $nick $!line(@name,N,T) Returns the Nth line of text in the specified window. If N is zero, it returns the total number of lines in the window. } if ($2 == $!lines) notice $nick $!lines(filename) Returns the total number of lines in the specified text file. } if ($2 == $!link) notice $nick $!link(N) Returns the Nth item listed in the server Links window. } if ($2 == $!lock) notice $nick $!lock(item/#/N) Returns $!true or $!false for the lock settings on items in the Lock dialog. } if ($2 == $!locked) notice $nick Returns $true if mIRC is currently locked. } if ($2 == $!Log) notice $nick Log(N) Returns the natural logarithm of N. } if ($2 == $!logdir) notice $nick Returns the Logs directory as specified in the Logging section of the Options dialog. } if ($2 == $!Logstamp) notice $nick Returns the current time based on the logging timestamp format as defined in the logging dialog. } if ($2 == $!Logstampfmt) notice $nick Returns the logging timestamp format as defined in the logging dialog. } if ($2 == $!longfn) notice $nick $!longfn(filename) Returns long version of a short filename. } if ($2 == $!longip) notice $nick $!longip(address) Converts an IP address into a long value and vice-versa. } if ($2 == $!lower) notice $nick $!lower(text) Returns text in lowercase. } if ($2 == $!ltimer) notice $nick Returns the number of the last timer that was started by the /timer command. } if ($2 == $!maddress) notice $nick Returns the address that was matched for the triggered event. } if ($2 == $!mask) notice $nick $!mask(address,type) Returns address with a mask specified by type. } if ($2 == $!matchkey) notice $nick Returns wildcard matchtext that was used in the matching remote event. } if ($2 == $!matchtok) notice $nick $!matchtok(tokens,string,N,C) Returns tokens that contain the specified string. } if ($2 == $!md5) notice $nick $!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. } if ($2 == $!menu) notice $nick You can use the $!menu, $!menutype, and $!menucontext identifiers to refer to the menu that is about to pop up or that is associated with the script being performed. } if ($2 == $!mid) notice $nick $!mid(text,S,N) Returns N characters starting at position S in text. $!mid(othello,3,4) Returns hell, If N is zero, it returns the number of characters from S to the end of the line. You may also use negative numbers for S or N. } if ($2 == $!mididir) notice $nick Returns the Midi directory specified in the Sound Requests section of the Options dialog.} if ($2 == $!mircdir) notice $nick Returns the directory where mIRC stores its settings, such as mirc.ini, and other files and folders. } if ($2 == $!mircexe) notice $nick Returns the full path and filename of the mIRC executable file. } if ($2 == $!mircini) notice $nick Returns the name of the main .ini file, usually mirc.ini. } if ($2 == $!mklogfn) notice $nick Mklogfn(filename) Returns the filename format that the logging feature uses. Appends date to filename if you have the dated logfiles option turned on in the logging dialog. } if ($2 == $!mnick) notice $nick Returns your main nickname. } if ($2 == $!mode) notice $nick $!mode(N) Returns the Nth nick affected by a channel mode change. } if ($2 == $!modefirst) notice $nick The $!modefirst and $!modelast identifiers return $!true or $!false depending on whether the event is the first or last to trigger. } if ($2 == $!modelast) notice $nick The $!modefirst and $!modelast identifiers return $!true or $!false depending on whether the event is the first or last to trigger. } if ($2 == $!modespl) notice $nick $!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. } if ($2 == $!mouse) notice $nick Returns the x, y position of the current mouse event, and whether the left mouse button, shift key, and/or control key are pressed. } if ($2 == $!msfile) notice $nick $!msfile(dir,title,oktext) Displays the multiple select file dialog and returns N, the number of selected files. $!msfile(N) returns each file. If too many files are selected, $!msfile() returns -1. Title and oktext are optional. } if ($2 == $!network) notice $nick Returns the name of the IRC network you are currently connected to. } if ($2 == $!nick) notice $nick This refers to the IRC nick of a user, for example //say $nick would return the users nick! } if ($2 == $!nofile) notice $nick $!nofile(filename) Returns the path in filename without the actual filename. } if ($2 == $!nopath) notice $nick $!nopatch(filename) Returns filename without a path if it has one. } if ($2 == $!noqt) notice $nick $!noqt(text) Add/remove outer enclosing quotes around text. } if ($2 == $!not) notice $nick $!not(A) $!not(A) Returns the binary not value of A. } if ($2 == $!notags) notice $nick $!notags(text) Removes the above tags from text. Only tags that are valid and correctly written as above are removed. } if ($2 == $!notify) notice $nick $!notify(N/nick) Returns the Nth nickname in your Notify list. } if ($2 == $!null) notice $nick If a variable is referred to and it doesn't exist, it returns the value $!null. The $!null value can be used in comparisons in if-then-else statements to control branching etc. } if ($2 == $!numeric) notice $nick Returns the numeric for the matching numeric event. } if ($2 == $!numtok) notice $nick $!numtok(text,C) Returns number of tokens in text. } if ($2 == $!online) notice $nick Returns the number of seconds elapsed in the Timer dialog. } if ($2 == $!onpoly) notice $nick $!onpoly(n1,n2,x,y,x,y,...) Returns $!true if two polygons overlap. n1 is the number of points in the first polygon, n2 in the second polygon. } if ($2 == $!opnick) notice $nick This referrs to the nick of a person being Op'd or having Op status taken away from them. } if ($2 == $!or) notice $nick $!or(A,B) Returns A binary or B. } if ($2 == $!ord) notice $nick $!ord(N) Appends st, nd, rd, th as appropriate to the number N. } if ($2 == $!os) notice $nick Returns the version number of the operating system. The reply can be 95, 98, NT, ME, 2K, XP, 2003, or Vista. } if ($2 == $!passivedcc) notice $nick Returns $!true if passive dcc is enabled in the DCC Options dialog. } if ($2 == $!pic) notice $nick $!pic(filename) Returns the size, width, and height of a bmp, jpg, or png file. } if ($2 == $!play) notice $nick The $!play identifier returns information about items in the play queue. } if ($2 == $!pnick) notice $nick You can use the $!pnick identifier in commands which identifies the nick/channel to which you are currently playing. } if ($2 == $!port) notice $nick Returns the port number of the server to which you're currently connected. } if ($2 == $!portable) notice $nick Returns $!true or $!false depending on whether mIRC was run as portable. } if ($2 == $!portfree) notice $nick $!portfree(N) Returns $!true if the specified port number is not in use, otherwise returns $!false. } if ($2 == $!pos) notice $nick $!pos(text,string,N) Returns a number indicating the position of the Nth occurrence of string in text. } if ($2 == $!prefix) notice $nick $!prefix returns the list of channel nickname prefixes ie. op, halfop, voice, etc. that are supported on a server. } if ($2 == $!prop) notice $nick You can also use the $!prop identifier to refer to your own custom properties } if ($2 == $!protect) notice $nick The $!protect identifier returns $!true if protect is enabled, and $!false if it isn't. } if ($2 == $!puttok) notice $nick $!puttok(text,token,N,C) Overwrites the Nth token in text with a new token. } if ($2 == $!qt) notice $nick Add/remove outer enclosing quotes around text. } if ($2 == $!query) notice $nick $!query(N/nick) Returns the nickname of the Nth open query window. } if ($2 == $!rand) notice $nick $!rand(V1,V2) This works in two ways. If you supply it with numbers for v1 and v2, it returns a random number between v1 and v2. If you supply it with letters, it returns a random letter between letters v1 and v2. } if ($2 == $!rawmsg) notice $nick Returns raw server line for server events. } if ($2 == $!read) notice $nick $!read(filename, [ntswrp], [matchtext], [N]) Returns a single line of text from a file. } if ($2 == $readini) notice $nick $readini(filename, [np], section, item) Returns a single line of text from a .ini file. } if ($2 == $!readn) notice $nick Returns the line number that was matched in a previous call to $!read(). If no match was found, $!readn is set to zero. } if ($2 == $!regex) notice $nick $!regex([name], text, re) Returns N, the number of strings in text that matched the regular expression. You can assign a name to a $!regex() call which you can use later in $!regml() to reference a match list. If you don't specify a name, all identifiers use a default name which is overwritten with each call to $!regex(). $!regex() remembers the results for the last fifty $!regex() calls. Each time you do a match with $!regex(), and you specify a name, that name's previous results are overwritten with the new results. } if ($2 == $!regml) notice $nick $!regml([name], N) This can be used to reference the back referenced (items enclosed in parentheses) values returned by a call to $!regex() or $!regsub(). } if ($2 == $!regsub) notice $nick $!regsub([name], text, re, subtext, %var) Performs a regular expression match, like $!regex(), and then performs a substitution using subtext. Returns N, the number of substitutions made, and assigns the result to %var. } if ($2 == $!regsubex) notice $nick $!regsubex([name], text, re, subtext) Performs a regular expression match, like $!regex(), and then performs a substitution using subtext. Subtext is evaluated during substitution and can be an identifier. Subtext can also contain special markers where \0 = number of matches, \n = match number, \t = match text, \a = all match items, and \A which is a non-spaced version of \a. Returns text result. } if ($2 == $!remove) notice $nick $!remove(string,substring,...) Removes any occurrence of substring in string. } if ($2 == $!remtok) notice $nick $!remtok(text,token,N,C) Removes the Nth matching token from text. } if ($2 == $replace) notice $nick $!replace(string,substring,newstring,...) Replaces any occurrence of substring in string with newstring. } if ($2 == $!replacex) notice $nick $!replacex(string,substring,newstring,...) Replaces any occurrence of substring in string with newstring except for replacements that have already been made. } if ($2 == $!reptok) notice $nick $!reptok(text,token,new,N,C) Replaces the Nth matching token in text with a new token. } if ($2 == $!result) notice $nick $!result Stores the number value returned to a calling routine by the /return command. } if ($2 == $!rgb) notice $nick $!rgb(N,N,N) Returns an RGB color value for use in /draw commands. If you use only one parameter, it assumes it is an actual RGB color value and returns N,N,N. } if ($2 == $!right) notice $nick $!right(text,N) Returns the N right characters of text. $!right(othello,5) returns hello If N is a negative value, it returns all but N characters. } if ($2 == $!round) notice $nick $!round(N,D) Returns the specified floating point number rounded to the Dth decimal digit. $!round(3.14159,2) returns 3.14, The D parameter is optional. } if ($2 == $!scid) notice $nick $!scid(N)[.id] Returns the connection id, where N is a $!cid value. } if ($2 == $!scon) notice $nick $!scon(N)[.id] Returns the connection id, where N is the Nth connection. } if ($2 == $!script) notice $nick Returns the filename of the currently executing remote script. } if ($2 == $!scriptdir) notice $nick $!Returns the directory of the currently executing remote script. } if ($2 == $!scriptline) notice $nick Returns line number in current script. } if ($2 == $!sdir) notice $nick $!sdir(dir,title) Displays the select folder dialog and returns the selected folder. Title is optional. The dir can include a wildcard as a dir mask. } if ($2 == $!send) notice $nick $!send(N/nick[,N]) Returns the nickname and filename of the Nth open dcc send window. } if ($2 == $!server) notice $nick Returns the name of the server to which you are currently connected. } if ($2 == $!serverip) notice $nick Returns server IP address. } if ($2 == $!sfile) notice $nick $!sfile(dir,title,oktext) Displays the select file dialog and returns the selected filename. Title and oktext are optional. The dir can include a wildcard as a file mask. } if ($2 == $!sha1) notice $nick $!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. } if ($2 == $!shortfn) notice $nick $!shortfn(filename) Returns short version of a long filename. } if ($2 == $!show) notice $nick Returns $!false if a command is prefixed with a . to make it quiet, otherwise returns $!true.} if ($2 == $!signal) notice $nick The $!signal identifier returns the signal name that caused the signal event to trigger. } if ($2 == $!sin) notice $nick $!sine(N) This returns the Sine of N } if ($2 == $!asin) notice $nick $!asin(N) This returns the Asine of N } if ($2 == $!site) notice $nick Returns the portion of $address after the @ for the user associated with an event in the form user@host. } if ($2 == $!sline) notice $nick Returns the Nth selected line in a listbox (only works in listboxes). If N is zero, it returns the total number of selected lines in the window. } if ($2 == $!snicks) notice $nick Returns a string of the currently selected nicknames in the active channel listbox. } if ($2 == $!snick) notice $nick $!snick(#,N) Returns the Nth selected nickname in the channel listbox on channel #. } if ($2 == $!snotify) notice $nick Returns the currently selected nickname in the notify list box.} if ($2 == $!sock) notice $nick $!sock(name,N) This returns information about a socket connection that you created using the socket commands. } if ($2 == $!sockbr) notice $nick $!sockbr is set to the number of bytes read by a /sockread command. It is used to test whether any information was in fact read from the buffer (see below for more info). } if ($2 == $!sockerr) notice $nick $!sockerr is set to a value after each socket command/event and must be checked after each socket command and before processing an event to see if an error occurred.} if ($2 == $!sockname) notice $nick $!sockname is the name given to a connection to identify it. This identifier can be used in events to know which connection an event is related to. } if ($2 == $!sorttok) notice $nick $!sorttok(text,C,ncra) Sorts the tokens in text. $!sorttok(e.d.c.b.a,46) returns a.b.c.d.e, $!sorttok(1.3.5.2.4,46,nr) returns 5.4.3.2.1 The default is an alphabetic sort, however you can specify n = numeric sort, c = channel nick prefix sort, r = reverse sort, a = alphanumeric sort. } if ($2 == $!sound) notice $nick $!sound(type)/(filename) Returns the directory specified in the Sound Requests section of the Options dialog, where type can be wave, midi, mp3, wma, or ogg. / Returns either the directory for that file type, as above, or information about the sound file. Currently, only mp3 files are supported with the following properties. } if ($2 == $!sqrt) notice $nick $!sqrt(N) Returns the square root of N. } if ($2 == $!sreg) notice $nick Returns current /sreq settings in the DCC Options send section dialog. } if ($2 == $!ssl) notice $nick $!ssl can be used to determine whether the current server connection is secure or not. } if ($2 == $!sslready) notice $nick $!sslready can be used to determine whether mIRC has loaded the dlls successfully. } if ($2 == $!status) notice $nick Returns server connection status. } if ($2 == $!str) notice $nick $!str(text,N) Returns text repeated N times. } if ($2 == $!strip) notice $nick $!strip(text,burcmo) Returns text with all bold, underline, reverse, and color control codes stripped out. } if ($2 == $stripped) notice $nick Returns the number of control codes that were stripped from an incoming message, if any. This can be used in any script event that triggers when a message is received from a user. } if ($2 == $!style) notice $nick You can place a check mark or create a disabled menu item by using the $!style(N) identifier, where N = 1 for checked, N = 2 for disabled, and N = 3 for both. The $!style(N) identifier must be the first word in the menu definition. } if ($2 == $!submenu) notice $nick This identifier allows you to dynamically create a list of menu items, and can only be called from a popup menu definition. } if ($2 == $!target) notice $nick Returns the target of an event.} if ($2 == $!ticks) notice $nick Returns the number of ticks since your operating system was first started. } if ($2 == $!time) notice $nick Returns the current time in hour:minute:second format. } if ($2 == $!timer) notice $nick Returns the timer id of the Nth timer in the timers list. You can also specify a timer name instead of a number. This identifier works in conjunction with the /timer command. } if ($2 == $!timestamp) notice $nick Returns the current time based on the event timestamp format as defined in the message dialog. } if ($2 == $!timestampfmt) notice $nick Returns the event timestamp format as defined in the message dialog. } if ($2 == $!timezone) notice $nick This returns your current timezone setting in seconds. } if ($2 == $!tip) notice $nick The $!tip() identifer allows you to create scripted tips that are independent of normal tip events. $!tip(name,title,text,delay,iconfn,iconpos,alias,wid) Returns Nth position of tip if it was successfully created, zero if not. $!tip(name/N) Returns properties for the specified tip. } if ($2 == $!titlebar) notice $nick Returns the text in the mIRC titlebar, set by the /titlebar command. } if ($2 == $!toolbar) notice $nick $!toolbar(name/N) Returns properties for a toolbar button. If N = 0, returns number of buttons. } if ($2 == $!trust) notice $nick $!trust(N) Returns the Nth item in the dcc trust list, or if N is 0 returns total number of items in list. } if ($2 == $!ulevel) notice $nick Returns the user level that was matched for the currently triggered event. } if ($2 == $!ulist) notice $nick $!ulist(nick!userid@address,L,N) Returns the Nth address in the Users list that matches the specified address and level. } if ($2 == $!upper) notice $nick $!upper(text) Returns text in uppercase. } if ($2 == $!uptime) notice $nick $!uptime(mirc | server | system, N) Returns uptime in milliseconds for specified item. N is optional, N = 1 returns same format as $duration(), N = 2 returns same format as $duration() but without seconds, and N = 3 returns seconds instead of milliseconds. } if ($2 == $!url) notice $nick Returns the currently active URL in your Web Browser. } if ($2 == $!usermode) notice $nick Returns your current usermode on the irc server. } if ($2 == $!v1) notice $nick $!v1 & $!v2 Returns the first and second parameters of an if-then-else comparison. So, in the case of this comparison: if (text isin sometext) { ... } $!v1 will return "text" and $!v2 will return "sometext". } if ($2 == $!var) notice $nick $!var(%var,N) Returns the Nth matching variable name. } if ($2 == $!vcmd) notice $nick $!vcmd(N) Returns the Nth item in your commands list. } if ($2 == $!vcmdstat) notice $nick Returns 0 if not available, 1 if currently off, 2 if ignoring commands, 3 if listening for a command. } if ($2 == $!vcmdver) notice $nick Returns the version of your installed SR software, or $null if not installed. } if ($2 == $!version) notice $nick Returns the version of mIRC that is being used. } if ($2 == $!vnick) notice $nick This referrs to the nick of the person being voiced, or having voice taken away from them. } if ($2 == $!vol) notice $nick $!vol(wave | midi | song | master) Gets the current volume for the specified sound setting. } if ($2 == $!wid) notice $nick Returns window id for current script. } if ($2 == $!width) notice $nick $!width(text,font,size,B,C) Returns width of text in pixels for the specified font. If B is non-zero, the font is bold, if C is non-zero, control codes are processed. Both B and C are optional. } if ($2 == $!wildsite) notice $nick Returns the address of the user who triggered an event in the form *!*@host. } if ($2 == $!wildtok) notice $nick $wildtok(tokens,wildstring,N,C) Returns the Nth token that matches the wildcard string. $!wildtok(one two three, t*, 0, 32) returns 2, $!wildtok(one two three, t*e, 1, 32) returns three, If you specify zero for N, it returns the total number of matching tokens. } if ($2 == $!window) notice $nick Returns the name of the window in the leave menu event which was just left. } if ($2 == $!wrap) notice $nick $!wrap(text, font, size, width, [word,] N) Returns Nth line in text wrapped to the specified width in pixels. If the optional word parameter is 1, text is wrapped at whole words (which is the default). You can specify 0 for N to return the total number of wrapped lines. } if ($2 == $!xor) notice $nick $!xor(A,B) Returns A binary xor B. } }