Scripting Class Level 1 Class 4
Hello .. and welcome to the 4th class of the
Leve l for Script-School Program.
Today we are going to cover alot of material,
so please be sure to follow along very
closely. Todays lessons will cover what you
will need for next weeks class project.
To start with.. lets look at some commmands
that you will need to use. We will discuss
each command and do some practice of each.
The first is ECHO ...
format: /echo [colournumber <-sdaehiN|#channel|[=]nick> <text>
Prints text in the specified window using
the specified colour (0 to 15).
Note: This text is only displayed in
your own window, it isn't sent to the
server so no one else can see it.
So... try this .. type this in your window.
12/echo 4 -a This is a test!
Now.. you should have seen in your window
This is a test! (in red)
That would have only been seen in your window.
If you have not seen it .. please let us know
at this time...
Next is Titlebar ....
/titlebar [@window <text>
Sets the main application titlebar.
Try this..
/titlebar This is a TEST!
Now.. look at the top above your toolbar.
You should see what we just typed.
If you dont see it in the titlebar,
please let us know at this time:)
Now.. lets take a look at using Variables.
a variable is a place where mirc scripters
place things they want mirc to "remember".
mIRC can recall these variables and use them
in the scripts.
To make mIRC remember something we use the
command: /SET
The format is /set (variable name) (infomation)
All variable names start with a %
So if I want to make a variable called %test
with the information - Ping Pong!
I would type: /set %test Ping Pong!
Then anytime I referred to the variable %test it
would use Ping Pong! in that place.
Try this.. in your window type
/set %sample King Kong
now in the lab window.. type: //say %sample
please use two // (not just one).
mIRC can also update variables .. do this
/set sample Mickey Mouse
Once again in the lab type //say %sample
Sometimes you will want to turn parts of your remote on or off..
we can do this using GROUPS
Groups are parts of a remote, that
can be ENABLED or DISABLED.
All groups start with a #. So if I want to
have a group called Test it would be #TEST
We will cover groups more today.. but for now..
lets take a 5 minute break... if you have any
questions over what we covered so far today..
now is the time to ask!
Up till now, we have placed each part of
the script, in different locations.
You can place all of the parts on one script.
This would be done in the REMOTE. You
do have to indicate what is your alias,
and what is your popup.
To build an alias we simple place the
word Alias in front of the command we are building.
Try this.. place all of this in your REMOTE section
Alias Scream {
describe $chan screams
}
now type /scream in the lab channel
.. Ok.. lets take this another step
change that alias to
Alias Scream {
describe $chan screams at %nick
Now.. lets add a remote
Add this below the alias
on 1:TEXT:Yell*:#: {
set %nick $nick
scream
}
Now.. I will test it in the lab.
Ok.. lets build a popup to control
our remote using GROUPS.
First to designate that its a POPUP
you are building into your script,
We use the word 12MENU
To build a channel popup we would use:
menu channel
Ok.. place this in your remote
menu channel {
Scream
.On:.enable #scream
.Off:.disable #scream
Now, bring up your channel popups, by
right clicking on your mouse while your
pointer is in the channel. You should
see a popup called scream, with the
on and off options.
If you dont... please tell us so at this time
now..above the on text command add:
#scream off
Below the on text command add:
#scream end
Thus it should look like
#scream off
on 1:TEXT:Yell*:#: {
set %nick $nick
scream
}
#scream end
This is a group, which using the popup
we wrote, can be turned on or off...
This concludes todays class, If you dont
have any questions concerning todays class,
we will see you next week.. if you do have
a question, now is the time to ask..