int id(id [window] [flags])
id - child window id. Integer. You can see it in QM status bar.
window - parent window. If omitted - active window. The function searches only in the first found matching window.
flags: 1 - search only direct children. Default: 0.
Finds a child window in the specified window, and returns its handle. Returns 0 if not found. Error if parent window does not exist.
Unlike child, at first searches direct children and does not prefer visible children.
The function is often used in dialogs, to get control handles. Also can be used with any windows.
Window id, differently than handle, usually is set by the software developer and does not change at run time. It usually is a value between 0 and 65535. A window can have more than one child window with same id. Often such child windows don't receive user input, or they are children of other children. Sometimes id may be set at run time and it may be a random value (usually then it is not in the range 0 - 65535).
int h = id(15 "Notepad") act id(306 "Calculator")