Have been working on making a class and came across another very important thing I use very often in classes, but apparently cannot be done in AutoHotKey. That is method overloading. This is where you have two or more methods with the same name, just different parameters. For example, here are two methods with the same name, but different parameters, rather, one has an additional parameter (I omitted the entire class definition, as only method overloading is of concern):
Code: Select all
GetDesc(Item, default := "")
{
; <some code>
}
GetDesc(Item, default := "", ByRef found)
{
; <some code>
}