Using $show

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.
All content is copyright by mircscripts.org and cannot be used without permission. For more details, click here.