Any

Theoretically, at the root of AutoHotkey's type hierarchy lies the "Any" type. All other types are a sub-type of Any, except ComObject (which is excluded from further consideration on this page). Currently the Any type exists only as a prototype object which sits at the end of every value's chain of base objects. For further details, see Primitive Values.

The Any prototype object defines methods and properties that are applicable to all values and objects unless overridden. The prototype object itself is natively an Object, but has no base and therefore does not identify as an instance of Object.

Methods:

Properties:

Functions:

Methods

GetMethod

Retrieves the implementation function of a method.

Value.GetMethod(Name)

This method is exactly equivalent to GetMethod(Value, Name), unless overridden.

HasBase

Returns true if BaseObj is in Value's chain of base objects, otherwise false.

Value.HasBase(BaseObj)

This method is exactly equivalent to HasBase(Value, BaseObj), unless overridden.

HasMethod

Returns true if the value has a method by this name, otherwise false.

Value.HasMethod(Name)

This method is exactly equivalent to HasMethod(Value, Name), unless overridden.

HasProp

Returns true if the value has a property by this name, otherwise false.

Value.HasProp(Name)

This method is exactly equivalent to HasProp(Value, Name), unless overridden.

Properties

Base

Retrieves the value's base object.

BaseObj := Value.Base

For primitive values, the return value is the pre-defined prototype object corresponding to Type(Value).

See also: ObjGetBase, ObjSetBase, Obj.Base

Functions

ObjGetBase

Returns the value's base object.

BaseObj := ObjGetBase(Value)

No meta-functions or property functions are called. Overriding the Base property does not affect the behaviour of this function.

If there is no base, the return value is an empty string. Only COM objects and the Any prototype itself have no base.

See also: Base, ObjSetBase, Obj.Base