Before we get started, you should know some of the basics. Note: I use mIRC 5.9 and 5.8. Things may be a little different for older and newer versions. I don't know. But everything should be good in 5.8+.
To get color, hold down Ctrl+k, and a menu should popup. Then pick the numbers you want to use, up to two. The first number will be the text color, and the second one will be the background color. For example, (Ctrl+k)4,1 would be red text (4=red) with a black background (1=black).
If a box doesn't pop up showing what numbers are what colors, go to Options, General, and check the "Control+k pops up the colour index" box.
Color codes are as follows:
0-White
1-Black
2-Dark Blue
3-Dark Green
4-Red
5-Brown
6-Purple
7-Orange
8-Yellow
9-Light Green
10-Greenish Blue
11-Light Blue
12-Blue
13-Violet
14-Grey
15-Silver
Some of the basic mIRC commands are:
Note: When ever you're using a $identifier or a %variable in the text box, always use two // before the command. Example: //echo -a $active will echo the name of the active window. /echo -a $active will just echo $active.
if (something1 operator something2) { command }
By operator I mean the thing that compares something1 to something2
isin string something1 is in string something2
ison something1 is on channel something2
To use the oppisite of one of the operators, use a ! before it. For example, if we put !isop then it would mean if something1 is not and op on something2
Now for a few examples.
You can type this on the command like: //if (5 == 5) { echo -a Hey }. That's an easy one, but if you do it it will echo hey because 5 equals 5.
if.test {
I'm sure you're wondering what the hell that loop thing is. I'll explain that after I'm done with the if-then-else. But I think it's pretty easy to figure out what it is, really...
The elseif is pretty straight forward. Here's an example built on the earlier example
if.test1 {
These are pretty easy to get as well.
if.test {
Basically, on the line that begins with 'else', you'll notice that bold part that says goto loop. A few lines above that (two, to be exact), you'll see :loop. The 'goto loop' part is telling it to go to the part called 'loop'. It doesn't have to be called loop. You can have 'goto hell' and put a ':hell' in there somewhere.
But something that has to be in there, is the : before the part, and only at the begining of that part. You notice on line 3 it says :loop and on line 5 it's goto loop. There is no : in the goto command, and that's the way it should be.
If Then Else statements
If then else statements are used to compare things. They're fairly easy once you get the hang of them.
These aren't used on the command line (where you type things) much. They're usually used in remotes and alias sections. But you can still use them there if you really want to.
Usually they're part of a remote or alias.
Anyway, this is how they break down:
elseif (something1 operator something2) { command }
else ( command }
The common operators are:
== equal to
!= not equal to
< less than
> larger than
>= larger than or equal to
<= smaller than or equal to
isincs string something1 is in string something2 (case sensitive)
isop something1 is an op on channel something2
isvo something1 has a voice on channel something2
There are other operators, to see them, look at the mirc help file. They aren't used much so I didn't want to waste time on them.
Here's one that uses else: //if (5 == 4) { echo -a no } | else { echo -a hey } That will echo hey because 5 doesn't equal 4.
Notice the | thing? That allows you to use multiple commands on one line. Since if and else are really seperate commands, they need to be seperated.
The above examples are for typing into the command like. They won't work on their own in aliases or remotes. The following will, and demonstrates if-then-else and variables in action.
If you want to see it work, copy and paste it in the alias section (the white /a on a green background at the top) then type /if.test in the status window...or any other window, it doesn't matter
set %number 1
:loop
if (%number == 10) { echo -a %number | echo -a I counted to 10 | unset %number | halt }
else { echo -a %number | inc %number 1 | goto loop }
}
Also, did you notice that there aren't any / before any of the commands? That's because you don't have to include them when you're working in the alias, popups, or remote boxes, although you can if you want.
set %number 1
:loop
if (%number == 10) { echo -a %number | echo -a I counted to 10 | unset %number | halt }
elseif (%number == 5) {echo -a %number - half way there | inc %number 1 | goto loop }
else { echo -a %number | inc %number 1 | goto loop }
}
Goto and Loops
Let's take a look at them in the above example...
set %number 1
:loop
if (%number == 10) { echo -a %number | echo -a I counted to 10 | unset %number | halt }
else { echo -a %number | inc %number 1 | goto loop }
}
Timers
Timers are easy. I don't even know why I'm bothering with them. But for those of you who don't want to read the manual, I'll go over them real quick.
Syntax: /timer(and optionally, a timer name) amount_of_times_it'll_repeat delay_in_seconds. Example: /timertest 1 10 /echo -a hey will create a timer named test, that will execute 1 time, in 10 seconds.
To keep a timer running as long as mIRC's open, or until you stop it, put a 0 in for the amount of times it'll repeat. /timertest 0 10 echo -a hey will repeat 'hey' every 10 seconds until you close mIRC or stop the timer.
To stop a timer, type /timer(timername) off. Example: Type /timertest 1 60 echo -a hey, then hit enter, then type /timertest off
To see a list of all timers currently running, type /timers
To stop all timers, type /timers off
For a list of other timer related features, type /help /timer and scroll down a ways
No, you can't create a timer named 's'