mIRC Home    About    Download    Register    News    Help

Print Thread
#20975 26/04/03 04:21 PM
Joined: Apr 2003
Posts: 30
D
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Apr 2003
Posts: 30
Hello all, I'm a newbie to IRC Scripting and have a hopefully quick question, is it possible to modofy the below code to show a message as a response rather than just "Group(s) Enabled" ? I did a search on the forum to no avail frown I'm not asking anyone to write the adjustments for me, but just a tip or something would be appreciated, thanks smile

Code:
menu Channel {
  Clone Scanner $chr(91) $+ $upper($group(#c-detect)) $+ $chr(93)
  .ON:/enable #c-detect
  .-
  .OFF:/.disable #c-detect
}


Thanks very much smile

#20976 26/04/03 04:27 PM
Joined: Dec 2002
Posts: 699
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 699
Code:
menu Channel {
  Clone Scanner $+([,$upper($group(#c-detect)),])
  .ON:.enable #c-detect | echo $color(info) -a Clone Scanner is now on.
  .-
  .OFF:.disable #c-detect | echo $color(info) -a Clone Scanner is now off.
}

#20977 26/04/03 04:35 PM
Joined: Apr 2003
Posts: 30
D
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Apr 2003
Posts: 30
Thanks sooooo Much smile You seem to be answering all my questions smile Thanks again

#20978 26/04/03 04:41 PM
Joined: Apr 2003
Posts: 30
D
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Apr 2003
Posts: 30
Are the changes from:
Code:
Clone Scanner $chr(91) $+ $upper($group(#c-detect)) $+ $chr(93)


to:
Code:
Clone Scanner $+([,$upper($group(#c-detect)),])  

neccesary?

#20979 26/04/03 04:57 PM
Joined: Dec 2002
Posts: 699
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 699
No they are not neccesary, but less processing, and tidier smile

#20980 26/04/03 05:04 PM
Joined: Apr 2003
Posts: 30
D
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Apr 2003
Posts: 30
Thanks smile
I'm having one more problem, it happens occasionally, The menus appear, strange smile . the options arn't in submenu's as they shud be frown any ideas what'd cause that?

Edit: Screenshot URL: http://test.fxportal.org/SC.bmp

Last edited by DaveHope; 26/04/03 05:07 PM.
#20981 26/04/03 07:17 PM
Joined: Dec 2002
Posts: 699
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 699
Indenting the code with {TAB} will cause that.
Code:
menu channel {
  Clone Scanner $+([,$upper($group(#c-detect)),])
	.ON:.enable #c-detect | echo $color(info) -a Clone Scanner is now on.
	.-
	.OFF:.disable #c-detect | echo $color(info) -a Clone Scanner is now off.
}

#20982 26/04/03 07:21 PM
Joined: Apr 2003
Posts: 30
D
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Apr 2003
Posts: 30
Thanks, damn my attempt at neatness LOL smile

#20983 27/04/03 04:52 AM
Joined: Dec 2002
Posts: 417
O
Fjord artisan
Offline
Fjord artisan
O
Joined: Dec 2002
Posts: 417

This might streamline the code
Code:
 
Clone Scanner $+([,$upper($group(#c-detect)),])  : { if ( %c-detect == on ) { set %c-detect off | .disable #c-detect | echo $color(info) -a Clone Scanner is now off. } | else { set %c-detect on | /.enable #c-detect | echo $color(info) -a Clone Scanner is now on. } }

 




Intelligence: It's better to ask a stupid question, then to prove it by not asking....
#20984 27/04/03 09:16 AM
Joined: Apr 2003
Posts: 30
D
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Apr 2003
Posts: 30
Thanks, spaces are working just fine at the mo, and I find the code easier to understand if it's in a tabbed form (even though it's spaced smile)


Link Copied to Clipboard