mIRC Home    About    Download    Register    News    Help

Print Thread
#110373 06/02/05 06:45 PM
Joined: Aug 2004
Posts: 423
C
Fjord artisan
OP Offline
Fjord artisan
C
Joined: Aug 2004
Posts: 423
hello again,

i seem to be having a brain fart on this, since this is like mirc 101..
but, i can't remember how to have it, in a popup menu to have a sub item appear only if a condition is satisfied..

example:

menu menubar,status,channel {
Test System
.test $chr(9) $iif($group(#test) == on, On, Off): $iif($group(#test) == on, .disable, .enable) #test
..Test2:testdisabled
.Unload Test:TestUnload
}

i trying to have it so test2 is only available when test is enabled..

how is this done, again??

thanks in advance

#110374 06/02/05 06:51 PM
Joined: Oct 2004
Posts: 38
S
Ameglian cow
Offline
Ameglian cow
S
Joined: Oct 2004
Posts: 38
menu status {
$submenu($test($1))
}
alias test {
if ($1 == begin) { return - }
if (($1 != begin) && ($1 != end)) {
if (%show == yes) { return blablabla:/any_command }
else { return blablabla2:/any_command2 }
}
if ($1 == end) { return - }
}


I hope this will help you.

#110375 06/02/05 08:38 PM
Joined: Aug 2004
Posts: 423
C
Fjord artisan
OP Offline
Fjord artisan
C
Joined: Aug 2004
Posts: 423
thanks

$submenu might be what i'm looking for.... not quite sure i follow the rest of your example code though.. lol

#110376 06/02/05 09:20 PM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Code:
menu menubar,status,channel {
  Test System
  .test $chr(9) $iif($group(#test) == on, On, Off): $iif($group(#test) == on, .disable, .enable) #test
  ..$iif($group(#test) == on,Test2) : testdisabled
  .Unload Test:TestUnload
}


just dont display the option if its not allowed and it doesnt appear

#110377 06/02/05 10:28 PM
Joined: Aug 2004
Posts: 423
C
Fjord artisan
OP Offline
Fjord artisan
C
Joined: Aug 2004
Posts: 423
i see..

i've been doing ..$iif($group(#test) == on),Test2 : testdisabled.. ..$iif($group(#test) == on) Test2 : testdisabled .. ect.....

thanks davec


Link Copied to Clipboard