|
Joined: Dec 2002
Posts: 12
Pikka bird
|
OP
Pikka bird
Joined: Dec 2002
Posts: 12 |
hi i have make a mdx dialog i´m not very good in dialog scripting can you complete the dialog that the dialog works ? also: add server del server and to connect to the add server here is the dialog P.S my english is very bad!
alias mdx_fullpath { return $+(",D:\Programme\mIRC\mdx.dll,") }
alias mdx { dll $mdx_fullpath $1- }
alias mdxinit { dll $mdx_fullpath SetMircVersion $version dll $mdx_fullpath MarkDialog $dname }
dialog bla { size -1 -1 385 378 title "Dialog" button "positioner",1001,0 0 0 0 text "Options",1,4 3 50 17 button "add",2,208 29 54 23 button "del",3,208 55 55 23 button "O&K",4,321 344 55 23, ok button "Connect to Server",5,271 106 99 23 list 6,4 26 102 342,extsel size list 7,268 27 102 70,extsel size } on *:dialog:bla:init:*:{ mdxinit mdx SetControlMDX $dname 1001 positioner minbox > D:\Programme\mIRC\dialog.mdx mdx SetControlMDX $dname 6 TreeView haslines linesatroot hasbuttons > D:\Programme\mIRC\views.mdx mdx SetControlMDX $dname 7 ListView report noheader single grid > D:\Programme\mIRC\views.mdx did -i $dname 6 1 iconsize normal small did -i $dname 6 1 seticon normal 0, $+ C:\blabbla\g2.ico did -a $dname 6 1 1 Connect did -i $dname 6 1 cb root last 1 did -a $dname 6 2 2 Server did -i $dname 7 1 headerdims 50 did -i $dname 7 1 headertext Server did -a $dname 7 0 Server }
thx for help!
|
|
|
|
Joined: Dec 2002
Posts: 164
Vogon poet
|
Vogon poet
Joined: Dec 2002
Posts: 164 |
Read the various MDX Tutorials For scripting help goto this site. There is also a tutorial about dialogs.
DALnet: #HelpDesk, #mIRC, #MISHScript - Undernet: #mIRC, #mIRC-Scripts
|
|
|
|
Joined: Dec 2002
Posts: 12
Pikka bird
|
OP
Pikka bird
Joined: Dec 2002
Posts: 12 |
what is worong on this dialog i can add one sever not more why ?: ERROR * /goto: 'start' not found (line 25, script2.mrc)
dialog server_x { title "Add Server" size -1 -1 139 109 option dbu button "O&K", 1, 4 92 37 12, ok box "Server", 2, 1 2 137 105 button "Add Server", 3, 30 10 37 12 button "Del Server", 4, 30 24 37 12 button "Connect to server", 5, 72 61 59 12 combo 6, 72 10 60 50, sort }
on *:DIALOG:server_x:init:0: { update.server_x }
alias -l update.server_x { did -r server_x 6 set %temp.total $count(%setup.list,$chr(44)) set %temp.count 0 inc %temp.count 1 did -a server_x 6 $gettok(%setup.list,%temp.count,44) if (%temp.count < %temp.total) { goto start } }
on *:dialog:server_x:edit:*: { if ($did == 6) { set %setup.temp.channel $did(6).text } }
on *:dialog:server_x:sclick:*: { if ($did == 3) { set %setup.list %setup.list $+ %setup.temp.channel $+ , update.server_x } if ($did == 6) { set %setup.channel.selected $did($dname,6,$did(6).sel) } if ($did == 4) { set -u1 %setup.tc %setup.channel.selected $+ , set %setup.list $remove(%setup.list,%setup.tc) update.server_x } }
|
|
|
|
Joined: Dec 2002
Posts: 3,138
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,138 |
How do you expect it to goto "start" when you haven't specified where "start" is?  To specify where "start" is put ":start" in a line of your alias.
|
|
|
|
Joined: Dec 2002
Posts: 12
Pikka bird
|
OP
Pikka bird
Joined: Dec 2002
Posts: 12 |
can you complete it please ? i´m a newbie .
|
|
|
|
Joined: Dec 2002
Posts: 3,138
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,138 |
dialog server_x {
title "Add Server"
size -1 -1 139 109
option dbu
button "O&K", 1, 4 92 37 12, ok
box "Server", 2, 1 2 137 105
button "Add Server", 3, 30 10 37 12
button "Del Server", 4, 30 24 37 12
button "Connect to server", 5, 72 61 59 12
combo 6, 72 10 60 50, sort
}
on *:DIALOG:server_x:init:0: {
update.server_x
}
alias -l update.server_x {
did -r server_x 6
var %temp.count = 0
:start
inc %temp.count
if ( $gettok(%setup.list,%temp.count,44) != $null ) {
did -a server_x 6 $gettok(%setup.list,%temp.count,44)
goto start
}
}
on *:dialog:server_x:edit:*: {
if ($did == 6) {
set %setup.temp.channel $did(6).text
}
}
on *:dialog:server_x:sclick:*: {
if ($did == 3) {
set %setup.list %setup.list $+ %setup.temp.channel $+ ,
update.server_x
}
if ($did == 6) {
set %setup.channel.selected $did($dname,6,$did(6).sel)
}
if ($did == 4) {
set -u1 %setup.tc %setup.channel.selected $+ ,
set %setup.list $remove(%setup.list,%setup.tc)
update.server_x
}
} [[Edit added code tags to preserve Collective's indentation. -Hammer]]
Last edited by Hammer; 28/12/02 04:17 PM.
|
|
|
|
|