__Item
Retrieves the GuiControl object associated with the specified name, text, ClassNN or HWND.
GuiCtrlObj := Gui[Name]
One of Gui.Add options parameters is this:
V: Sets the control's Name. Specify the name immediately after the letter V, which is not included in the name. For example, specifying vMyEdit would name the control "MyEdit".
So in my code I use it like this:
Code: Select all
myGui.Add("Text", "vctrlName", "X")
EDIT: It works correctly, as @swagfag explained below.