Lua:getWindow

From Cheat Engine
Revision as of 08:05, 9 July 2023 by Kagato1980 (talk | contribs) (add example)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Microsoft docucumentation


HWND GetWindow(
 [in] HWND hWnd,
 [in] UINT uCmd
);

Example

Start Cheat Engine and open a Memory Viewer, then go to the Lua Engine and execute this:

local hwnd = findWindow(null, "Lua Engine")
local memViewer = getWindow(hwnd, GW_HWNDNEXT)
local childCaption = getWindowCaption(memViewer)
print(hwnd, memViewer, childCaption)

Output should be like this:

1835872 328890 Memory Viewer