Contents.You've got the foundation to use mIRC and the Scripts Editor. Now we can start with learning how to script. Read this chapter section by section and follow along with the examples. You will need to understand the skills in this chapter to move on and make any sort of script whatsoever. This is a very long chapter, especially for beginners, so take your time reading this.Types of Scripts There are three types of scripts in mIRC.; aliases, popups, and remotes. Each one is comprised of different parts and has its own tab in the scripts editor.Aliases Aliases are user-defined commands that stand for a set of one or more commands. Aliases are usually used to simplify everyday IRC tasks, such as identifying your nickname.
Option Description-c, -compile: Compile a.coffee script into a.js JavaScript file of the same name.-t, -transpile: Pipe the CoffeeScript compiler’s output through.
The syntax of an alias is. Hello say Hi, I'm $me and I am an mIRC user.The first part of the alias is hello. This is the alias' name. You would type the command /hello in the command line. The say Hi, I'm $me and I am an mIRC user.
Part is the command that is executed when you type /hello. Typing /hello and pressing Enter would result in the line showing up in the current window saying 'Hi, I'm mynickname and I am an mIRC user.' One important thing to take note of is that I didn't use a / before the alias name or the command. This is unnecessary in the scripts editor. MIRC prefixes every command in a script with a //, which runs every command and evaluates any variables or identifiers in the command automatically.
So, mIRC would treat both of these the exact same way. Kick $$1: kick $$chan $$1 You got kicked by $me $+!Ban $$1: mode $$chan +b $address($$1,2)Kickban $$1: ban -k $$chan $$1 2 You got kickbanned by $me $+!The identifier $$1 in this case means the same thing as $1. It is the nickname selected on the nicklist (if there is one and you are in a channel). When you click on an option (kick, ban, or kickban), it will do that option to whatever nickname is in $$1. For example, the kick option kicks $$1 from $$chan with the message, 'You got kicked by mynick!'
Now, allow me to use this example to explain the double $$ prefix. When used with an identifier, this will stop a command from executing if the identifier returns $null. For instance, if you did not select a nick on the nicklist, $$1 returns nothing and halts the command. As an added aesthetic bonus, if a double-prefixed identifier returns nothing in a menu item, the menu item will not show up.
In this example, the entire menu would be hidden from view if you did not select a nick on the nicklist.Nicklist menus also support everything regular menus support. You can use multi-line commands, submenus, etc. They work exactly the same. The only real caveat to using pop up menus that target a user in the nicklist is to remember to use $1 or $$1.Menu Bar Menus Menu Bar menus work like the rest of the popup menus, except they appear in the menu bar at the top of the mIRC Windows under the 'Commands' menu. You can also change the name of the Commands menu, if you'd like. On the first line of a popup file under the menu bar section, put the word Pie. Save the file and look at your menu bar.
The menu should now be labeled 'Pie.' Identifiers and Variables In Menu Items Variables and identifiers in menu items are evaluated each time a menu is opened. As seen in the previous example, a nicklist menu like this. %mytext:%mycmdIf you have variables set called%mytext and%mycmd then the menu item will appear clickable. If you only have%mytext set, the item will appear, but grayed out and disabled. If you only have%mycmd% set, The menu item will evaluate to $null and not appear at all in the menu.The advantage of using identifiers and variables in popup menus is to make them more dynamic, as seen in the kick/ban menu example above.Popups in Remote Files Much like aliases, popups can be defined in remote files, in almost the same way.
You simply use the menu menuname prefix, and then enclose the menu commands in brackets. Menuname is the location of the popup; either channel, status, query, menubar, or nicklist. Unlike the Popups tab, a menu under the Remote tab does not know where to open it the menu, so you must say it after the menu prefix.
Contents.Primary uses. Channel and personal protection against any types of attacks (flooding, spamming, CTCP floods, etc.). Dialog windows can be created in mIRC to better serve user-compatibility.
Popular mIRC dialog extensions include MDX ( mIRC Dialog Extension) and DCX ( Dialog Control Extension). There are also a few versions of mdx.dll and dcx.dll modded by IRC hackers. 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 as the owner of a nickname).Script storage Scripts are stored as either plain text files, usually with a.mrc, or as. They however can be stored with any extension.
Multiple script files can be loaded at one time, although in some cases, one script will conflict with another and cause one or both of them to no longer work properly.Language features.