Introduction
Updates
Course Notes
Course Test
Examples |
|
Getting Started |
Aliases |
/msg and /echo |
Identifiers
If-Then-Else |
Variables |
Pop-Ups |
Remotes
(This course is not responsible
for any people you annoy during the course, and suggests you do it
in an empty channel, such as #scriptingIWATS)
So far, we've learned what aliases are, and how to get
to them. Now let's start utilizing them. Type the following
into your alias window /twid /me twiddles his thumbs.
Now type /twid in the channel you are currently on. You will see
*nick twiddles his thumbs in the window.
/twid is the trigger in this script. Every time you type /twid, the
commands will be activated, which in this case is /me twiddles his thumbs.
Try typing /me twiddles his thumbs in the
channel you are on. The same result will happen. Typing /twid
is the same thing as /me twiddles his thumbs.
Let's try another. In aliases type
/sign /msg $chan Scripting: It's the way to go!.
Test it, type /sign in the channel.
You'll see <nick> Scripting: It's the way to go!.
Now try typing /msg $chan Scripting: It's the way to
go!. Same thing happens. Now you've learned two simple
scripts, take some time to make some of your own, make sure you understand
how the first word is the trigger, which activates what comes next.
In case you're wondering, /msg is how things are said
to a channel in an alias (short for message). This command requires
a second input, the channel. What comes after that is what you are
going to say. So /msg #scriptingIWATS blah
will make you say <nick> blah in the channel
#scriptingIWATS. The $chan used in the above script is called an
identifier, which we'll talk about more later. Basically, when $chan
is used in an alias, it replaces $chan with whatever channel is currently
active.
Some more complex
aliases |