From WikiChip
$envvar Identifier - mIRC
< mirc‎ | identifiers

The $envvar identifier returns the names of Windows environment variables and their values.


Synopsis[edit]

$envvar( < name | N > )

Parameters[edit]

nameReturns the value of the named environment variable
NReturns the name of the N'th environment variable. If N=0, returns total number of variables

Properties[edit]

.nameForces return of the Name of the environment variable.
.valueForces return of the Value of the environment variable.

Same as with $timer(N), If there's an environment variable named 3, $envvar(3).value returns the value of the 3rd variable not the value of the variable named 3.

Example[edit]

//echo -a There are $envvar(0) environment variables, on the $envvar(username) account


; list of all environment variables:
//var %i 1 | while (%i isnum 1- $envvar(0) ) { echo -a %i $envvar(%i) $chr(22) $envvar(%i).value $chr(15) | inc %i }

Compatibility[edit]

Added: mIRC v7.38
Added on: 27 Nov 2014
Note: Unless otherwise stated, this was the date of original functionality.
Further enhancements may have been made in later versions.


See also[edit]