mIRC Home    About    Download    Register    News    Help

Print Thread
complete dialog #3679 27/12/02 08:43 PM
Joined: Dec 2002
Posts: 12
G
Gravity Offline OP
Pikka bird
OP Offline
Pikka bird
G
Joined: Dec 2002
Posts: 12
hi
i have make a mdx dialog im 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!

Re: complete dialog #3680 28/12/02 07:45 AM
Joined: Dec 2002
Posts: 164
M
Merlin Offline
Vogon poet
Offline
Vogon poet
M
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
Re: complete dialog #3681 28/12/02 09:30 AM
Joined: Dec 2002
Posts: 12
G
Gravity Offline OP
Pikka bird
OP Offline
Pikka bird
G
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
}
}

Re: complete dialog #3682 28/12/02 09:34 AM
Joined: Dec 2002
Posts: 3,138
C
Collective Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
How do you expect it to goto "start" when you haven't specified where "start" is? smile To specify where "start" is put ":start" in a line of your alias.

Re: complete dialog #3683 28/12/02 09:47 AM
Joined: Dec 2002
Posts: 12
G
Gravity Offline OP
Pikka bird
OP Offline
Pikka bird
G
Joined: Dec 2002
Posts: 12
can you complete it please ?
im a newbie .

Re: complete dialog #3684 28/12/02 10:25 AM
Joined: Dec 2002
Posts: 3,138
C
Collective Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
Code:

dialog server_x {
  title "Add Server"
  size -1 -1 139 109
  option dbu
  button "O&amp;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.