Lua:openProcess

From Cheat Engine
Revision as of 15:36, 11 July 2025 by Leunsel (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

function openProcess(ProcessID) function openProcess(ProcessName)

Opens the specified process in Cheat Engine, either by process ID or by process name. This sets the target process for memory editing and scanning.

Function Parameters

Parameter Type Description
ProcessID Integer The ID of the process to open.
ProcessName String The name of the process to find and open (e.g., "notepad.exe").

Examples

-- Open a process by name
openProcess("notepad.exe")

-- Open a process by ID
local pid = getProcessIDFromProcessName("notepad.exe")
if pid then
  openProcess(pid)
end

See also

Related Functions