Alias

Convert a local variable to an alias to represent a different variable for example in another thread.

Alias VariableOrName, VariableOrPointer
Function Example: Alias("MyVar", VariableOrPointer)

Parameters

VariableOrName

The name of Variable to convert to alias or the variable itself.

VariableOrPointer

A variable or a pointer to the variable to refer to.

Example

var:="Hello World!"
Alias(refvar, var)
MsgBox % refvar
refvar:="AutoHotkey"
MsgBox % var

; Same example using variable pointer
var:="Hello World!"
Alias(refvar, getvar(var))
MsgBox % refvar
refvar:="AutoHotkey"
MsgBox % var