If the desired menuname ("menu location") is static, for example "in status and channel", use:
menu status,channel {
My menu
.nested menuitem1 : command
.nested menuitem2 : command
}
If the place where the menu shall appear may change and you want to use a variable to define it, e.g. "%menu" with data "menubar,status":
menu * {
$iif(($istok(%menu,$menu,44)),My menu)
.nested menuitem1 : command
.nested menuitem2 : command
}
If you don't want to nest any menuitems, put only the itemname in the $iff. Example:
menu status {
$iif(($status == connected),disconnect now!) : .disconnect
}
Your initial $iif($gettok($findtok()) = x) was - well - bizarre!