Difference between revisions of "Lua:openProcess"
Jump to navigation
Jump to search
m (Reverted edits by 189.32.74.44 (Talk) to last revision by Dark Byte) |
m |
||
(6 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
− | '''function''' openProcess('' | + | [[Category:Lua]] |
− | '''function''' openProcess('' | + | '''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=== | ===Function Parameters=== | ||
− | {|width="85%" cellpadding="10 | + | {|width="85%" cellpadding="10%" cellspacing="0" border="0" |
!align="left"|Parameter | !align="left"|Parameter | ||
!align="left"|Type | !align="left"|Type | ||
!style="width: 80%;background-color:white;" align="left"|Description | !style="width: 80%;background-color:white;" align="left"|Description | ||
|- | |- | ||
− | | | + | |ProcessID |
+ | |Integer | ||
+ | |The ID of the process to open. | ||
+ | |- | ||
+ | |ProcessName | ||
|String | |String | ||
− | |The | + | |The name of the process to find and open (e.g., "notepad.exe"). |
− | |||
− | |||
− | |||
− | |||
|} | |} | ||
+ | ===Examples=== | ||
+ | <pre> | ||
+ | -- Open a process by name | ||
+ | openProcess("notepad.exe") | ||
+ | |||
+ | -- Open a process by ID | ||
+ | local pid = getProcessIDFromProcessName("notepad.exe") | ||
+ | if pid then | ||
+ | openProcess(pid) | ||
+ | end | ||
+ | </pre> | ||
+ | |||
+ | {{LuaSeeAlso}} | ||
− | == | + | === Related Functions === |
− | * [[Lua]] | + | * [[Lua:getProcesslist|getProcesslist]] |
+ | * [[Lua:getOpenedProcessID|getOpenedProcessID]] | ||
+ | * [[Lua:getProcessIDFromProcessName|getProcessIDFromProcessName]] | ||
+ | * [[Lua:createProcess|createProcess]] | ||
+ | * [[Lua:openFileAsProcess|openFileAsProcess]] |
Latest revision as of 15:36, 11 July 2025
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[edit]
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[edit]
-- Open a process by name openProcess("notepad.exe") -- Open a process by ID local pid = getProcessIDFromProcessName("notepad.exe") if pid then openProcess(pid) end