I'm posting this update for the benefit of those searching for keyword $envvar and finding this post.

What I posted above about $envvar().name seems not actually correct, and I'm having trouble finding an older mIRC version having the behavior I described behavior above.

Instead of .name treating a numeric variable name as the name of an environment variable instead of its index in the sequential list of variables, it instead returns the actual case of the variable, regardless of the string used as the parameter.

For example, $envvar(path).name returns 'Path' because that's the literal case of the existing variable name.

I have an environment variable named '7', and instead of returning '7' or the index number where '7' appears in the list of variables, $envvar(7).name and $envvar(7) both return identical string, returning the name of the 7th item in the list of environment variables.

The only way to return the contents of the variable named '7' is to loop through all the variable names looking for the index numer where $envvar(index-number) is '7', then use $envvar(index-number).value

I'm not sure whether it would break compatibility for the .name property in this case to return the index number when the parameter is numeric, or whether it's worth the bother for this edge case.

But it is great to now be able to find the timer index for $timer(12345) without needing to loop through them until finding a string match, and now instead can use $timer(12345).name