Back To Channels and List Buttons
mIRC Alias Button
Page 5 of 17
Next To Popup
  Alias Button  
About Alias

About Aliases

With aliases you can define shortcuts for often-used commands or even for things you frequently say. In general, all commands which you type in the edit box can be used in an alias. Aliases can also be used to execute several commands at once.

Lets have a look

Lets have a look at some aliases, which you can find in your default aliases.ini. First lets start with a simple example, a command which you use every time you're on IRC:
To join a channel you normally type :-

/join #(Channel-name)

If in your aliases you put /j /join $1 . In other words you're telling mIRC that join and j are the same things. So when you type /j #irchelp . mIRC knows that you mean /join #irchelp .As simple as that.

In fact you don't have to use the letter j you can use whatever letter you want as long as you remember what it stands for.

Money? Dollar?

What does $1 mean?

$1 Is the simplest string. It means the first word after the alias command. So what is the string for the second word after the alias? $2 . For the third? $3 . Very Good... you see how easy it is.


But if you use $1 or $2 etc. and when you type you omit the first or second word after the alias, mIRC will complain. The solution to that problem is $$1 or $$2 etc.

If in your alias you define /j2 /join $1 | /join $2
but type /j2 #irchelp then mIRC will complain because it expects a second channel name as well.

Notice You can separate different commands with the | character with space before and after it

So what do you do to resolve problem? Replace $1 with $$1 , $2 with $$2, etc. Simple.

In other words $$1 means:-
That an alias containing this string will be executed only if a parameter is given; otherwise, the call to the alias will be ignored.

Got the idea?

You can do the same for any other command or even for things we type frequently.
OK Lets suppose whenever you join a channel you type
Hi everybody, What's up? Did I miss anything?

Can we type all this with just one letter. Sure we can. We define a new alias.
/h /say Hi everybody, What's up? Did I miss anything?
and the next time we join our favourite channel we just type /h
Isn't mIRC great for lazy people :-)

What? Too lazy?

Some people would consider typing /h and then hitting enter a great burden.
Don't worry there is an even easier way. Lets start using our Function Keys .
I wonder what will happen if I put this in my aliases.ini.
/f7 /say Hi everybody, What's up? Did I miss anything?

What do you think will happen when you press F7 the next time you join your favourite channel?
Yes you guessed it right. Isn't mIRC great?

So what are you waiting for? Start experimenting with your mIRC commands, aliases and Function keys and make your life easier.

But first read about Strings and Identifiers . You can learn about them if you get the latest mirc faq from the mIRC Home page.

Back to the Top