Guest X-Fusion Posted May 9, 2006 Report Share Posted May 9, 2006 (edited) Contributed by Sabby This small tutorial assumes that you know general scripting knowledge. This is to teach you how to use a technique, not script. Have you ever wondered how when you type /channel mIRC echo's in your currently active window: * Retrieving #MsR info... And when you type /.channel It doesn't echo the information? This is done by using $show Using $show Not many people know about $show and half of them use it. Though using $show, in my opinion makes your scripts/addons more professional. When using $show it returns either $true if the user uses /command and $false if the user uses /.command If you did not know the dot(.) is used to silent the command. Now let me give you an example: ( the following examples should be placed in Remotes (Alt+R) ) alias channel2 { if ($show) { echo -a * Retrieving $chan info... } channel } This alias is kind of like the mIRC alias for /channel. As you can see if you used /channel2 it would echo in your active channel * Retrieving #Channel info... But if you used /.channel2 it wouldn't shouw the * Retrieving #Channel info... You can also use !$show, for example: alias channel3 { if ($show) || (!$show) { echo -a * Retrieving $chan info... } channel } Now this alias is kind of like the alias before, but this alias will always show * Retrieving #Channel info.... !$show is if they use /.channel3, the ! represents if it is $null, and if you didn't know the || represents or. Edited May 9, 2006 by X-Fusion Link to comment Share on other sites More sharing options...
Guest Travis Posted February 11, 2009 Report Share Posted February 11, 2009 alias channel3 { if ($show) || (!$show) { echo -a * Retrieving $chan info... } channel } I guess it was for demonstration purposes, but for this you wouldn't write either $show or !$show. You would simply say: alias channel3 { echo -a * Retrieving $chan info... | channel } Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now