Lua:getProcesslist

From Cheat Engine
Revision as of 00:52, 5 December 2025 by Leunsel (talk | contribs) (Added CodeBox Template.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
<> Function

function getProcesslist(Strings OPTIONAL) : table - Strings

Returns a table with the process list (PID → name) if Strings is not set. If Strings is provided, it fills the given Strings object with the system's process list.

Format: %x - pidname

Function Parameters[edit]

Parameter Type Description
Strings Strings Optional. If provided, fills this Strings object with the process list.

Example[edit]

-- Without Strings object
local plist = getProcesslist()
for pid, name in pairs(plist) do
  print(string.format("0x%X - %s", pid, name))
end

-- Using Strings object
local strObj = Strings.create()
getProcesslist(strObj)
print(strObj:ToTable())

See also[edit]

Lua
Script Engine

Related Functions[edit]

createProcess
openProcess
onOpenProcess
getForegroundProcess
getOpenedProcessID
getProcessIDFromProcessName
openFileAsProcess
saveOpenedFile
setPointerSize
setAssemblerMode
getProcesslist
getWindowlist
pause
unpause
targetIs64Bit
enumModules
closeRemoteHandle