Difference between revisions of "$scon"
From Scriptwiki
m |
|||
Line 17: | Line 17: | ||
This example would loop through all open server windows and echo the network name. Note that ''.network'' is the [[$network]] identifier for this special connection. You could also [[Scon|/scon]] to the connection and echo ''$network''. | This example would loop through all open server windows and echo the network name. Note that ''.network'' is the [[$network]] identifier for this special connection. You could also [[Scon|/scon]] to the connection and echo ''$network''. | ||
− | + | == See Also == | |
+ | * [[$scid]] | ||
[[Category:Multi-server]] | [[Category:Multi-server]] |
Revision as of 10:29, 2 July 2007
Returns the connection id, where N is the Nth connection.
$scon(N)[.id]
Note that if you specify N = 0, $scon returns total number of open server windows.
If you specify a property which is an identifier, it returns the value of that identifier for that connection. This also works for custom identifiers (see examples).
Note that you cannot use identifiers with brackets (e.g. $asctime(dd)). As workaround, you could make a custom alias returning this value.
Examples
var %i = 1 while ($scon(%i)) { echo -a $scon(%i).network inc %i }
This example would loop through all open server windows and echo the network name. Note that .network is the $network identifier for this special connection. You could also /scon to the connection and echo $network.