mIRC Homepage
Posted By: andymps dialog problems - 09/07/03 08:49 AM
dialog Mp3_dialog {
size -1 -1 298 415
title "Andys Mp3s"
list 1,21 21 252 234,vsbar size
button "Play",2,31 314 60 30
button "Stop",3,112 314 60 30
box "Mp3 Dir",4,31 268 235 35
button "Change Dir",5,191 315 60 30
}
on *:dialog:Mp3_dialog:init:*:{
$findfile(%mp3dir,*.mp3,0,didtok Mp3_dialog 1 32 $nopath($1-))
}
in that dialog with every space and - in the mp3's listed it goes to the next line, how do i stop that
Posted By: SladeKraven Re: dialog problems - 09/07/03 09:47 AM
Try
Code:
dialog Mp3_dialog {
  size -1 -1 298 415
  title "Andys Mp3s"
  list 1, 21 21 252 234,vsbar size 
  button "Play",2,31 314 60 30
  button "Stop",3,112 314 60 30
  box "Mp3 Dir",4,31 268 235 35
  button "Change Dir",5,191 315 60 30
}

on *:dialog:Mp3_dialog:init:*:{
  $findfile(%mp3dir,*.mp3,0,did -a Mp3_dialog 1 $nopath($1-))
}
Posted By: andymps Re: dialog problems - 09/07/03 09:52 AM
Hey it works, thanx, also
on *:dialog:Mp3_dialog:sclick:2:{
.splay $did(Mp3_dialog,1).sel
}
that doesnt work,* /splay: invalid parameters (line 14, mp3.txt)
do u know why?
Posted By: SladeKraven Re: dialog problems - 09/07/03 10:00 AM
$did(1,$did(1).sel)
Posted By: andymps Re: dialog problems - 09/07/03 10:01 AM

Thanx again smile
Posted By: SladeKraven Re: dialog problems - 09/07/03 10:02 AM
You're welcome. grin
Posted By: andymps Re: dialog problems - 09/07/03 10:13 AM
how do u get it to write into a box, when i try it it just writes the title from mp3 Dir to what even i tell it to, instead of it going in the box
Posted By: SladeKraven Re: dialog problems - 09/07/03 10:19 AM
I am not following you.
Do you mean /did -a Mp3_Dialog [id] [whatever] ?
Posted By: andymps Re: dialog problems - 09/07/03 10:40 AM
box "Mp3 Dir",4,31 268 235 35
i did with that:
/did -a Mp3_dialog 4 %mp3dir
and it wont display it
Posted By: SladeKraven Re: dialog problems - 09/07/03 10:44 AM
Try
Code:
on *:dialog:mp3_dialog:init:*: {
  if (%mp3dir == $null) { did -a mp3_dialog 4 Mp3 Directory }
  else { did -a mp3_dialog 4 %mp3dir }
}
Posted By: andymps Re: dialog problems - 09/07/03 10:56 AM
its is this:
Code:
on *:dialog:Mp3_dialog:init:*:{
  return $findfile(%mp3dir,*.mp3,0,did -a Mp3_dialog 1 $nopath($1-))
  did -a Mp3_dialog 4 %mp3dir
}
Posted By: ScatMan Re: dialog problems - 09/07/03 11:10 AM
on *:dialog:Mp3_dialog:init:*:{
var %x = $findfile(%mp3dir,*.mp3,0,did -a Mp3_dialog 1 $nopath($1-))
did -a Mp3_dialog 4 %mp3dir
}

since return halts the command
Posted By: andymps Re: dialog problems - 09/07/03 11:19 AM
ok but now it has the bit at the top, not in the box, like
----somethin here--------
and then the rest of the box
that somethin here shoudl be Mp3 Dir and the dir in the box
Posted By: SladeKraven Re: dialog problems - 09/07/03 11:23 AM
It is a box therefore it would show "something here" at the top. If you want to have the dir in the middle of the box just use a text label.
Posted By: andymps Re: dialog problems - 09/07/03 11:26 AM
how do i do that?
Posted By: SladeKraven Re: dialog problems - 09/07/03 12:11 PM
Code:
dialog Mp3_dialog {  
  size -1 -1 298 415  
  title "Andys Mp3s"  
  list 1, 21 21 252 234,vsbar size   
  button "Play",2,31 314 60 30  
  button "Stop",3,112 314 60 30  
  box "Mp3 Dir",4,31 268 235 35  
  button "Change Dir",5,191 315 60 30
  text "", 6, 36 282 191 11
}

on *:dialog:Mp3_dialog:init:*: { 
 $findfile(%mp3dir,*.mp3,0,did -a Mp3_dialog 1 $nopath($1-)) 
 did -a Mp3_dialog 6 %mp3dir
}

Try that.
© mIRC Discussion Forums