mIRC Homepage
Posted By: Solo1 Interactive menu's - 01/10/07 07:27 AM
How would i code the below to make interactive menus using $iif any help would be appreciated

Code:
 ..Turn on script: .enable #script | echo -a Script on 
  ..Turn off script: .disable #script | echo -a Script OFF 
Posted By: Rand Re: Interactive menu's - 01/10/07 08:19 AM
Just a small example:

Code:
menu status {
  $iif($gison(#TestGroup),Turn group off) :.disable #TestGroup
  $iif(!$gison(#TestGroup),Turn group on) :.enable #TestGroup

  $iif($gison(#TestGroup),$style(1) TEST,$style(2) TEST)
  .Yep - the group is on://echo 4 -a *tada* ^^
} 


alias gison { if ($group($1) == on) { return $true } | return $false }
Posted By: Solo1 Re: Interactive menu's - 01/10/07 08:43 AM
Thanks, it works really well and exactly what i needed.
Posted By: RusselB Re: Interactive menu's - 01/10/07 09:26 PM
An alternative suggestion/re-write
Code:
menu status {
  Turn Group $iif($group(#TestGroup) == on,off,on) : $iif($ifmatchj,.disable,.enable) #TestGroup
  $iif($group(#TestGroup) == on,$style(1) TEST,$style(2) TEST)
  .Yep - the group is on://echo 4 -a *tada* ^^
} 

© mIRC Discussion Forums