mIRC Homepage
Posted By: XGamerAMD List of channels - 07/04/23 10:46 AM
dialog canales {
title "New Project"
size -1 -1 87 138
option dbu
combo 1, 6 3 75 119, size
button "Button", 2, 9 122 10 12
button "Button", 3, 23 122 10 12
button "Button", 4, 39 123 37 12
}


alias canales1 {
if !$dialog(canales) { dialog -m canales canales }
window -h "Channels List"
}

raw *:*:{
if $Numeric = 322 { set %lcanales $2 | canales | did -a new_table 1 %lcanales | halt }
}

what i do wrong? ,thnx
Posted By: maroon Re: List of channels - 07/04/23 07:46 PM
When asking for help, it helps to have done a little extra work first:

1. Look in Options menu of scripts editor, and make sure that "identifier warning" is checked, so you get an error in status window instead of using $null
2. Please describe what the script should do, and give an example of what we should do to trigger the problem. i.e. is it doing something it should not do, or is not doing something it should do?
3. If there are not any error messages, please say that.
4. Please include enough of the script. In this example, your example calls the "canales" alias but you did not include it. Either your status window is filled with warnings that canales is an unknown command, or you did not include it.
5. If you can put your script inside the "code" and "/code" block, that makes it easier to read it. You can find it in the "#" icon above where you type your post.

Assuming that you had a typo mistake, I changed your raw event to call canales1 instead, but that still does not work, because it assumes there is a dialog named new_table but you did not include anything for this at all. Assuming this is another typo, I changed "new_table" to the name of your dialog "canales" and everything seems to be ok. However, I doubt that this is intended, because repeating the /list command would keep adding extra rows to the dialog without removing the existing list.
Posted By: Epic Re: List of channels - 08/04/23 07:42 AM
If I understood your idea properly from the provided code snippet and with such a meager explanation, then you can try using this corrected code:
Code
alias chanlist {
  if ($dialog(my_chanlist)) { .dialog -x my_chanlist | halt }
  .dialog -mo my_chanlist my_chanlist | list | .window -h "Channels List"
}
dialog -l my_chanlist {
  title "My Channels List"
  size -1 -1 220 300
  option pixels
  combo 1, 6 4 208 260, sort, size
  button "Button1", 2, 11 268 62 25
  button "Button2", 3, 79 268 62 25
  button "Button3", 4, 147 268 62 25
}
raw *:*:{
  if ($istok(321 323,$numeric,32)) { haltdef }
  if ($numeric == 322) { .did -a my_chanlist 1 $2 $+($chr(40),$3,$chr(41)) | haltdef }
}
on *:DIALOG:my_chanlist:sclick:2: echo -a You pressed $did($dname,$did).text
on *:DIALOG:my_chanlist:sclick:3: echo -a You pressed $did($dname,$did).text
on *:DIALOG:my_chanlist:sclick:4: echo -a You pressed $did($dname,$did).text
Posted By: XGamerAMD Re: List of channels - 08/04/23 07:42 AM
ok how i do?
Posted By: maroon Re: List of channels - 08/04/23 10:05 AM
how do you what? I said several things. As you can see, Epic also had trouble understanding what you need, and most people will not try to spend effort based on a guess, because if the guess is wrong then they create the wrong code that is useless to the one asking.
Posted By: XGamerAMD Re: List of channels - 08/04/23 10:22 PM
epic thnx friend,preciate
© mIRC Discussion Forums