Difference between revisions of "Lua:getThreadlist"

From Cheat Engine
Jump to navigation Jump to search
m (Added related function template.)
 
Line 21: Line 21:
  
 
===Examples===
 
===Examples===
<pre>
+
<syntaxhighlight lang="lua" line>
 
local list = createStringlist()
 
local list = createStringlist()
  
Line 31: Line 31:
  
 
list.destroy()
 
list.destroy()
</pre>
+
</syntaxhighlight>
  
 
{{LuaSeeAlso}}
 
{{LuaSeeAlso}}
 +
 +
{{Threads}}

Latest revision as of 20:52, 26 June 2026

<> Lua API Reference

function getThreadlist(List) : void

Fills a List object with the thread list of the currently opened process.

The thread IDs are added to the list as hexadecimal strings using the format %x.

Function Parameters[edit]

Parameter Type Description
List List The list object that will be filled with the thread IDs of the currently opened process.

Returns[edit]

void — This function does not return any value.

Examples[edit]

1 local list = createStringlist()
2 
3 getThreadlist(list)
4 
5 for i = 0, list.Count - 1 do
6   print("Thread ID: " .. list[i])
7 end
8 
9 list.destroy()

Main Pages

Core Lua documentation entry points

Lua
Script Engine

Thread Related Lua Functions

CPU information, process threads, main-thread execution, and queued callbacks