|
Joined: Apr 2005
Posts: 115
Vogon poet
|
OP
Vogon poet
Joined: Apr 2005
Posts: 115 |
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
|
|
|
|
Joined: Jan 2004
Posts: 2,081
Hoopy frood
|
Hoopy frood
Joined: Jan 2004
Posts: 2,081 |
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.
|
|
|
|
Joined: Jan 2012
Posts: 331
Pan-dimensional mouse
|
Pan-dimensional mouse
Joined: Jan 2012
Posts: 331 |
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:
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
|
|
|
|
Joined: Apr 2005
Posts: 115
Vogon poet
|
OP
Vogon poet
Joined: Apr 2005
Posts: 115 |
|
|
|
|
Joined: Jan 2004
Posts: 2,081
Hoopy frood
|
Hoopy frood
Joined: Jan 2004
Posts: 2,081 |
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.
|
|
|
|
Joined: Apr 2005
Posts: 115
Vogon poet
|
OP
Vogon poet
Joined: Apr 2005
Posts: 115 |
epic thnx friend,preciate
|
|
|
|
|