m |
m |
||
Line 1: | Line 1: | ||
− | '''$scon''' allows you to get the server id for a connection, or specific details regarding the properties of a certain connection id. | + | '''$scon''' allows you to get the server id for a connection, or specific details regarding the properties of a certain connection id. It is important to note that unlike [[$scid identifier - mIRC|$scid]], '''$scon''' works on the Nth connection, not the actual connection ID. |
== Synopsis == | == Synopsis == | ||
Line 14: | Line 14: | ||
<source lang="mIRC">//echo -a $scon(0)</source> | <source lang="mIRC">//echo -a $scon(0)</source> | ||
− | '''Use the optional identifier-supported property to echo the server name of connection | + | '''Use the optional identifier-supported property to echo the server name of connection number 1 to the active window''' |
<source lang="mIRC">//echo -a $scon(1).server</source> | <source lang="mIRC">//echo -a $scon(1).server</source> | ||
− | '''Use the optional identifier-supported property to echo the network name of connection | + | '''Use the optional identifier-supported property to echo the network name of connection number 4 to the active window''' |
− | <source lang="mIRC">//echo -a $scon( | + | <source lang="mIRC">//echo -a $scon(4).network</source> |
== Compatibility == | == Compatibility == |
Revision as of 17:33, 23 June 2014
$scon allows you to get the server id for a connection, or specific details regarding the properties of a certain connection id. It is important to note that unlike $scid, $scon works on the Nth connection, not the actual connection ID.
Synopsis
$scon(N)[.property]
Parameters
NReturns the connection ID for the Nth connection. If you specify N as 0, the total number of connections is returned.
Properties
[.property]If you specify a compatible identifier here, mIRC will provide you with that specific identifier property for the connection id parameter you've passed. See the examples below for more details.
Example
Echo the total number of connections to the active window
//echo -a $scon(0)
Use the optional identifier-supported property to echo the server name of connection number 1 to the active window
//echo -a $scon(1).server
Use the optional identifier-supported property to echo the network name of connection number 4 to the active window
//echo -a $scon(4).network
Compatibility
Added: mIRC v6.0
Added On: 03/02/2002