mIRC Home    About    Download    Register    News    Help

Print Thread
#10333 09/02/03 12:57 PM
Joined: Dec 2002
Posts: 212
V
Fjord artisan
OP Offline
Fjord artisan
V
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
#10334 09/02/03 01:26 PM
Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
Menus as in popup menus?
Code:
menu channel {
  $iif(%var == 1,$style(1) Turn Off,Turn On):$iif(%var == 1,set %var 0,set %var 1) 
}

#10335 09/02/03 01:38 PM
Joined: Dec 2002
Posts: 212
V
Fjord artisan
OP Offline
Fjord artisan
V
Joined: Dec 2002
Posts: 212
the topic says DIALOG smile


And all I need now is intellectual intercourse, a soul to dig the hole much deeper
#10336 09/02/03 01:39 PM
Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
It does? Oh yeah, I'm in dumbass mode today...

#10337 09/02/03 03:35 PM
Joined: Jan 2003
Posts: 12
F
Pikka bird
Offline
Pikka bird
F
Joined: Jan 2003
Posts: 12
Code:
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?

#10338 10/02/03 03:24 AM
Joined: Dec 2002
Posts: 1,321
H
Hoopy frood
Offline
Hoopy frood
H
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.
Code:

  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
#10339 10/02/03 10:13 AM
Joined: Dec 2002
Posts: 212
V
Fjord artisan
OP Offline
Fjord artisan
V
Joined: Dec 2002
Posts: 212
Hammer I love you! smile
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
#10340 11/02/03 06:22 AM
Joined: Dec 2002
Posts: 1,321
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
It's from my MP3 Player dialog.


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C

Link Copied to Clipboard