From WikiChip
Difference between revisions of "mirc/identifiers/$envvar"
< mirc‎ | identifiers

(Created content for empty page)
 
m
 
Line 1: Line 1:
{{mirc title|$compress Identifier}}
+
{{mirc title|$envvar Identifier}}
 
The '''$envvar''' identifier returns the names of Windows environment variables and their values.
 
The '''$envvar''' identifier returns the names of Windows environment variables and their values.
 +
  
 
== Synopsis ==
 
== Synopsis ==
Line 34: Line 35:
 
* {{mIRC|$sysdir}}
 
* {{mIRC|$sysdir}}
  
[[Category:MIRC identifiers]]
+
[[Category:mIRC identifiers|envvar]]

Latest revision as of 14:04, 20 September 2017

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]