#MIRC @ Dalnet
Would you like to react to this message? Create an account in a few clicks or log in to continue.
#MIRC @ Dalnet

MIRC Client Help Forum

Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» Dalnet Services Help Popups
Scripting Class Level 1 Class 2 EmptyMon Oct 24, 2011 7:16 am by HorseC

» DCC Problem Checking Script
Scripting Class Level 1 Class 2 EmptyFri Sep 30, 2011 11:43 pm by Rukbat

» general question
Scripting Class Level 1 Class 2 EmptyFri Sep 30, 2011 5:25 am by Rukbat

» Banned by dal.net
Scripting Class Level 1 Class 2 EmptySat Aug 13, 2011 11:25 pm by HorseC

» "MISHBOX" tutorials on mirc scripting.
Scripting Class Level 1 Class 2 EmptyTue Aug 02, 2011 7:16 am by HorseC

» A very good guide to mIRC Scripting
Scripting Class Level 1 Class 2 EmptyTue Aug 02, 2011 7:08 am by HorseC

» Dialog tool for DALnet services
Scripting Class Level 1 Class 2 EmptyMon Aug 01, 2011 7:53 am by HorseC

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

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

Gallery


Scripting Class Level 1 Class 2 Empty
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 2

Go down  Message [Page 1 of 1]

1Scripting Class Level 1 Class 2 Empty Scripting Class Level 1 Class 2 Thu Jul 28, 2011 11:48 pm

HorseC

HorseC

Scripting Class Level 1 Class 2

Welcome to Level 1Class 2 in the Scripting Classes

Today we will learn how to use Popups

mIRC allows you to create custom popup menus for the
status window, query/chat windows, channel windows,
the channel nickname listbox, and main menubar.

To create these you must know how to:

use Basic IRC commands
create Aliases
--- and in later sessions ----
use Identifiers and Variables

Popup menus are activated by using the right
mouse button in the main section of a window.

In the Channel window (the one with this text)

please: Click your right mouse button.

If you are using a clean MIRC as directed in
the class instruction, you should see a box
appear that looks like this...

Channel Modes

If you do NOT see this please notify the instructor
now..

Popup menu definitions use the format:
<menuitem>:<commands>

Note the ":" it is a REQUIRED element.
It seperates the 'menuitem' (name displayed in the popup)
from the commands the popup will execute. The most common
mistake in writing popups is to forget that piece!

It is now time for us to write our first (of several)
popups. We will be creating a 'channel' popup menu.
Please read this section completely, before taking
any action

In order to create a channel popup menu we must first
open the correct window in which to create it. This
is done from within the Tools area at the top of
your screen. To access this area you could use your
mouse or the keyboard..

To use the keyboard:

note: <alt>t means hold down the ALT key and press 'r'

we will open the 'channel popup' edit window with
the following sequence of keystrokes:

<atl>r
<alt>p
<alt>v

To use your mouse left click on the 5th icon
from the left of your screen. The icon looks
like a scroll of paper.

Please try it now, look at what is there,
and use Cancel to close it immediatly.

If you followed the previous directions correctly,
you should have seen the following popup

12Channel Modes:/channel

This is the default command that comes as the only
channel popup with MIRC. We will be adding more.
0,0 Level one Class 2 number 10

It is quite possible that the second element of
your popup menu item will require 2 or more
commands to accomplish what you wish to do. Our
first example of a popup will use two command lines.

If you want to create a popup menu item which
performs several commands, you can use the 12{ }
brackets.

hw:{
/say Hello
/say World
}

The above popup, when clicked would show in channel:

Hello
World

Class Assignment:

produce a popup callled 'pop1' which will say in
the channel the following:


Hello HorseC
This is my First popup!

We will test the popup in the lab.

Your popup should have looked something like this:

2pop1: {
/say Hello HorseC
/say This is my first popup!
}

or this:
pop1: /say Hello HorseC | /say This is my first popup!

Notice that the "|" is used when multi commands are on one line.


Your whole popup section for 'channel' should
now looked something like this:


Channel Modes:/channel
pop1: {
/say Hello HorseC
/say This is my first popup!
}

This is a good Breaking point. So we will break for 5 minutes.
Have a smoke, grab a drink, or just take a quick nap.

We will also take this time to answer any of your questions.


Sub Menus in popups

Sub menu's in Popups are used to group popups by
function. For example, several different
join channel commands could be grouped together.

To create a Submenu, a "." (fullstop) is used.

for example:
Join a Channel
.go to class:/join #scriptschool
.what shall we join?:/join $?

Notice that the first line does NOT have all the
normally required elements. This is because it will
not execute a command, but will only show in the
popup as a selectable item. Notice further that
each 'sub menu' line starts with a fullstop "."

Class assignment

Add the following Submenu to your channel popups:


Join a Channel
.go to class:/jss
.Who shall we join?:/join $?

This popup will be usefull for the rest of your
time here in class. It will also be the basis
for our next area of work with popups.

Your popup section should now look like this:

Channel Modes:/channel
pop1: {
/say Hello HorseC
/say This is my first popup!
}
Join a Channel
.go to class:/jsc
.Visit the folks at #script-lab:/jsl
.What shall we join?:/join $?

While this is great, we are not quite done yet Wink

Notice that 2 of the sub menu items are related to
joining class channels, and the third is not.
This suggests that items 1 and 2 of the submenu should
be grouped together.... We will do that now...

To create menus within a submenu, you just add
more fullstops "."
in the format:

Submenu level 1 Title
.Submenu level 2 title
..menu function at level 2
..menu function at level 2
.menu function at level 1

Notice that the lines associated with each level
have fullstop(s) associated with them.

Hint: I have learned through experience that going
beyond the third level "..." is generally to deep.
(Quoted from Horsec)

We will now update our popups.....

Class assignment

Group the first two commands in the following sub menu
one level deeper, and add a title for this level of
"Script Class"

Join a Channel
.go to class:/jsc
.Visit the folks at #script-lab:/jsl
.Who shall we join?:/join $?

Results

If you completed the assignment correctly, your
popups should now look like this:

Join a Channel
.Script Class
..go to class:/jsc
..Visit the folks at #script-lab:/jsl
.Who shall we join?:/join $?

If you now right click and place the cursor on
the
Join a Channel > line your popups
Channel Modes
Pop1
Join a Channel >
Script Class >
Who shall we Join ?

If this is NOT the case.. please let the instructor
know now.....

If you now right click and place the cursor on
the
Join a Channel > line,

AND move the cursor over the
Script Class > line you should then see:

Channel Modes
Pop1
Join a Channel >
Script Class >
go to Class
Who shall we Join ?

If all the elements of the third level do not show
please let the instructor know now.....

Summary of Class

This concludes the initial class on Popup Menus.

So far we have learned:
- What a popup menus is, and how it is involked.
- How to locate the channel menu area for editing.
- What the Three elements are of every popup item.
- How to create a simple channel popup.
- How to add popup items at different levels.

This session has just scratched the surface of what
is possible in the use of popups. While this session
has only dealt with the 'channel menu popups', a
second session on popups is scheduled a bit later in
the course. It will go into other areas where popup
menus can be used, and how to make them more dynamic.

We will end the class now. If you have any questions
now is the time to ask. If not I will see you next class.

http://www.mirc.org

Back to top  Message [Page 1 of 1]

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