MIRC script

The title of this article is incorrect because of technical limitations. The correct title is mIRC script.

mIRC script is the scripting language included with mIRC, an IRC client.


Primary uses

  • Bots that provide automated IRC channel management, trivia or other games, and other desired functions for chatters
  • Commands that save typing or otherwise simplify life on IRC (such as automatically identifying as the owner of a nickname)

Other uses

Script storage

Scripts are stored in files, usually with a .mrc or .ini file extension. Multiple script files can be loaded at one time.

Items that are scriptable

  • Aliases are subprograms. Aliases that return a value are known as custom identifiers. Aliases are called from the command line or other parts of a script.
  • Popups are scripted context menu items. Popups are called when they are selected by the user.
  • Remotes are event-handling scripts. Remotes are called when the event they handle occurs.

Data storage


  • Scripts can read from and write to files [$read | write]
  • Scripts also can copy and delete files. [write -c | copy -o]

Binary variables

  • Contain unlimited (8192 bytes prior to mIRC 6.1) raw data
  • Globally accessible via commands and identifiers
  • Automatically disappear when script returns control to mIRC (and not to another part of a script)
  • Prefixed with & (&VariableName)

Hash tables

  • Contain keys (which are identical to binary variables except with no prefix)
  • Globally accessible via commands and identifiers
  • Automatically disappear when exiting mIRC
  • Not prefixed

Global variables

  • Contain 945 bytes of space-delimited data (variable names use up that space: %a can store up to 944 bytes of data and %ace can store up to 942 bytes of data)
  • Cannot store NUL (ASCII 0) or consecutive spaces
  • Globally accessible
  • Do not automatically disappear (stored automatically in a mIRC initialization file)
  • Prefixed with % (%VariableName)

Local variables

  • Contain 945 bytes of space-delimited data (variable names use up that space: %a can store up to 944 bytes of data and %ace can store up to 942 bytes of data)
  • Cannot store NUL (ASCII 0) or consecutive spaces
  • Accessible only by the alias that created them
  • Only existing in the context of the alias that created them
  • Prefixed with % (%VariableName)

Code Example

These codes are in the aliases script format. On the remote script, the commands should be preceded by the word "alias".

Here is the Hello World code example:

hello {
  echo -a Hello

Here is an example to count to ten:

ten {
  var %x = 1
  while (%x <= 10) {
    echo -a %x
    inc %x

External links


  • Art and Cultures
    • Art (https://academickids.com/encyclopedia/index.php/Art)
    • Architecture (https://academickids.com/encyclopedia/index.php/Architecture)
    • Cultures (https://www.academickids.com/encyclopedia/index.php/Cultures)
    • Music (https://www.academickids.com/encyclopedia/index.php/Music)
    • Musical Instruments (http://academickids.com/encyclopedia/index.php/List_of_musical_instruments)
  • Biographies (http://www.academickids.com/encyclopedia/index.php/Biographies)
  • Clipart (http://www.academickids.com/encyclopedia/index.php/Clipart)
  • Geography (http://www.academickids.com/encyclopedia/index.php/Geography)
    • Countries of the World (http://www.academickids.com/encyclopedia/index.php/Countries)
    • Maps (http://www.academickids.com/encyclopedia/index.php/Maps)
    • Flags (http://www.academickids.com/encyclopedia/index.php/Flags)
    • Continents (http://www.academickids.com/encyclopedia/index.php/Continents)
  • History (http://www.academickids.com/encyclopedia/index.php/History)
    • Ancient Civilizations (http://www.academickids.com/encyclopedia/index.php/Ancient_Civilizations)
    • Industrial Revolution (http://www.academickids.com/encyclopedia/index.php/Industrial_Revolution)
    • Middle Ages (http://www.academickids.com/encyclopedia/index.php/Middle_Ages)
    • Prehistory (http://www.academickids.com/encyclopedia/index.php/Prehistory)
    • Renaissance (http://www.academickids.com/encyclopedia/index.php/Renaissance)
    • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
    • United States (http://www.academickids.com/encyclopedia/index.php/United_States)
    • Wars (http://www.academickids.com/encyclopedia/index.php/Wars)
    • World History (http://www.academickids.com/encyclopedia/index.php/History_of_the_world)
  • Human Body (http://www.academickids.com/encyclopedia/index.php/Human_Body)
  • Mathematics (http://www.academickids.com/encyclopedia/index.php/Mathematics)
  • Reference (http://www.academickids.com/encyclopedia/index.php/Reference)
  • Science (http://www.academickids.com/encyclopedia/index.php/Science)
    • Animals (http://www.academickids.com/encyclopedia/index.php/Animals)
    • Aviation (http://www.academickids.com/encyclopedia/index.php/Aviation)
    • Dinosaurs (http://www.academickids.com/encyclopedia/index.php/Dinosaurs)
    • Earth (http://www.academickids.com/encyclopedia/index.php/Earth)
    • Inventions (http://www.academickids.com/encyclopedia/index.php/Inventions)
    • Physical Science (http://www.academickids.com/encyclopedia/index.php/Physical_Science)
    • Plants (http://www.academickids.com/encyclopedia/index.php/Plants)
    • Scientists (http://www.academickids.com/encyclopedia/index.php/Scientists)
  • Social Studies (http://www.academickids.com/encyclopedia/index.php/Social_Studies)
    • Anthropology (http://www.academickids.com/encyclopedia/index.php/Anthropology)
    • Economics (http://www.academickids.com/encyclopedia/index.php/Economics)
    • Government (http://www.academickids.com/encyclopedia/index.php/Government)
    • Religion (http://www.academickids.com/encyclopedia/index.php/Religion)
    • Holidays (http://www.academickids.com/encyclopedia/index.php/Holidays)
  • Space and Astronomy
    • Solar System (http://www.academickids.com/encyclopedia/index.php/Solar_System)
    • Planets (http://www.academickids.com/encyclopedia/index.php/Planets)
  • Sports (http://www.academickids.com/encyclopedia/index.php/Sports)
  • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
  • Weather (http://www.academickids.com/encyclopedia/index.php/Weather)
  • US States (http://www.academickids.com/encyclopedia/index.php/US_States)


  • Home Page (http://academickids.com/encyclopedia/index.php)
  • Contact Us (http://www.academickids.com/encyclopedia/index.php/Contactus)

  • Clip Art (http://classroomclipart.com)
Personal tools