Aliases

mIRC allows you to create aliases and scripts to speed up your IRC session or to perform repetitive functions more easily. To create aliases you must know some IRC commands.

Examples
The following examples show you how to create aliases that perform simple functions.
If you type an alias to read:
/ft /join #fun.trivia

You can now type just  /ft  -  by typing just /ft you have commanded mirc to actually type  /join #fun.trivia

Breaking the above alias down  the first section /gb is the name of the alias and the command u will always type.  the second part (/join #fun.trivia) is the what u want the alias to say or do.

Now to add what is called a parameter string:  Lets us the alias

/j /join $1

If we type /j #fun.trivia this is the same as typing /join #fun.trivia . The $1 refers to the first parameter in the line that you supply. Therefore you would actually type
 /j #fun.trivia    as the name of your alias  with the /j being the name of the alias and the #fun.trivia is the parameter u want 

Lets use another example:

We want to send a kiss to someone  -  therefore we name the alias kiss  (/kiss)  and we then type /me as the action command for your nick  and then what u want to say as in kisses *nick* passionately.   The nick section can be filled with a parameter which will be $$1 .
Therefore the alias will now read

/kiss  /me kisses $$1 passionately

In your chat room all u now need to type is /kiss you   (with you being the name of the nick u want to kiss  lol
The line in the room will now read

Mynick kisses you passionately


You can enter as many parameters as u like by naming them consequetively  

therefore
/kiss  /me kisses $$1 $$2

the first parameter will be the nick the second is how u wanna kiss 

Therefore in the room you would type  /kiss you on da lips 

and in the room the line will read  

Mynick kisses you on da lips

Now for some shortcuts

/me  will always read your nick
/say mean only what u have typed after say will be shown 


$chan  will always insert the name of the channel you are in
$me will enter the nick you are currently using in the text of the line  
(when using these identifiers u need to use a // in front of the alias command so that mirc can evaluate it) more on that later 



Now the $$1 in an alias means that the command will only be executed if that parameter is specified.  Therefore if the parameter refers to a nick you will have to include the nick in your typing of the alias command

Lets say we have 

/bad /me warns $$1 that your behaviour is inappropriate in the room

you will have to type /bad and a nick the line is to be sent to

An option to this is for general warnings

/friends  /me says  hey $1 we are all friends in here

because there is only one $ the inclusion of the parameter is optional

u can type  /friends joey    and the line will read  
Mynick says hey joey we are all friends in here

If u just type  /friends   the line will read
Mynick says hey we are all friends in here


Now lets say we have this as our alias:
/op /mode # +o $1

To op someone you can now just type /op goat instead of the whole /mode command which would be /mode #fun.trivia +o goat.

I think typing just /op goat is much easier  lol

/op /mode # +ooo $1 $2 $3

You can now op three users by typing /dop goat mike bongo.

For multiple commands you should use a | character (the shifted character usually under the \ key). So to write an alias that kicks and bans someone:

/dkb /kick # $1 | /mode # +b $1



Function Key support
You can redefine function keys to perform certain commands, just like aliases. For example:

/F1 /say Hello!
/sF2 /query $1
/cF3 /ctcp $1 version

The s and c prefixes for Shift key and Control key respectively.

Note: A function key will behave differently depending on the window in which it is used. For example, when using it in a query window the $1 parameter refers to the selected users nickname. If you're on a channel and the nickname listbox is active as it always is in bigpond  then the function key will work on the selected nicknames. 

Command prefixes
If you are executing a command from the command line ie. by typing it into an editbox, you can force mIRC to evaluate identifiers in that command by prefixing it with two // instead of one /. For example:

/echo My nickname is $me (being your alias)

if u type /echo
Would print out "My nickname is $me" and would not evaluate the $me.

but if your alias is: 
//echo My nickname is $me

and u type //echo
 
Would print out "My nickname is Pengy" if your nickname was Pengy.

If you want to force a command to peform quietly ie. without printing out any information, then you can prefix it with a "." fullstop. For example:

/ignore somenick

Would print out information telling you that you are now ignoring "somenick". If you don't want this information to be displayed, then you can used:

/.ignore somenick


I hope this helps you more than it confused you..... 

Adding colours

Colour can be added to your aliases by using =

when u press control and k together a colour box will open and u can click on your preferred colour 
or u can press cntrl+k and type in the number 

To use background colour plus colour text you would need to type two numbers separated by a comma instead of just one number. The first number is the text colour, the second number is the background colour.

Therefore press control+k and type 1,8  which would give you a black background with yellow text

 The colours range from 0 to 15, and the indexes are:

	0 white		8 yellow
	1 black		9 lightgreen
	2 blue		10 cyan
	3 green		11 lightcyan
	4 lightred	12 lightblue
	5 brown		13 pink
	6 purple	14 grey
	7 orange	15 lightgrey 


Control Codes

mIRC interprets control codes in text for Bold, Underline, Reverse, and Colour and displays text in the specified format.

You can use the following key combinations to insert control codes in text:

Control-B for bold text
Control-U for underlined text
Control-R for reverse text
Control-K for coloured text
Control-O for plain text

Examples

To underline a single word in a sentence:

1.Type Control-U
2.Type in the word
3.Type Control-U again

Only the text that is enclosed by the start and end codes will be affected. You can use this method with all of the other control codes.






Have fun and pls just ask if u don't understand what i am saying or have any further questions.

The writing of aliases and scripts is huge and there are 100's more commands and options 

Lena

    Source: geocities.com/funtriviaau