The MIRC Workshop
Tutorials, Scripts and Help Files for mIRC

MIRC Workshop mIRC Help Files Scripts & Scripting mIRC Downloads mirc script writer
Back / Index / Next

Return To Main MIRC Menu

 MIRC Identifiers 

MIRC Identifiers sound very technical, but its just a term for some characters that identify a value. Still sounds techie? An identifier is like a magic word that will be replaced by mIRC with whatever value it refers to.

The mIRC Identifier $me means your nickname. No matter how many times you change your nick, $me is the identifier for the current one. Wherever you use $me, mIRC will replace that identifier with your nickname.

Simple and good isn't it. The mIRC Identifiers are needed so that your scripts can find the values that may change. MIRC Identifiers are no more than that. There are many identifiers, since there are many things you may need to refer to in your scripts that can change between the time of scripting and the time of use.

Pretty much everything that you can select or change has an identifier. You can refer to the first word in any string of text ($1); the folder (directory) where you installed mIRC ($mircdir); the currently selected nicks in the nicklist ($snicks); etc.

Again, a full list of mIRC's identifiers can be found in the mIRC Help files. In this tutorial I will detail only a few examples of the most practical of the identifiers to start with.

MIRC Identifiers can be used at the command line as well as in scripts, but, for mIRC to evaluate them you must prefix the command with two '//' slashes rather than the normal one. If you only use 1 slash '/' mIRC will not convert the identifier given in an editbox to its value. This only applies to command lines - identifiers and variables are always evaluated in scripts.

NOTE: One essential thing to remember about identifiers is that they almost always will only work if there is at least one space on either side. If an identifier is not seperated by spaces from other characters in scripts then mIRC will usually fail to 'see' it. ALWAYS space identifiers from anything else in your scripts or commands.

  MIRC Identifiers  

$me identifies your current nick. It becomes very useful in scripting of all kinds.

$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.

The reason for the confusion is that many things create strings which mIRC can choose the first parameter from. In popups for instance, $1 would be the nick selected in the case of nicklist popups.

With experience (or help files) you will learn what parameters mIRC will be evaluating in any given situation. This is because you are generally going to use $1 $2 etc. in very specific circumstances. You will learn about this in the scripting tutorials. For now it is enough to know that $1 means parameter 1.

$? 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.

The $? identifier is pointless at the command line, but is invaluable in scripts to get user input. To see it in action however before the scripting tutorials just type:
//echo -s you typed: $?="type something here" in the status window editbox and enter it. Notice that the double '//' slashes are used, to make mIRC evaluate the identifiers used in the command line.

/ECHO [-adetsl][channel OR nick] <text>
The /echo command was not covered in the commands section since it is far more related to scripting than common command line useage. The /echo command causes the <text> to be displayed in your window, but not sent to anyone else.

The switches select how to display the <text> specified. If a channel/nickname isn't specified, the -s switch echoes to the status window, the -d switch echoes to the dedicated message window (if you have one), and the -a switch echoes to the currently active window.

If you specify a channel or nick, the text will be displayed in the channel window (or query window) that matches the given name. The -etl switches can still be used with a named window.
Example: /echo -tl #mIRC An echo to the #mIRC channel window

The e switch encloses the line in line separators. The t swich adds a timestamp (e.g. [11:23] ) to the echoed text. The l makes the echo highlighted.

$wavedir is the folder you specified in the options for your .wav sound files. $mididir is the folder you specified for .mid files.

$fulldate is the current date in the format: Tue Sep 07 23:51:23 1999 $date is the date in day/month/year format. To get the date in the American month/day/year format use $adate. The $time gives the time according to your system clock in Hours Minutes and Seconds. $day returns the current day e.g. Tuesday.

That is enough identifiers to give you the idea. You can find all of the mIRC Identifiers in the mIRC help files whenever you wish. Identifiers are not really all that 'techie' at all.

Even if you are not yet comfortable with identifiers in mIRC you will still be able to begin scripting. MIRC Identifiers will become crystal clear once you get to use them a little in your scripts.


Back to Top of Page

Return To Main MIRC Menu

Back / Index / Next




©1999 The Black Knight
MIRC Workshop
What's New
Site Map
MIRC Links
Link to Us
The Author
IRC chat basics
IRC Chat Use
IRC Warfare
No-Tech Attacks
Floods / Flooding
Nukes / Nuking
Trojans / Trojan
Hacks / Hacking
What's mIRC?
mIRC Set-up
Connect Options
IRC Options
DCC Options
Display Options
General Options
mIRC Basics
Beginner Guide
MIRC Colours
MIRC Commands
MIRC Identifiers
MIRC Variables
MIRC If-Then-Else
Alias Scripts
Popups Scripts
- Text Popups
- Popup Controls
- Files Popups
- Info Popups
Events Scripts
Remotes Scripts
Scripting Applet
Downloads Area

Rate This Site.
 

Copyright ©2001 MIRC Workshop
All rights reserved

Search engine optimisation positioning tutorials| Internet Marketing Consultant

Back To Top