Lua:getWindow

From Cheat Engine
Jump to navigation Jump to search

Microsoft documentation


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

Example[edit]

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