How to start

From Scriptwiki
Revision as of 15:21, 11 April 2006 by Doomie (talk | contribs) (just to save it)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This tutorial is supposed to give an introduction into scripting in mIRC. It will explain the so-called Scripts-Editor and it's functions, followed by a little example. At the end it will give some hints about how to debug a script.

The Remote Editor

If you want to begin to script in mIRC, you need to open the Script-Editor. You can do it in two ways: pressing "Alt + R" or with mIRC's menubar (Tools -> Scripts Editor).

If you are using a premade script (for example nnscript), you will probably see a lot of code. Note that it is difficult to implement own scripts in such a premade one, as functions could interfere (if you want to change mIRC's default output for example).

At first, you should open a new remote file. To do it, click on File -> New (see picture below).


Note that your script files will be saved automatically; all you need to do is pressing 'Ok'.

The next part is about the five different tabs of mIRC's Scripts Editor:



Basically, you do not need to use aliases.ini (that you can edit using this tab). Usually, if you want to add a new alias, it would look like:

alias moo { return moo }

in your 'Remote-Section' of the editor (the one that's active after pressing Alt + R). You can add the same alias in your Aliases-Section:

moo { return moo }

Notice that you don't need to write 'alias' infront of the new alias. Note that you cannot add events in this section.


Again you do not need to use this section. It's the same as using menu in the remote section. Usually, there will be some menus added in this section (for example your nicklist-menu).