Lua:getWindowProcessID

From Cheat Engine
Jump to navigation Jump to search

getWindowProcessID(windowhandle): processid - Returns the processid of the process this window belongs to

local hwnd = findWindow("WTWindow", "Game")
local processID,threadID = getWindowProcessID(hwnd)
print(processID, threadID)