Hello and welcome to Script-School
Level One, Class Five. Please make
sure you are logging this class.
( /log on )
Today we will look at and use
the 12/timer command.
The basic timer format is:
12/timer[N/name<reps> <interval> <commands>
Try this in the lab,
/timer 1 5 /say 5 seconds
The timer is a very handy and useful
command. It is not really complicated,
once you understand the idea.
You can name or number the timers, to keep
control over them. It is normally recommend
that you do name or number the timers.
To name or number a timer, you place the name
or number at the end of your timer...
For example, to name a timer "timer1".. its
/timer1 to name a timer "timersample".. its
/timersample ... now.. you can use a . to
space those names and make them more read-able.
For example, on the timer named sample you can name
it /timer.sample - that makes it easer to read.
Ok, now try this in the lab,
/timer.test 1 10 /say 10 seconds
You can tell what timers you have going at
any time, by using the command 12/timer by
itself.. it will then tell you what, if any,
timers you have that are active.
The next command we are going to take a brief
look at is /write ..
its a great command, that
you will soon find very useful.
The basic /write format is:
/write <dir> <TEXT>
The /write command, writes what ever
text you specify, to a file in the
directory that you specify.
Try this in the channel,
/write test.txt Hello this is just a test!
Now, to see if this example worked, type,
/run notepad.exe test.txt
You should see your notepad pop up, with
the sentence "Hello this is just a test!".
If you did not see that,
please tell me at this time.
Ok.. lets take a 5 minute break..
If you have any questions concerning
tonights material.. now is the time to ask!
Ok, once again, lets go over the idea that
you can place all of the parts of a script,
on one script, instead of placing one part
in the Remote, another part in the alias,
and yet another part in the popups.
You can instead, place all of the parts in
ONE script, which will make it easier to
distribute and easier to load.
In the remote, you indicate an alias,
by prefixing the alias with the word ALIAS.
Example.. if I wanted an alias called Wind..
I could write..
Alias Wind {
me breaks wind in the direction of $parm1
}
This would work like an alias I placed in
my alias section.
If I want to write a popup, in the remote,
I would prefix it with the word menu, then
specify which location I want it to be in.
Example, if I want a popup in my nicklist
called Fwap.. I would place this in my remote.
menu nicklist {
fwap:/me fwaps $$1
}
ok.. lets build a new script
First lets build the remote part
place this in your remote. Please
copy this EXACTLY as show!!!
#wall off
on 1:text:!WALL*:#: {
set %nick $nick
set %parm $parms
wall
}
#wall end
alias wall {
write wall.txt %nick said %parm
}
Now we will add the popups, please
place this in your remote. Also copy
this EXACTLY as shown!!
menu channel {
Wall
.On:{
enable #wall
echo 4 -a Wall has been enabled.
}
.Off:{
disable #wall
echo 4 -a Wall has been disabled.
}
.Read {
run notepad.exe wall.txt
}
}
Please let me know, in the lab, when you
are done and we will test it.
That is it for today, if you have any questions
I will be here for a few minutes to answer them.
If not, we will see you next class. Thanks :-)
Level One, Class Five. Please make
sure you are logging this class.
( /log on )
Today we will look at and use
the 12/timer command.
The basic timer format is:
12/timer[N/name<reps> <interval> <commands>
Try this in the lab,
/timer 1 5 /say 5 seconds
The timer is a very handy and useful
command. It is not really complicated,
once you understand the idea.
You can name or number the timers, to keep
control over them. It is normally recommend
that you do name or number the timers.
To name or number a timer, you place the name
or number at the end of your timer...
For example, to name a timer "timer1".. its
/timer1 to name a timer "timersample".. its
/timersample ... now.. you can use a . to
space those names and make them more read-able.
For example, on the timer named sample you can name
it /timer.sample - that makes it easer to read.
Ok, now try this in the lab,
/timer.test 1 10 /say 10 seconds
You can tell what timers you have going at
any time, by using the command 12/timer by
itself.. it will then tell you what, if any,
timers you have that are active.
The next command we are going to take a brief
look at is /write ..
its a great command, that
you will soon find very useful.
The basic /write format is:
/write <dir> <TEXT>
The /write command, writes what ever
text you specify, to a file in the
directory that you specify.
Try this in the channel,
/write test.txt Hello this is just a test!
Now, to see if this example worked, type,
/run notepad.exe test.txt
You should see your notepad pop up, with
the sentence "Hello this is just a test!".
If you did not see that,
please tell me at this time.
Ok.. lets take a 5 minute break..
If you have any questions concerning
tonights material.. now is the time to ask!
Ok, once again, lets go over the idea that
you can place all of the parts of a script,
on one script, instead of placing one part
in the Remote, another part in the alias,
and yet another part in the popups.
You can instead, place all of the parts in
ONE script, which will make it easier to
distribute and easier to load.
In the remote, you indicate an alias,
by prefixing the alias with the word ALIAS.
Example.. if I wanted an alias called Wind..
I could write..
Alias Wind {
me breaks wind in the direction of $parm1
}
This would work like an alias I placed in
my alias section.
If I want to write a popup, in the remote,
I would prefix it with the word menu, then
specify which location I want it to be in.
Example, if I want a popup in my nicklist
called Fwap.. I would place this in my remote.
menu nicklist {
fwap:/me fwaps $$1
}
ok.. lets build a new script
First lets build the remote part
place this in your remote. Please
copy this EXACTLY as show!!!
#wall off
on 1:text:!WALL*:#: {
set %nick $nick
set %parm $parms
wall
}
#wall end
alias wall {
write wall.txt %nick said %parm
}
Now we will add the popups, please
place this in your remote. Also copy
this EXACTLY as shown!!
menu channel {
Wall
.On:{
enable #wall
echo 4 -a Wall has been enabled.
}
.Off:{
disable #wall
echo 4 -a Wall has been disabled.
}
.Read {
run notepad.exe wall.txt
}
}
Please let me know, in the lab, when you
are done and we will test it.
That is it for today, if you have any questions
I will be here for a few minutes to answer them.
If not, we will see you next class. Thanks :-)