mircscripting.info Forum Index mircscripting.info
#mIRCscripting Forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Dialog Tutorial (Simple for noobs)

 
Post new topic   Reply to topic    mircscripting.info Forum Index -> Tutorials
View previous topic :: View next topic  
Author Message
JuLiaNc



Joined: 05 Apr 2005
Posts: 1
Location: Bugibba, Malta.

PostPosted: Tue Apr 05, 2005 3:35 am    Post subject: Dialog Tutorial (Simple for noobs) Reply with quote

So, I'm going to add how to do a simple dialog for those newbies, that want to learn how to do a dialog. Cool

So like, I already did this tutorial once, and erased it by mistake, I hope this work will be for some help of yours. Laughing Get a beer and Relax with me Smile.

You can began from here:

; This will always be the same in the begining of a dialog. (dialog name) will be always needed to open the dialog (/dialog -m (dialog name) (dialog name)).
dialog (dialog name) {

; where the text in the " " will be in the title bar.
title "Example"

; where x and y are better set as -1, w and h are the size of the dialog, you'll see an example sooner. Smile
size x y w h

; Then after that step, you can add some things to the dialog like; text, button, icon, list, scroll, editbox etc. Where the id, is the number of the option(text,editbox etc.). Some of them also have " " where you specify a variable or text in " ", if you specify a variable or an identifier you'll have to remove the " ", also this is to for example if you do text "hello" etc... the text in " " will appear.

text "(text)", (id), x y w h, (tab (id), disable, nowrap, right, centre)

edit "(text)", (id), x y w h, (right, center, multi, pass, read, return, hsbar, vsbar, autohs, autovs, limit (number))

button "(text)", (id), x y w h, (default, ok, cancel, flat, multi)

check "(text)", (id), x y w h, (left, push, 3state)

radio "(text)", (id), x y w h, (left, push)

box "(text)", (id), x y w h

list (id), x y w h, (sort, extsel, multsel, size, vsbar, hsbar)

combo (id), x y w h, (list , sort, edit, drop, size, vsbar, hsbar)

icon (id), x y w h, (filename), index, (noborder top left bottom right)
}


; Then you can also add some on dialog events, where you specify if a button is clicked, dialog is opened, dialog closed, or button double clicked etc.


Code:

on *:dialog:(dialog name(The one specified in the beganing: dialog (dialog name) {):(init, sclick, dclick, close, edit, menu, scroll):(id (the number of the option :)):{
(commands)
}


example (a button is numbered/id 3):

Code:
on *:dialog:EXAMPLE:sclick:3:{
echo A button with the number/id 3 is clicked.
}


; An example of the steps we have passed till now will be added here. As the aliases was already explained by Guardian in the other tutorial I added an alias to this dialog so you can open it with: /example in your mIRC. Just add the code in ALT+R > FILE > NEW, and just do: /example in any mIRC window, I also hope that you didn't just copy/paste this into your mIRC, but also learned something new.

Code:
alias example { dialog -m example example }

Dialog Example {
title "This is an Example"
size -l -l 170 170

text "Combo Box:", 1, 5 7 100 13
combo 2, 5 22 100 50, drop, list, size

text "List Box:", 3, 5 47 100 13
list 4, 5 62 100 50

text "Edit Box:", 5, 5 97 100 13
edit "hello, write something", 6, 5 112 150 20, autohs, return, multi

button "Okey!", 7, 57 145 50 20, ok
}
on 1:dialog:example:init:*:{
did -a example 2,4 hello
did -a example 2,4 this
did -a example 2,4 is
did -a example 2,4 an
did -a example 2,4 example
}




Thanks for reading this tutorial, I hope you had fun with me Smile, I also said thanks because if you don't read this tutorial it's a tutorial with no use. I hope you learned something new. Cheers.
Cool Rolling Eyes
_________________
"House Is An Uncontrolable Desire"
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    mircscripting.info Forum Index -> Tutorials All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group