|
|
Joined: Dec 2002
Posts: 212
Fjord artisan
|
OP
Fjord artisan
Joined: Dec 2002
Posts: 212 |
blabla how can i create DYNAMIC menus? I just want to move $style(1) from one menu item to another depending on the selection The only possible way (at least the only I can think of) involves variables for all the items, and this suks I can't use $iif in menu definition, I can't rename menu item, i can't do that, and the other thing also blabla I wonder can it be even more restrictive ;b if anyone can help I'll be very thankfull
And all I need now is intellectual intercourse, a soul to dig the hole much deeper
|
|
|
|
Joined: Dec 2002
Posts: 3,138
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,138 |
Menus as in popup menus?
menu channel {
$iif(%var == 1,$style(1) Turn Off,Turn On):$iif(%var == 1,set %var 0,set %var 1)
}
|
|
|
|
Joined: Dec 2002
Posts: 212
Fjord artisan
|
OP
Fjord artisan
Joined: Dec 2002
Posts: 212 |
the topic says DIALOG
And all I need now is intellectual intercourse, a soul to dig the hole much deeper
|
|
|
|
Joined: Dec 2002
Posts: 3,138
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,138 |
It does? Oh yeah, I'm in dumbass mode today...
|
|
|
|
Joined: Jan 2003
Posts: 12
Pikka bird
|
Pikka bird
Joined: Jan 2003
Posts: 12 |
dialog test {
title "mIRC"
size -1 -1 110 100
option dbu
menu "&File", 60
item %menu1, 70
item break, 180
item "Save && &exit", 190, ok
item "&Cancel", 200, cancel
}
on *:dialog:test:menu:70:{
if ( %menu1 == on ) /set %menu1 off
else /set %menu1 on
} open dialog and click "File / (empty space)" then close dialog. open again and see "File/off" try again and changed to "on". u mean this?
|
|
|
|
Joined: Dec 2002
Posts: 1,321
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,321 |
Dialog menus aren't dynamic in the same way that popup menu labels are. In order to get the check mark beside the dialog menu item, you have to /did -c $dname ID it, and /did -u $dname ID to uncheck it. You do this when you :init: the dialog or when something in your script changes to enable/disable that menu item. Here is an example of the Pause function from my MP3 Player dialog.
check "Pause", 1054, 32 18 23 11, push
item "&Pause", 1016, 1014
; Pause
;
on *:DIALOG:dMP3Player:menu:1016: dMP3Player.Pause
on *:DIALOG:dMP3Player:sclick:1054: dMP3Player.Pause
alias dMP3Player.Pause {
if (($insong) && ($group(#MP3.Paused).status == on)) {
.disable #MP3.Paused
if (!$1) .splay resume
did -u $dname 1016,1054
}
else {
.enable #MP3.Paused
if (!$1) .splay pause
did -c $dname 1016,1054
}
}
DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C
|
|
|
|
Joined: Dec 2002
Posts: 212
Fjord artisan
|
OP
Fjord artisan
Joined: Dec 2002
Posts: 212 |
Hammer I love you! but where did you dig this from? I can't find in anywhere in the help file
And all I need now is intellectual intercourse, a soul to dig the hole much deeper
|
|
|
|
Joined: Dec 2002
Posts: 1,321
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,321 |
It's from my MP3 Player dialog.
DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C
|
|
|
|
|
|