#MIRC @ Dalnet

MIRC Client Help Forum

Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» Dalnet Services Help Popups
Mon Oct 24, 2011 7:16 am by HorseC

» DCC Problem Checking Script
Fri Sep 30, 2011 11:43 pm by Rukbat

» general question
Fri Sep 30, 2011 5:25 am by Rukbat

» Banned by dal.net
Sat Aug 13, 2011 11:25 pm by HorseC

» "MISHBOX" tutorials on mirc scripting.
Tue Aug 02, 2011 7:16 am by HorseC

» A very good guide to mIRC Scripting
Tue Aug 02, 2011 7:08 am by HorseC

» Dialog tool for DALnet services
Mon Aug 01, 2011 7:53 am by HorseC

» Scripting Class Level 2 Class 4
Sat Jul 30, 2011 1:01 am by HorseC

» Scripting Class Level 2 Class 3
Sat Jul 30, 2011 12:49 am by HorseC

Gallery


Statistics
We have 32 registered users
The newest registered user is boed1

Our users have posted a total of 38 messages in 36 subjects

You are not connected. Please login or register

Scripting Class Level 1 Class 1

View previous topic View next topic Go down  Message [Page 1 of 1]

1 Scripting Class Level 1 Class 1 on Thu Jul 28, 2011 11:15 pm

These classes were originally given by operators.
However, with a whole world to help, and the time zones
involved, it soon became clear that scheduling classes
was next to impossible. So....

We have converted the classes to be bot run and we will
have operators available for support.

Because of this converstion to the bot format of teaching
the classes, you will see references to testing in the lab,
and other actions that were relevant to a realtime class
environment.

Please forgive us for this, but over time we will update
the data for these classes to remove those references.

In the interium, please test in the channel that the
operator running the class tells you to use.

We will at different times in the class open the
channel for questions.

We suggest you do: /log on now so you can save the
class to file.


Welcome to Script-School Level One, Class One.
This is the first class of 7 classes and one final
exam in this level. It is very important that you
take all of the classes; since level two and other
levels will assume you have.

Before we begin class, lets explain how you edit in
the aliases section of the mirc script editor.
The Aliases section for editing is opened by
holding down the 'ALT' key and pressing the letter 'R'
(this is sometimes refered to as: ALT+R)
You should then click on the tab at the top of
the window that says: Aliases.

Aliases

mIRC allows you to create aliases and scripts to
speed up your IRC session or to perform repetitive
functions more easily. To create aliases you must
know some IRC commands.

Aliases can be called from the command line, from
other aliases, and from the popup and remote scripts.

In other words, an alias, is a command that does other
things for you. If you have a long process, or even
a short one, that you use time and time again,
you would want to make it an alias.

Here is an Example...
if you were to type: /hi /say hello world!
into your alias window, anytime you typed
/hi you would see hello world! in the
channel window as if you had typed it there.

Another Example:
If you were to type: /greet /me greets everyone
into your alais window, anytime you typed

/greet

others would see

<yournick> greets everyone

in the channel window.
Lets build a little alias right now,
and you can test it in the a test channel

Please write this to your alias.
/greet /me greets everyone

Ok, lets build another one, and test it
in a test channel also.

Place this in your alias.

/grin /me grins at everyone


You can also assign a Function Key to an alias.
This will allow you to run an alias
by hitting the assigned Function Key
Function Keys are the keys F1 thru F12
at the top of your keyboard.

Please add this to your alias.

/f3 /me just hit his/her F3 button


Parameter - data that is used by the program/script.

A parameter can be designated by the use of numbers

Example:
$1 would be the first pararmeter
$2 would be the second parameter
$3 would be the third parameter
and so on -.-.-

Ok, add this to your alias
and we will test it in the lab.

Notice that the $$? will pop
up a box prompting you for data.

/smile /me smiles at $$?

If you use $$?="Enter Nick", when you run
the alias or script that needs that parameter,
you will see a box pop up saying "Enter Nick".
This can be a handy tool.

Now place this in your alias,
and test it in the lab.

/frown /me frowns at $$?="Enter Nick"

Please delete the alias's we have added so far today.

break time!

Ok, we are now going to take a 5.minute break. If you have any
questions concerning todays class material, please ask at this time.

Ok, to continue our class, lets review what we have covered so far,

alias's are commands that we can write,
and an alias can use a parameter to perform a task.

Up till now, we have only written "one command" alias's.
Those are alias's that only do one thing. But for an alias to
be really useful it may need to do more than one command.

Lets look at a two command alias!

We use the "Pipebar" it looks like this: | and it will basically
seperate the different command areas.

here is an example:

/welcome /me looks at $$1 | /me welcomes $$1

Now, if you type: /welcome HorseC

You would see:

<yournick> looks at HorseC
<yournick> welcomes HorseC

Please add this alias and test it in the lab.

/welcome /me looks at $$1 | /me welcomes $$1

You can also write multi-line aliases, using BRACKETS.
Brackets are { and } . Every time you use an
opening bracket { you must close the
command with a closing bracket }

Using Brackets allows us to make multi-line commands.
To rewrite the same command from above:

welcome {
me looks at $1
me welcomes $1
}

Now, lets add this alias, and test it

2welcome {
me looks at $1
me welcomes $1
}


As you can see, brackets will be very
useful to us in writing scripts.
You must however be very careful to ensure
that everytime you use an opening bracket,
you also use a closing bracket. If you don't
you will find your script having major problems.

Ok, please remove any alias's that are still in your alias
box that we wrote today (only remove those we wrote today).

The next aliasis we are going to add will
stay in your alias section. you will use them
later on in the course. They are useful
commands for you!

Please add this alias!

/jsc /join #script_class

Now add these aliases!

/c /clear
/ca /clearall

The first aliases: /jsc - joins school channel
/c - clears your active screen
/ca - clears all screens

These aliases will help you if you use them!

That concludes todays class. If you have any quetions concerning
todays material, please feel free to ask! Smile

View user profile http://www.mirc.org

View previous topic View next topic Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum