Difference between revisions of "Lua:openProcess"

From Cheat Engine
Jump to navigation Jump to search
(Function Parameters)
m
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
'''function''' openProcess(''processname'')<br>
+
[[Category:Lua]]
'''function''' openProcess(''processid'')
+
'''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===
 +
{|width="85%" cellpadding="10%" cellspacing="0" border="0"
 +
!align="left"|Parameter
 +
!align="left"|Type
 +
!style="width: 80%;background-color:white;" align="left"|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").
 +
|}
  
Causes cheat engine to open the provided processname or processid.
+
===Examples===
 +
<pre>
 +
-- Open a process by name
 +
openProcess("notepad.exe")
  
Please note that if you provide an integer in the form of a string openProcess will look for a process that has as name the specified number. Provide an integer if you wish to specify the PID.
+
-- Open a process by ID
 +
local pid = getProcessIDFromProcessName("notepad.exe")
 +
if pid then
 +
  openProcess(pid)
 +
end
 +
</pre>
  
Example:
+
{{LuaSeeAlso}}
  openProcess("game.exe")
 
  openProcess(7890)
 
  openProcess(tonumber("7890"))
 
  
 
+
=== Related Functions ===
Hey Kyle, I have a fully semantic site i cretead for SharePoint and was wondering if you had any thoughts on how to make the content area div flex out for content? Sometimes list columns force the content to pop out, to which I added an auto overflow. Auto overflow for SP lists have some really gnarly results however. display: table cell doesn't work in IE, the only  compatible browser Works great for sites where I can predict the content width, but horrible when list content stretches horizontally.It's just such a nice clean base semantic SP master and css with minimally styled content placeholders that I can reuse from client to client I'd hate to have to throw it away and start again with a tabled design.Thanks, RebeccaPosted by Rebecca on December 8, 2008 at 5:35 pm.
+
* [[Lua:getProcesslist|getProcesslist]]
 
+
* [[Lua:getOpenedProcessID|getOpenedProcessID]]
== See also ==
+
* [[Lua:getProcessIDFromProcessName|getProcessIDFromProcessName]]
* [[Lua]]
+
* [[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

See also[edit]

Related Functions[edit]