Skip to content
mIRC tutorials

$show

A TG007 community discussion started by X-Fusion.

Discussion 2 posts
Page 1 of 1
Open
Topic #6590 · 2 published posts · 4,390 views

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 5:12 PM by X-Fusion
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 }