mIRC Home    About    Download    Register    News    Help

Print Thread
#187191 01/10/07 07:27 AM
Joined: Mar 2007
Posts: 139
S
Solo1 Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Mar 2007
Posts: 139
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 

Joined: Feb 2005
Posts: 342
R
Fjord artisan
Offline
Fjord artisan
R
Joined: Feb 2005
Posts: 342
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 }

Rand #187198 01/10/07 08:43 AM
Joined: Mar 2007
Posts: 139
S
Solo1 Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Mar 2007
Posts: 139
Thanks, it works really well and exactly what i needed.

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
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* ^^
} 



Link Copied to Clipboard