Difference between revisions of "Lua"
(→Globals) |
m (Fixed a typo.) |
||
| (26 intermediate revisions by 11 users not shown) | |||
| Line 1: | Line 1: | ||
<!-- Updated to 6.7 celua.text TheyCallMeTim13 --> | <!-- Updated to 6.7 celua.text TheyCallMeTim13 --> | ||
| + | <!-- Updated to 7.5 celua.text Leunsel --> | ||
| + | <!-- This page uses Template:LuaIndexBox and Template:LuaIndexItem for repeated reference lists now. --> | ||
[[Category:Lua]] | [[Category:Lua]] | ||
| − | + | {{NeedWork}} | |
| + | <div style="background:#F7FBFF; width: fit-content; border:1px solid #4A90E2; border-left:6px solid #4A90E2; padding:0.8em 0.95em; margin:0.8em 0;"> | ||
| + | <span style="font-size:1.35em; font-weight:bold; color:#1F4E79;">Cheat Engine Lua API Index</span><br> | ||
| + | A task-oriented reference index for Cheat Engine's Lua functions, classes, globals, and scripting helpers. | ||
| + | </div> | ||
| − | + | Cheat Engine exposes an extensive Lua API for cheat tables, trainers, and standalone scripts. This page is a task-oriented index: choose the area you are working in, then follow a function link for its detailed reference. | |
| − | + | __TOC__ | |
| − | |||
| − | |||
| − | |||
| − | |||
== Variables == | == Variables == | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | = | + | === Globals === |
| + | <div style="border:1px solid #4A90E2; background:#F7FBFF; margin:0.8em 0; font-family:monospace; max-width:1100px;"> | ||
| + | <div style="background:#E8F2FF; color:#1F4E79; font-weight:bold; padding:0.5em 0.75em; border-bottom:1px solid #4A90E2;"> | ||
| + | Global Variables | ||
| + | </div> | ||
| + | <div style="display:flex; background:#F0F6FF; color:#1F4E79; font-weight:bold; border-bottom:1px solid #C7DDF7;"> | ||
| + | <div style="flex:0 0 26%; min-width:190px; padding:0.35em 0.65em;">Name</div> | ||
| + | <div style="flex:0 0 18%; min-width:120px; padding:0.35em 0.65em; border-left:1px solid #DCEBFF;">Type</div> | ||
| + | <div style="flex:1; padding:0.35em 0.65em; border-left:1px solid #DCEBFF;">Description</div> | ||
| + | </div> | ||
| + | <div style="display:flex; border-bottom:1px solid #E2EEF9;"> | ||
| + | <div style="flex:0 0 26%; min-width:190px; padding:0.35em 0.65em; font-weight:bold; overflow-wrap:anywhere;">[[Lua:TrainerOrigin|TrainerOrigin]]</div> | ||
| + | <div style="flex:0 0 18%; min-width:120px; padding:0.35em 0.65em; border-left:1px solid #E2EEF9;">string</div> | ||
| + | <div style="flex:1; padding:0.35em 0.65em; border-left:1px solid #E2EEF9; line-height:1.55;">Path of the trainer that launched Cheat Engine. Only set when Cheat Engine was launched as a trainer.</div> | ||
| + | </div> | ||
| + | <div style="display:flex; border-bottom:1px solid #E2EEF9;"> | ||
| + | <div style="flex:0 0 26%; min-width:190px; padding:0.35em 0.65em; font-weight:bold; overflow-wrap:anywhere;">[[Lua:process|process]]</div> | ||
| + | <div style="flex:0 0 18%; min-width:120px; padding:0.35em 0.65em; border-left:1px solid #E2EEF9;">string</div> | ||
| + | <div style="flex:1; padding:0.35em 0.65em; border-left:1px solid #E2EEF9; line-height:1.55;">Main module name of the currently opened process (e.g. <code>mygame.exe</code> or module name).</div> | ||
| + | </div> | ||
| + | <div style="display:flex; border-bottom:1px solid #E2EEF9;"> | ||
| + | <div style="flex:0 0 26%; min-width:190px; padding:0.35em 0.65em; font-weight:bold; overflow-wrap:anywhere;">[[Lua:MainForm|MainForm]]</div> | ||
| + | <div style="flex:0 0 18%; min-width:120px; padding:0.35em 0.65em; border-left:1px solid #E2EEF9;">object</div> | ||
| + | <div style="flex:1; padding:0.35em 0.65em; border-left:1px solid #E2EEF9; line-height:1.55;">The main Cheat Engine GUI form object.</div> | ||
| + | </div> | ||
| + | <div style="display:flex; border-bottom:1px solid #E2EEF9;"> | ||
| + | <div style="flex:0 0 26%; min-width:190px; padding:0.35em 0.65em; font-weight:bold; overflow-wrap:anywhere;">[[Lua:AddressList|AddressList]]</div> | ||
| + | <div style="flex:0 0 18%; min-width:120px; padding:0.35em 0.65em; border-left:1px solid #E2EEF9;">object</div> | ||
| + | <div style="flex:1; padding:0.35em 0.65em; border-left:1px solid #E2EEF9; line-height:1.55;">The address list object of the main Cheat Engine GUI (cheat table address list).</div> | ||
| + | </div> | ||
| + | </div> | ||
| − | == | + | === CPU / Debug Variables (Registers) === |
| − | + | <div style="border:1px solid #4A90E2; background:#F7FBFF; margin:0.8em 0; font-family:monospace; max-width:1100px;"> | |
| + | <div style="background:#E8F2FF; color:#1F4E79; font-weight:bold; padding:0.5em 0.75em; border-bottom:1px solid #4A90E2;"> | ||
| + | CPU / Debug Variables | ||
| + | </div> | ||
| + | <div style="display:flex; background:#F0F6FF; color:#1F4E79; font-weight:bold; border-bottom:1px solid #C7DDF7;"> | ||
| + | <div style="flex:0 0 26%; min-width:190px; padding:0.35em 0.65em;">Register / Variable</div> | ||
| + | <div style="flex:0 0 18%; min-width:120px; padding:0.35em 0.65em; border-left:1px solid #DCEBFF;">Architecture</div> | ||
| + | <div style="flex:1; padding:0.35em 0.65em; border-left:1px solid #DCEBFF;">Description</div> | ||
| + | </div> | ||
| + | <div style="display:flex; border-bottom:1px solid #E2EEF9;"> | ||
| + | <div style="flex:0 0 26%; min-width:190px; padding:0.35em 0.65em; font-weight:bold; overflow-wrap:anywhere;">EFLAGS</div> | ||
| + | <div style="flex:0 0 18%; min-width:120px; padding:0.35em 0.65em; border-left:1px solid #E2EEF9;">32/64-bit</div> | ||
| + | <div style="flex:1; padding:0.35em 0.65em; border-left:1px solid #E2EEF9; line-height:1.55;">CPU flags register value available in the debug context.</div> | ||
| + | </div> | ||
| + | <div style="display:flex; border-bottom:1px solid #E2EEF9;"> | ||
| + | <div style="flex:0 0 26%; min-width:190px; padding:0.35em 0.65em; font-weight:bold; overflow-wrap:anywhere;">EAX, EBX, ECX, EDX, EDI, ESI, EBP, ESP, EIP</div> | ||
| + | <div style="flex:0 0 18%; min-width:120px; padding:0.35em 0.65em; border-left:1px solid #E2EEF9;">32/64-bit</div> | ||
| + | <div style="flex:1; padding:0.35em 0.65em; border-left:1px solid #E2EEF9; line-height:1.55;">Standard 32-bit register values (present when debugging 32-bit contexts or in compatible views).</div> | ||
| + | </div> | ||
| + | <div style="display:flex; border-bottom:1px solid #E2EEF9;"> | ||
| + | <div style="flex:0 0 26%; min-width:190px; padding:0.35em 0.65em; font-weight:bold; overflow-wrap:anywhere;">RAX, RBX, RCX, RDX, RDI, RSI, RBP, RSP, RIP, R8, R9, R10, R11, R12, R13, R14, R15</div> | ||
| + | <div style="flex:0 0 18%; min-width:120px; padding:0.35em 0.65em; border-left:1px solid #E2EEF9;">64-bit only</div> | ||
| + | <div style="flex:1; padding:0.35em 0.65em; border-left:1px solid #E2EEF9; line-height:1.55;">64-bit register values available in 64-bit debug contexts.</div> | ||
| + | </div> | ||
| + | </div> | ||
| − | + | == Functions == | |
| − | |||
| − | |||
| − | |||
| + | Function names follow consistent patterns: <code>create...</code> creates an object or window, <code>get...</code> retrieves data, <code>set...</code> changes a setting, <code>read...</code>/<code>write...</code> transfer data, and <code>register...</code>/<code>unregister...</code> manage callbacks. Related functions are kept together where possible. | ||
| − | == Trainers == | + | === Quick navigation === |
| − | + | <div style="border:1px solid #4A90E2; background:#F7FBFF; margin:0.8em 0; font-family:monospace; max-width:1100px;"> | |
| − | + | <div style="background:#E8F2FF; color:#1F4E79; font-weight:bold; padding:0.5em 0.75em; border-bottom:1px solid #4A90E2;"> | |
| + | Quick Navigation | ||
| + | </div> | ||
| + | <div style="display:flex; background:#F0F6FF; color:#1F4E79; font-weight:bold; border-bottom:1px solid #C7DDF7;"> | ||
| + | <div style="flex:0 0 32%; min-width:220px; padding:0.35em 0.65em;">What do you want to do?</div> | ||
| + | <div style="flex:1; padding:0.35em 0.65em;">Recommended sections</div> | ||
| + | </div> | ||
| + | <div style="display:flex; border-bottom:1px solid #E2EEF9;"> | ||
| + | <div style="flex:0 0 32%; min-width:220px; padding:0.35em 0.65em; font-weight:bold; overflow-wrap:anywhere;">Manage a table or build a trainer</div> | ||
| + | <div style="flex:1; padding:0.35em 0.65em; border-left:1px solid #E2EEF9; line-height:1.55;">[[#Cheat Table|Cheat Table]], [[#Trainers|Trainers]], [[#Protection|Protection]]</div> | ||
| + | </div> | ||
| + | <div style="display:flex; border-bottom:1px solid #E2EEF9;"> | ||
| + | <div style="flex:0 0 32%; min-width:220px; padding:0.35em 0.65em; font-weight:bold; overflow-wrap:anywhere;">Find, read, write, or convert memory</div> | ||
| + | <div style="flex:1; padding:0.35em 0.65em; border-left:1px solid #E2EEF9; line-height:1.55;">[[#Scanning|Scanning]], [[#Memory|Memory]], [[#Conversions|Conversions]], [[#Addresses|Addresses]]</div> | ||
| + | </div> | ||
| + | <div style="display:flex; border-bottom:1px solid #E2EEF9;"> | ||
| + | <div style="flex:0 0 32%; min-width:220px; padding:0.35em 0.65em; font-weight:bold; overflow-wrap:anywhere;">Work with a process, threads, windows, or handles</div> | ||
| + | <div style="flex:1; padding:0.35em 0.65em; border-left:1px solid #E2EEF9; line-height:1.55;">[[#Process|Process]], [[#Threads|Threads]], [[#Handles|Handles]], [[#Input Devices|Input Devices]]</div> | ||
| + | </div> | ||
| + | <div style="display:flex; border-bottom:1px solid #E2EEF9;"> | ||
| + | <div style="flex:0 0 32%; min-width:220px; padding:0.35em 0.65em; font-weight:bold; overflow-wrap:anywhere;">Automate Cheat Engine or generate code</div> | ||
| + | <div style="flex:1; padding:0.35em 0.65em; border-left:1px solid #E2EEF9; line-height:1.55;">[[#Lua|Lua]], [[#Assembly|Assembly]], [[#Auto Assembler|Auto Assembler]], [[#Cheat Engine|Cheat Engine]]</div> | ||
| + | </div> | ||
| + | <div style="display:flex; border-bottom:1px solid #E2EEF9;"> | ||
| + | <div style="flex:0 0 32%; min-width:220px; padding:0.35em 0.65em; font-weight:bold; overflow-wrap:anywhere;">Build forms, controls, or visual tools</div> | ||
| + | <div style="flex:1; padding:0.35em 0.65em; border-left:1px solid #E2EEF9; line-height:1.55;">[[#Forms and Windows|Forms and Windows]], [[#Screen|Screen]], [[#Sounds|Sounds]], [[#Classes|Classes]]</div> | ||
| + | </div> | ||
| + | <div style="display:flex; border-bottom:1px solid #E2EEF9;"> | ||
| + | <div style="flex:0 0 32%; min-width:220px; padding:0.35em 0.65em; font-weight:bold; overflow-wrap:anywhere;">Debug, use the driver, or access DBVM</div> | ||
| + | <div style="flex:1; padding:0.35em 0.65em; border-left:1px solid #E2EEF9; line-height:1.55;">[[#Debugger|Debugger]], [[#DBK (Driver-Based Kernel)|DBK]], [[#DBVM|DBVM]]</div> | ||
| + | </div> | ||
| + | <div style="display:flex; border-bottom:1px solid #E2EEF9;"> | ||
| + | <div style="flex:0 0 32%; min-width:220px; padding:0.35em 0.65em; font-weight:bold; overflow-wrap:anywhere;">Find less common CE 7.5 APIs</div> | ||
| + | <div style="flex:1; padding:0.35em 0.65em; border-left:1px solid #E2EEF9; line-height:1.55;">[[#Extended API reference (CE 7.5)|Extended API reference]] — pipes, SQL, .NET, XML, CEServer, and additional factories</div> | ||
| + | </div> | ||
| + | </div> | ||
| + | === Function naming guide === | ||
| + | <div style="border:1px solid #4A90E2; background:#F7FBFF; margin:0.8em 0; font-family:monospace; max-width:1100px;"> | ||
| + | <div style="background:#E8F2FF; color:#1F4E79; font-weight:bold; padding:0.5em 0.75em; border-bottom:1px solid #4A90E2;"> | ||
| + | Function Naming Guide | ||
| + | </div> | ||
| + | <div style="display:flex; background:#F0F6FF; color:#1F4E79; font-weight:bold; border-bottom:1px solid #C7DDF7;"> | ||
| + | <div style="flex:0 0 32%; min-width:220px; padding:0.35em 0.65em;">Prefix / pattern</div> | ||
| + | <div style="flex:1; padding:0.35em 0.65em;">Meaning</div> | ||
| + | </div> | ||
| + | <div style="display:flex; border-bottom:1px solid #E2EEF9;"> | ||
| + | <div style="flex:0 0 32%; min-width:220px; padding:0.35em 0.65em; font-weight:bold; overflow-wrap:anywhere;"><code>create...</code></div> | ||
| + | <div style="flex:1; padding:0.35em 0.65em; border-left:1px solid #E2EEF9; line-height:1.55;">Creates an object, control, stream, worker, or other resource. Check the returned class before using it.</div> | ||
| + | </div> | ||
| + | <div style="display:flex; border-bottom:1px solid #E2EEF9;"> | ||
| + | <div style="flex:0 0 32%; min-width:220px; padding:0.35em 0.65em; font-weight:bold; overflow-wrap:anywhere;"><code>get...</code>, <code>enum...</code></div> | ||
| + | <div style="flex:1; padding:0.35em 0.65em; border-left:1px solid #E2EEF9; line-height:1.55;">Retrieves one value/object or enumerates a collection, usually without changing state.</div> | ||
| + | </div> | ||
| + | <div style="display:flex; border-bottom:1px solid #E2EEF9;"> | ||
| + | <div style="flex:0 0 32%; min-width:220px; padding:0.35em 0.65em; font-weight:bold; overflow-wrap:anywhere;"><code>set...</code>, <code>enable...</code></div> | ||
| + | <div style="flex:1; padding:0.35em 0.65em; border-left:1px solid #E2EEF9; line-height:1.55;">Changes a setting, protection, or runtime state.</div> | ||
| + | </div> | ||
| + | <div style="display:flex; border-bottom:1px solid #E2EEF9;"> | ||
| + | <div style="flex:0 0 32%; min-width:220px; padding:0.35em 0.65em; font-weight:bold; overflow-wrap:anywhere;"><code>read...</code>, <code>write...</code></div> | ||
| + | <div style="flex:1; padding:0.35em 0.65em; border-left:1px solid #E2EEF9; line-height:1.55;">Transfers data. Unless the name ends in <code>Local</code>, memory functions normally operate on the opened target process.</div> | ||
| + | </div> | ||
| + | <div style="display:flex; border-bottom:1px solid #E2EEF9;"> | ||
| + | <div style="flex:0 0 32%; min-width:220px; padding:0.35em 0.65em; font-weight:bold; overflow-wrap:anywhere;"><code>register...</code>, <code>unregister...</code></div> | ||
| + | <div style="flex:1; padding:0.35em 0.65em; border-left:1px solid #E2EEF9; line-height:1.55;">Adds or removes a callback, handler, hook, or extension. Keep the returned ID when an unregister function requires it.</div> | ||
| + | </div> | ||
| + | </div> | ||
| − | == | + | === Cheat Table === |
| − | + | These functions help manage the cheat table and its files. | |
| − | + | {{LuaIndexBox | |
| − | + | |title=Cheat Table | |
| − | + | |content= | |
| + | {{LuaIndexItem | ||
| + | |page=getAddressList | ||
| + | |label=getAddressList | ||
| + | |description=Returns the cheat table [[Lua:Class:Addresslist|Addresslist]] object. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=findTableFile | ||
| + | |label=findTableFile | ||
| + | |description=Returns a [[Lua:Class:TableFile|TableFile]] stored in the cheat table (search by filename or identifier). | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=createTableFile | ||
| + | |label=createTableFile | ||
| + | |description=Adds a new file entry to the cheat table. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=loadTable | ||
| + | |label=loadTable | ||
| + | |description=Loads a ".ct" or ".cetrainer" file or stream into the cheat table. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=saveTable | ||
| + | |label=saveTable | ||
| + | |description=Saves the current cheat table to disk. | ||
| + | }} | ||
| + | }} | ||
| + | === Trainers === | ||
| + | Functions related to the trainer (.exe) generator. | ||
| + | {{LuaIndexBox | ||
| + | |title=Trainers | ||
| + | |content= | ||
| + | {{LuaIndexItem | ||
| + | |page=registerEXETrainerFeature | ||
| + | |label=registerEXETrainerFeature | ||
| + | |description=Adds a new feature to the EXE trainer generator window and calls your callback when a user builds a .exe trainer. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=unregisterEXETrainerFeature | ||
| + | |label=unregisterEXETrainerFeature | ||
| + | |description=Unregisters a previously registered trainer feature. | ||
| + | }} | ||
| + | }} | ||
| − | == | + | === Protection === |
| − | + | Functions for protecting Cheat Engine or encoding code. | |
| + | {{LuaIndexBox | ||
| + | |title=Protection | ||
| + | |content= | ||
| + | {{LuaIndexItem | ||
| + | |page=activateProtection | ||
| + | |label=activateProtection | ||
| + | |description=Prevents basic memory scanners from opening or inspecting the Cheat Engine process. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=enableDRM | ||
| + | |label=enableDRM | ||
| + | |description=Enables kernel-mode protections or DRM measures to prevent normal memory scanners from reading the Cheat Engine process. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=encodeFunction | ||
| + | |label=encodeFunction | ||
| + | |description=Encodes a given Lua function to a string that can be stored/transferred; can be decoded later with [[Lua:decodeFunction|decodeFunction]]. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=decodeFunction | ||
| + | |label=decodeFunction | ||
| + | |description=Decodes an encoded function string back into a callable Lua function. | ||
| + | }} | ||
| + | }} | ||
| − | + | === Scanning === | |
| − | + | Functions that control and query memory scans. | |
| + | {{LuaIndexBox | ||
| + | |title=Scanning | ||
| + | |content= | ||
| + | {{LuaIndexItem | ||
| + | |page=AOBScan | ||
| + | |label=AOBScan | ||
| + | |description=Scans the currently opened process for an array-of-bytes (AOB) pattern and returns a [[Lua:Class:StringList|StringList]] of all matches. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=AOBScanModuleUnique | ||
| + | |label=AOBScanModuleUnique | ||
| + | |description=Scans the process memory for a byte pattern and returns the address if exactly one unique match is found; returns <code>nil</code> otherwise. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=AOBScanUnique | ||
| + | |label=AOBScanUnique | ||
| + | |description=Scans the entire process for a pattern and returns the address if exactly one unique match exists; returns <code>nil</code> otherwise. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=getCurrentMemscan | ||
| + | |label=getCurrentMemscan | ||
| + | |description=Returns the currently active scan session as a [[Lua:Class:MemScan|MemScan]] object. | ||
| + | }} | ||
| + | }} | ||
| + | === Process === | ||
| + | Functions for creating/opening processes and querying system/process state. | ||
| + | {{LuaIndexBox | ||
| + | |title=Process | ||
| + | |content= | ||
| + | {{LuaIndexItem | ||
| + | |page=createProcess | ||
| + | |label=createProcess | ||
| + | |description=Creates (and optionally debugs) a new process. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=openProcess | ||
| + | |label=openProcess | ||
| + | |description=Opens a process given a process name or PID; attaches Cheat Engine to it for memory access. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=onOpenProcess | ||
| + | |label=onOpenProcess | ||
| + | |description=Callback invoked by Cheat Engine when it opens a process (user-defined handler). | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=getForegroundProcess | ||
| + | |label=getForegroundProcess | ||
| + | |description=Returns the process ID (PID) of the currently foreground (top) window process. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=getOpenedProcessID | ||
| + | |label=getOpenedProcessID | ||
| + | |description=Returns the PID of the currently opened/attached process. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=getProcessIDFromProcessName | ||
| + | |label=getProcessIDFromProcessName | ||
| + | |description=Returns the PID for a given process name (if running). | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=openFileAsProcess | ||
| + | |label=openFileAsProcess | ||
| + | |description=Opens a file and treats it like a process (gives memory access similar to opening a process). | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=saveOpenedFile | ||
| + | |label=saveOpenedFile | ||
| + | |description=Saves changes made to the opened file. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=setPointerSize | ||
| + | |label=setPointerSize | ||
| + | |description=Sets the pointer size (in bytes) Cheat Engine will use (e.g. 4 or 8); useful if a 64-bit process requires 32-bit pointer handling. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=setAssemblerMode | ||
| + | |label=setAssemblerMode | ||
| + | |description=Sets assembler bit mode: <code>0</code> = 32-bit, <code>1</code> = 64-bit. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=getProcesslist | ||
| + | |label=getProcesslist | ||
| + | |description=Returns a system process list object. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=getWindowlist | ||
| + | |label=getWindowlist | ||
| + | |description=Returns a list of top-level windows. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=pause | ||
| + | |label=pause | ||
| + | |description=Pauses the currently opened process. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=unpause | ||
| + | |label=unpause | ||
| + | |description=Resumes the currently opened process. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=targetIs64Bit | ||
| + | |label=targetIs64Bit | ||
| + | |description=Returns <code>true</code> if the target process is 64-bit, otherwise <code>false</code>. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=enumModules | ||
| + | |label=enumModules | ||
| + | |description=Returns a table with information about each module in the current process (or a specified PID). | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=enumMemoryRegions | ||
| + | |label=enumMemoryRegions | ||
| + | |description=Returns a table containing the memory layout with information about each memory region. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=closeRemoteHandle | ||
| + | |label=closeRemoteHandle | ||
| + | |description=Closes a remote handle to a process. | ||
| + | }} | ||
| + | }} | ||
| − | == | + | === Threads === |
| − | + | {{LuaIndexBox | |
| − | + | |title=Threads | |
| − | + | |content= | |
| − | + | {{LuaIndexItem | |
| − | + | |page=getCPUCount | |
| − | + | |label=getCPUCount | |
| − | + | |description=Returns the number of CPU cores available on the system. | |
| − | + | }} | |
| − | + | {{LuaIndexItem | |
| − | + | |page=getThreadlist | |
| − | + | |label=getThreadlist | |
| − | + | |description=Fills a List object with the thread list of the currently opened process (returns thread IDs and basic info). | |
| − | + | }} | |
| − | + | {{LuaIndexItem | |
| − | + | |page=inMainThread | |
| − | + | |label=inMainThread | |
| − | + | |description=Returns <code>true</code> if the current Lua code is running in the main thread (available in CE 6.4+); otherwise <code>false</code>. | |
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=synchronize | ||
| + | |label=synchronize | ||
| + | |description=Executes the provided function in the main thread and returns that function's return value. Useful for GUI updates or operations that must run on the main thread. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=queue | ||
| + | |label=queue | ||
| + | |description=Schedules the provided function to run in the main thread but does not wait for the result (fire-and-forget). | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=checkSynchronize | ||
| + | |label=checkSynchronize | ||
| + | |description=Intended to be called from the main thread's loop to process pending synchronized calls when using threads and <code>synchronize</code>/<code>queue</code>. | ||
| + | }} | ||
| + | }} | ||
| + | === Handles === | ||
| + | {{LuaIndexBox | ||
| + | |title=Handles | ||
| + | |content= | ||
| + | {{LuaIndexItem | ||
| + | |page=getHandleList | ||
| + | |label=getHandleList | ||
| + | |description=Returns a table (or list object) containing system handles (open handles) for the system or the current process, depending on context. | ||
| + | }} | ||
| + | }} | ||
| − | == | + | === Addresses === |
| − | + | These functions help convert between memory addresses and symbol/CE address string representations. | |
| − | + | {{LuaIndexBox | |
| − | + | |title=Addresses | |
| − | + | |content= | |
| − | + | {{LuaIndexItem | |
| − | + | |page=getAddress | |
| + | |label=getAddress | ||
| + | |description=Returns the numeric address of a symbol (module+export, label, or CE symbol). Raises an error if the symbol cannot be resolved. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=getAddressSafe | ||
| + | |label=getAddressSafe | ||
| + | |description=Same as <code>getAddress</code> but returns <code>nil</code> if the symbol cannot be found (does not throw). | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=getNameFromAddress | ||
| + | |label=getNameFromAddress | ||
| + | |description=Returns the address formatted as a string, preferring symbol/module+offset notation when available. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=registerSymbol | ||
| + | |label=registerSymbol | ||
| + | |description=Assigns the specified symbol name to an address (adds a user-defined symbol). | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=unregisterSymbol | ||
| + | |label=unregisterSymbol | ||
| + | |description=Removes a previously registered symbol mapping for an address. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=getSymbolInfo | ||
| + | |label=getSymbolInfo | ||
| + | |description=Returns a table/object with symbol information (module name, search key, address, size), matching the [[Lua:Class:SymbolList|SymbolList]] structure. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=reinitializeSymbolhandler | ||
| + | |label=reinitializeSymbolhandler | ||
| + | |description=Reinitializes the symbol handler (useful after loading new modules). | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=inModule | ||
| + | |label=inModule | ||
| + | |description=Returns <code>true</code> if the specified address lies inside a loaded module. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=inSystemModule | ||
| + | |label=inSystemModule | ||
| + | |description=Returns <code>true</code> if the address is inside a system module (OS module), e.g., kernel or system DLLs. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=getModuleSize | ||
| + | |label=getModuleSize | ||
| + | |description=Returns the size (in bytes) of the specified module. Use <code>getAddress</code> to retrieve the module base address first if needed. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=errorOnLookupFailure | ||
| + | |label=errorOnLookupFailure | ||
| + | |description=Sets whether address/symbol lookups will throw errors on failure or return <code>0</code>/<code>nil</code> depending on configuration. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=registerSymbolLookupCallback | ||
| + | |label=registerSymbolLookupCallback | ||
| + | |description=Registers a callback function invoked when a symbol is parsed/loaded. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=unregisterSymbolLookupCallback | ||
| + | |label=unregisterSymbolLookupCallback | ||
| + | |description=Unregisters a previously registered symbol lookup callback. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=registerAddressLookupCallback | ||
| + | |label=registerAddressLookupCallback | ||
| + | |description=Registers a callback called when an address-to-name conversion is requested. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=unregisterAddressLookupCallback | ||
| + | |label=unregisterAddressLookupCallback | ||
| + | |description=Unregisters the address lookup callback. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=reinitializeDotNetSymbolhandler | ||
| + | |label=reinitializeDotNetSymbolhandler | ||
| + | |description=Reinitializes only the .NET portion of the symbol handler (useful when .NET modules change). | ||
| + | }} | ||
| + | }} | ||
| + | === Memory === | ||
| + | {{LuaIndexBox | ||
| + | |title=Memory | ||
| + | |content= | ||
| + | {{LuaIndexItem | ||
| + | |page=allocateMemory | ||
| + | |label=allocateMemory | ||
| + | |description=Allocates executable/non-executable memory in the target process and returns the allocated address. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=deAlloc | ||
| + | |label=deAlloc | ||
| + | |description=Frees memory previously allocated in the target process. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=allocateSharedMemory | ||
| + | |label=allocateSharedMemory | ||
| + | |description=Creates or opens a named shared memory object of the given size for interprocess communication. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=createSection | ||
| + | |label=createSection | ||
| + | |description=Creates a memory section object (OS-specific) for sharing or mapping memory. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=mapViewOfSection | ||
| + | |label=mapViewOfSection | ||
| + | |description=Maps a created section into the process address space, returning the mapped base address. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=unMapViewOfSection | ||
| + | |label=unMapViewOfSection | ||
| + | |description=Unmaps a previously mapped section view from the process address space. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=copyMemory | ||
| + | |label=copyMemory | ||
| + | |description=Copies memory from a source address to a destination address (can be used within target process or between processes depending on API). | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=compareMemory | ||
| + | |label=compareMemory | ||
| + | |description=Compares two memory regions (can be used within target process or between processes depending on API). | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=allocateKernelMemory | ||
| + | |label=allocateKernelMemory | ||
| + | |description=Allocates a block of nonpaged kernel memory (requires driver or appropriate privileges) and returns its address. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=freeKernelMemory | ||
| + | |label=freeKernelMemory | ||
| + | |description=Frees kernel-mode memory previously allocated. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=mapMemory | ||
| + | |label=mapMemory | ||
| + | |description=Maps memory from one process context into another usermode context (maps a specified address from PID A into PID B's address space). | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=unmapMemory | ||
| + | |label=unmapMemory | ||
| + | |description=Unmaps memory previously mapped with <code>mapMemory</code>. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=createMemoryStream | ||
| + | |label=createMemoryStream | ||
| + | |description=Creates a memory stream object that can be used to read/write memory data conveniently from Lua. | ||
| + | }} | ||
| + | }} | ||
| − | == | + | ==== Reading from Target Process ==== |
| − | + | {{LuaIndexBox | |
| + | |title=Reading from Target Process | ||
| + | |content= | ||
| + | {{LuaIndexItem | ||
| + | |page=readBytes | ||
| + | |label=readBytes | ||
| + | |description=Reads raw bytes at the given address. If <code>ReturnAsTable</code> is true, returns a table; otherwise returns multiple byte values. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=readSmallInteger | ||
| + | |label=readSmallInteger | ||
| + | |description=Reads a 16-bit (word) integer from the specified address. Optional second parameter: if true, reads as signed integer. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=readInteger | ||
| + | |label=readInteger | ||
| + | |description=Reads a 32-bit (dword) integer from the specified address. Optional second parameter: if true, reads as signed integer. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=readQword | ||
| + | |label=readQword | ||
| + | |description=Reads a 64-bit (qword) integer from the specified address. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=readPointer | ||
| + | |label=readPointer | ||
| + | |description=Reads a pointer-sized value: <code>readQword</code> on 64-bit targets, <code>readInteger</code> on 32-bit targets. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=readFloat | ||
| + | |label=readFloat | ||
| + | |description=Reads a single-precision (32-bit) floating-point value from the specified address. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=readDouble | ||
| + | |label=readDouble | ||
| + | |description=Reads a double-precision (64-bit) floating-point value from the specified address. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=readString | ||
| + | |label=readString | ||
| + | |description=Reads a null-terminated string from memory up to <code>maxlength</code> bytes (prevents infinite loops on corrupted memory). | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=readRegionFromFile | ||
| + | |label=readRegionFromFile | ||
| + | |description=Reads a region from a file and writes it to a specific address in the target process. | ||
| + | }} | ||
| + | }} | ||
| + | ==== Reading from Cheat Engine Memory ==== | ||
| + | {{LuaIndexBox | ||
| + | |title=Reading from Cheat Engine Memory | ||
| + | |content= | ||
| + | {{LuaIndexItem | ||
| + | |page=readBytesLocal | ||
| + | |label=readBytesLocal | ||
| + | |description=Same as <code>readBytes</code>, but reads from Cheat Engine's own memory. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=readSmallIntegerLocal | ||
| + | |label=readSmallIntegerLocal | ||
| + | |description=Reads a 16-bit integer from CE's memory. Optional: use signed if second parameter is true. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=readIntegerLocal | ||
| + | |label=readIntegerLocal | ||
| + | |description=Reads a 32-bit integer from CE's memory. Optional: use signed if second parameter is true. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=readQwordLocal | ||
| + | |label=readQwordLocal | ||
| + | |description=Reads a 64-bit integer from CE's memory. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=readPointerLocal | ||
| + | |label=readPointerLocal | ||
| + | |description=Reads a pointer-sized value from CE's memory (64-bit or 32-bit depending on CE build). | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=readFloatLocal | ||
| + | |label=readFloatLocal | ||
| + | |description=Reads a single-precision float from CE's memory. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=readDoubleLocal | ||
| + | |label=readDoubleLocal | ||
| + | |description=Reads a double-precision float from CE's memory. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=readStringLocal | ||
| + | |label=readStringLocal | ||
| + | |description=Reads a null-terminated string from CE's memory. | ||
| + | }} | ||
| + | }} | ||
| − | == | + | ==== Writing to Target Process ==== |
| − | + | {{LuaIndexBox | |
| + | |title=Writing to Target Process | ||
| + | |content= | ||
| + | {{LuaIndexItem | ||
| + | |page=writeBytes | ||
| + | |label=writeBytes | ||
| + | |description=Writes the given bytes (from a table) to the specified address in the target process. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=writeSmallInteger | ||
| + | |label=writeSmallInteger | ||
| + | |description=Writes a 16-bit integer to the specified address. Returns true on success. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=writeInteger | ||
| + | |label=writeInteger | ||
| + | |description=Writes a 32-bit integer to the specified address. Returns true on success. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=writeQword | ||
| + | |label=writeQword | ||
| + | |description=Writes a 64-bit integer to the specified address. Returns true on success. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=writeFloat | ||
| + | |label=writeFloat | ||
| + | |description=Writes a single-precision float to the specified address. Returns true on success. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=writeDouble | ||
| + | |label=writeDouble | ||
| + | |description=Writes a double-precision float to the specified address. Returns true on success. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=writeString | ||
| + | |label=writeString | ||
| + | |description=Writes a string to the specified address (typically null-terminated). Returns true on success. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=writeRegionToFile | ||
| + | |label=writeRegionToFile | ||
| + | |description=Writes a memory region to a file. Returns the number of bytes written. | ||
| + | }} | ||
| + | }} | ||
| − | + | ==== Writing to Cheat Engine Memory ==== | |
| − | + | {{LuaIndexBox | |
| − | + | |title=Writing to Cheat Engine Memory | |
| − | + | |content= | |
| − | + | {{LuaIndexItem | |
| − | + | |page=writeSmallIntegerLocal | |
| − | + | |label=writeSmallIntegerLocal | |
| − | + | |description=Writes a 16-bit integer to CE's memory. Returns true on success. | |
| − | + | }} | |
| − | + | {{LuaIndexItem | |
| − | + | |page=writeIntegerLocal | |
| − | + | |label=writeIntegerLocal | |
| − | + | |description=Writes a 32-bit integer to CE's memory. Returns true on success. | |
| − | + | }} | |
| − | + | {{LuaIndexItem | |
| − | + | |page=writeQwordLocal | |
| + | |label=writeQwordLocal | ||
| + | |description=Writes a 64-bit integer to CE's memory. Returns true on success. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=writeFloatLocal | ||
| + | |label=writeFloatLocal | ||
| + | |description=Writes a single-precision float to CE's memory. Returns true on success. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=writeDoubleLocal | ||
| + | |label=writeDoubleLocal | ||
| + | |description=Writes a double-precision float to CE's memory. Returns true on success. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=writeStringLocal | ||
| + | |label=writeStringLocal | ||
| + | |description=Writes a string to CE's memory. Returns true on success. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=writeBytesLocal | ||
| + | |label=writeBytesLocal | ||
| + | |description=Writes the given bytes (from a table) to CE's memory. | ||
| + | }} | ||
| + | }} | ||
| + | === Conversions === | ||
| − | == | + | ==== Encoding/Decoding ==== |
| − | + | {{LuaIndexBox | |
| − | + | |title=Encoding/Decoding | |
| − | + | |content= | |
| − | + | {{LuaIndexItem | |
| − | + | |page=ansiToUtf8 | |
| − | + | |label=ansiToUtf8 | |
| − | + | |description=Converts a string from ANSI encoding to UTF-8 encoding. | |
| − | + | }} | |
| − | + | {{LuaIndexItem | |
| − | + | |page=utf8ToAnsi | |
| − | + | |label=utf8ToAnsi | |
| + | |description=Converts a string from UTF-8 encoding to ANSI encoding. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=stringToMD5String | ||
| + | |label=stringToMD5String | ||
| + | |description=Computes and returns the MD5 hash of a string as a hexadecimal string. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=integerToUserData | ||
| + | |label=integerToUserData | ||
| + | |description=Converts a given integer to a userdata variable. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=userDataToInteger | ||
| + | |label=userDataToInteger | ||
| + | |description=Converts a given userdata variable back to an integer. | ||
| + | }} | ||
| + | }} | ||
| + | ==== To Byte Table ==== | ||
| + | Convert data types into byte tables (tables of individual byte values). | ||
| + | {{LuaIndexBox | ||
| + | |title=To Byte Table | ||
| + | |content= | ||
| + | {{LuaIndexItem | ||
| + | |page=wordToByteTable | ||
| + | |label=wordToByteTable | ||
| + | |description=Converts a 16-bit word to a byte table. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=dwordToByteTable | ||
| + | |label=dwordToByteTable | ||
| + | |description=Converts a 32-bit dword to a byte table. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=qwordToByteTable | ||
| + | |label=qwordToByteTable | ||
| + | |description=Converts a 64-bit qword to a byte table. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=floatToByteTable | ||
| + | |label=floatToByteTable | ||
| + | |description=Converts a single-precision float to a byte table. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=doubleToByteTable | ||
| + | |label=doubleToByteTable | ||
| + | |description=Converts a double-precision float to a byte table. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=stringToByteTable | ||
| + | |label=stringToByteTable | ||
| + | |description=Converts a string (ANSI/UTF-8) to a byte table. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=wideStringToByteTable | ||
| + | |label=wideStringToByteTable | ||
| + | |description=Converts a string to a wide string (Unicode) and then to a byte table. | ||
| + | }} | ||
| + | }} | ||
| − | + | ==== From Byte Table ==== | |
| + | Convert byte tables back into data types. | ||
| + | {{LuaIndexBox | ||
| + | |title=From Byte Table | ||
| + | |content= | ||
| + | {{LuaIndexItem | ||
| + | |page=byteTableToWord | ||
| + | |label=byteTableToWord | ||
| + | |description=Converts a byte table to a 16-bit word. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=byteTableToDword | ||
| + | |label=byteTableToDword | ||
| + | |description=Converts a byte table to a 32-bit dword. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=byteTableToQword | ||
| + | |label=byteTableToQword | ||
| + | |description=Converts a byte table to a 64-bit qword. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=byteTableToFloat | ||
| + | |label=byteTableToFloat | ||
| + | |description=Converts a byte table to a single-precision float. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=byteTableToDouble | ||
| + | |label=byteTableToDouble | ||
| + | |description=Converts a byte table to a double-precision float. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=byteTableToString | ||
| + | |label=byteTableToString | ||
| + | |description=Converts a byte table to a string. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=byteTableToWideString | ||
| + | |label=byteTableToWideString | ||
| + | |description=Converts a byte table to a wide string (Unicode). | ||
| + | }} | ||
| + | }} | ||
| − | === | + | ==== Binary Operations ==== |
| − | + | Bitwise operations on integers. | |
| − | + | {{LuaIndexBox | |
| − | + | |title=Binary Operations | |
| − | + | |content= | |
| − | + | {{LuaIndexItem | |
| − | + | |page=bOr | |
| − | + | |label=bOr | |
| − | + | |description=Bitwise OR operation. | |
| − | + | }} | |
| + | {{LuaIndexItem | ||
| + | |page=bXor | ||
| + | |label=bXor | ||
| + | |description=Bitwise XOR (exclusive OR) operation. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=bAnd | ||
| + | |label=bAnd | ||
| + | |description=Bitwise AND operation. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=bShl | ||
| + | |label=bShl | ||
| + | |description=Bitwise shift left operation. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=bShr | ||
| + | |label=bShr | ||
| + | |description=Bitwise shift right operation. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=bNot | ||
| + | |label=bNot | ||
| + | |description=Bitwise NOT (complement) operation. | ||
| + | }} | ||
| + | }} | ||
| − | + | === Input Devices === | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| + | ==== Keyboard & Mouse ==== | ||
| + | {{LuaIndexBox | ||
| + | |title=Keyboard & Mouse | ||
| + | |content= | ||
| + | {{LuaIndexItem | ||
| + | |page=getMousePos | ||
| + | |label=getMousePos | ||
| + | |description=Returns the current mouse cursor position as ''X'' and ''Y'' coordinates. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=setMousePos | ||
| + | |label=setMousePos | ||
| + | |description=Sets the mouse cursor position to the specified ''X'' and ''Y'' coordinates. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=isKeyPressed | ||
| + | |label=isKeyPressed | ||
| + | |description=Returns <code>true</code> if the specified key is currently held down. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=keyDown | ||
| + | |label=keyDown | ||
| + | |description=Simulates pressing a key (puts the key into down state). | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=keyUp | ||
| + | |label=keyUp | ||
| + | |description=Simulates releasing a key (puts the key into up state). | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=doKeyPress | ||
| + | |label=doKeyPress | ||
| + | |description=Simulates a complete key press (down and up). | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=mouse_event | ||
| + | |label=mouse_event | ||
| + | |description=Calls the Windows API <code>mouse_event</code> directly for advanced mouse control. See [https://msdn.microsoft.com/en-us/library/windows/desktop/ms646260(v=vs.85).aspx MSDN documentation]. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=setGlobalKeyPollInterval | ||
| + | |label=setGlobalKeyPollInterval | ||
| + | |description=Sets the global key poll interval (frequency of keyboard state updates). | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=setGlobalDelayBetweenHotkeyActivation | ||
| + | |label=setGlobalDelayBetweenHotkeyActivation | ||
| + | |description=Sets the minimum delay (in milliseconds) between consecutive activations of the same hotkey. | ||
| + | }} | ||
| + | }} | ||
| − | === | + | ==== Game Controller ==== |
| − | + | XBox/game controller input. | |
| − | + | {{LuaIndexBox | |
| − | + | |title=Game Controller | |
| − | + | |content= | |
| − | + | {{LuaIndexItem | |
| − | + | |page=getXBox360ControllerState | |
| − | + | |label=getXBox360ControllerState | |
| − | + | |description=Fetches the current state (buttons, triggers, sticks) of a connected XBox 360 controller. | |
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=setXBox360ControllerVibration | ||
| + | |label=setXBox360ControllerVibration | ||
| + | |description=Sets the speed of the left and right vibration motors in an XBox 360 controller (for haptic feedback). | ||
| + | }} | ||
| + | }} | ||
| − | + | ==== Clipboard ==== | |
| − | + | {{LuaIndexBox | |
| − | + | |title=Clipboard | |
| − | + | |content= | |
| − | + | {{LuaIndexItem | |
| − | + | |page=writeToClipboard | |
| − | + | |label=writeToClipboard | |
| + | |description=Writes the given text to the system clipboard. | ||
| + | }} | ||
| + | }} | ||
| − | + | === Screen === | |
| + | {{LuaIndexBox | ||
| + | |title=Screen | ||
| + | |content= | ||
| + | {{LuaIndexItem | ||
| + | |page=getScreenHeight | ||
| + | |label=getScreenHeight | ||
| + | |description=Returns the height of the screen in pixels. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=getScreenWidth | ||
| + | |label=getScreenWidth | ||
| + | |description=Returns the width of the screen in pixels. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=getScreenDPI | ||
| + | |label=getScreenDPI | ||
| + | |description=Returns the screen DPI (dots per inch) for determining screen scaling/density. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=getWorkAreaHeight | ||
| + | |label=getWorkAreaHeight | ||
| + | |description=Returns the height of the usable work area (excludes taskbars). | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=getWorkAreaWidth | ||
| + | |label=getWorkAreaWidth | ||
| + | |description=Returns the width of the usable work area (excludes taskbars). | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=getScreenCanvas | ||
| + | |label=getScreenCanvas | ||
| + | |description=Returns a Canvas object for drawing directly to the screen. Limited usefulness in practice due to performance constraints. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=getPixel | ||
| + | |label=getPixel | ||
| + | |description=Returns the RGB color value of a pixel at the specified screen coordinates. | ||
| + | }} | ||
| + | }} | ||
| − | == | + | === Sounds === |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | === | + | ==== General Audio ==== |
| − | + | {{LuaIndexBox | |
| − | + | |title=General Audio | |
| − | + | |content= | |
| − | + | {{LuaIndexItem | |
| − | + | |page=playSound | |
| − | + | |label=playSound | |
| − | + | |description=Plays an audio file (supports various formats like .wav, .mp3, etc.). | |
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=beep | ||
| + | |label=beep | ||
| + | |description=Plays a system beep/ping sound. | ||
| + | }} | ||
| + | }} | ||
| − | === | + | === Text-to-Speech === |
| − | + | {{LuaIndexBox | |
| − | + | |title=Text-to-Speech | |
| − | + | |content= | |
| − | + | {{LuaIndexItem | |
| − | + | |page=speak | |
| − | + | |label=speak | |
| − | + | |description=Speaks the given text using the system's text-to-speech engine and optional flags. See [https://msdn.microsoft.com/en-us/library/speechplatform_speakflags.aspx MSDN SpeakFlags]. | |
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=speakEnglish | ||
| + | |label=speakEnglish | ||
| + | |description=Speaks the given text using an English voice by wrapping it in an XML voice specification. | ||
| + | }} | ||
| + | }} | ||
| + | ==== XM Player ==== | ||
| + | Plays tracked music (XM format) using the built-in XM player. | ||
| + | {{LuaIndexBox | ||
| + | |title=XM Player | ||
| + | |content= | ||
| + | {{LuaIndexItem | ||
| + | |page=xmplayer_playXM | ||
| + | |label=xmplayer_playXM | ||
| + | |description=Plays an XM audio file given its filename. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=xmplayer_pause | ||
| + | |label=xmplayer_pause | ||
| + | |description=Pauses the currently playing XM audio file. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=xmplayer_resume | ||
| + | |label=xmplayer_resume | ||
| + | |description=Resumes playback of a paused XM audio file. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=xmplayer_stop | ||
| + | |label=xmplayer_stop | ||
| + | |description=Stops XM audio playback completely. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=xmplayer_isPlaying | ||
| + | |label=xmplayer_isPlaying | ||
| + | |description=Returns <code>true</code> if an XM audio file is currently being played. | ||
| + | }} | ||
| + | }} | ||
| − | === | + | === Fonts === |
| − | + | {{LuaIndexBox | |
| − | + | |title=Fonts | |
| − | + | |content= | |
| − | + | {{LuaIndexItem | |
| − | + | |page=loadFontFromStream | |
| − | + | |label=loadFontFromStream | |
| + | |description=Loads a font from a memory stream and returns a handle/ID for later use with <code>unloadLoadedFont</code>. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=unloadLoadedFont | ||
| + | |label=unloadLoadedFont | ||
| + | |description=Unloads a previously loaded font by its handle/ID, freeing resources. | ||
| + | }} | ||
| + | }} | ||
| + | === Forms and Windows === | ||
| + | {{LuaIndexBox | ||
| + | |title=Forms and Windows | ||
| + | |content= | ||
| + | {{LuaIndexItem | ||
| + | |page=findWindow | ||
| + | |label=findWindow | ||
| + | |description=Finds a window by class name and/or window title/caption. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=getWindow | ||
| + | |label=getWindow | ||
| + | |description=Gets a window handle based on a relative command (e.g. parent, child, next). See [https://msdn.microsoft.com/en-us/library/windows/desktop/ms633515(v=vs.85).aspx MSDN GetWindow]. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=getWindowCaption | ||
| + | |label=getWindowCaption | ||
| + | |description=Returns the caption/title text of the specified window. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=getWindowClassName | ||
| + | |label=getWindowClassName | ||
| + | |description=Returns the class name of the specified window. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=getWindowProcessID | ||
| + | |label=getWindowProcessID | ||
| + | |description=Returns the process ID (PID) of the process that owns the specified window. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=getForegroundWindow | ||
| + | |label=getForegroundWindow | ||
| + | |description=Returns the handle of the topmost (foreground) window currently active. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=sendMessage | ||
| + | |label=sendMessage | ||
| + | |description=Sends a Windows message to the specified window. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=hookWndProc | ||
| + | |label=hookWndProc | ||
| + | |description=Hooks a window's window procedure (WndProc) to intercept and handle messages. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=unhookWndProc | ||
| + | |label=unhookWndProc | ||
| + | |description=Uninstalls a WndProc hook previously installed via <code>hookWndProc</code>. | ||
| + | }} | ||
| + | }} | ||
| − | == | + | === Cheat Engine === |
| − | + | Functions for managing and controlling Cheat Engine itself. | |
| − | + | ==== Version and Information ==== | |
| − | + | {{LuaIndexBox | |
| − | + | |title=Version and Information | |
| − | + | |content= | |
| − | + | {{LuaIndexItem | |
| − | + | |page=getCEVersion | |
| − | + | |label=getCEVersion | |
| − | + | |description=Returns the Cheat Engine version as a floating-point number (e.g. <code>7.5</code>). | |
| − | + | }} | |
| + | {{LuaIndexItem | ||
| + | |page=getCheatEngineFileVersion | ||
| + | |label=getCheatEngineFileVersion | ||
| + | |description=Returns full version information: a raw integer and a table containing major, minor, release, and build numbers. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=cheatEngineIs64Bit | ||
| + | |label=cheatEngineIs64Bit | ||
| + | |description=Returns <code>true</code> if Cheat Engine is running as 64-bit; <code>false</code> if 32-bit. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=getCheatEngineProcessID | ||
| + | |label=getCheatEngineProcessID | ||
| + | |description=Returns the process ID of the Cheat Engine process itself. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=getCheatEngineDir | ||
| + | |label=getCheatEngineDir | ||
| + | |description=Returns the folder path where Cheat Engine (or the current trainer) is located. | ||
| + | }} | ||
| + | }} | ||
| − | === | + | ==== Management ==== |
| − | + | {{LuaIndexBox | |
| − | + | |title=Management | |
| + | |content= | ||
| + | {{LuaIndexItem | ||
| + | |page=closeCE | ||
| + | |label=closeCE | ||
| + | |description=Closes Cheat Engine. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=getFreezeTimer | ||
| + | |label=getFreezeTimer | ||
| + | |description=Returns the Timer object responsible for freezing/unfreezing values in the address list. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=getUpdateTimer | ||
| + | |label=getUpdateTimer | ||
| + | |description=Returns the Timer object responsible for updating displayed values in the address list. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=getCommonModuleList | ||
| + | |label=getCommonModuleList | ||
| + | |description=Returns the common module list as a [[Lua:Class:StringList|StringList]] object. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=getAutoAttachList | ||
| + | |label=getAutoAttachList | ||
| + | |description=Returns the AutoAttach list as a [[Lua:Class:StringList|StringList]] object. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=connectToCEServer | ||
| + | |label=connectToCEServer | ||
| + | |description=Connects to a remote Cheat Engine server (given host and port). Subsequent operations route through the server. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=reloadSettingsFromRegistry | ||
| + | |label=reloadSettingsFromRegistry | ||
| + | |description=Reloads Cheat Engine settings from the registry and applies them immediately. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=loadPlugin | ||
| + | |label=loadPlugin | ||
| + | |description=Loads the specified plugin. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=getSettings | ||
| + | |label=getSettings | ||
| + | |description=Returns the settings object for accessing/modifying CE configuration. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=registerBinUtil | ||
| + | |label=registerBinUtil | ||
| + | |description=Registers a binutils (assembler/disassembler) toolset with Cheat Engine. | ||
| + | }} | ||
| + | }} | ||
| − | === | + | ==== Comments and Headers ==== |
| − | + | {{LuaIndexBox | |
| − | + | |title=Comments and Headers | |
| + | |content= | ||
| + | {{LuaIndexItem | ||
| + | |page=getComment | ||
| + | |label=getComment | ||
| + | |description=Gets the user-defined comment attached to the specified address. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=setComment | ||
| + | |label=setComment | ||
| + | |description=Sets a user-defined comment at the specified address. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=getHeader | ||
| + | |label=getHeader | ||
| + | |description=Gets the user-defined header text at the specified address. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=setHeader | ||
| + | |label=setHeader | ||
| + | |description=Sets a user-defined header text at the specified address. | ||
| + | }} | ||
| + | }} | ||
| + | ==== Advertising and Support ==== | ||
| + | {{LuaIndexBox | ||
| + | |title=Advertising and Support | ||
| + | |content= | ||
| + | {{LuaIndexItem | ||
| + | |page=supportCheatEngine | ||
| + | |label=supportCheatEngine | ||
| + | |description=Displays an advertising/support window to help fund Cheat Engine development. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=fuckCheatEngine | ||
| + | |label=fuckCheatEngine | ||
| + | |description=Hides/closes the advertising window if it was showing (crude but functional name). | ||
| + | }} | ||
| + | }} | ||
| − | == | + | ==== Forms and UI ==== |
| − | + | {{LuaIndexBox | |
| − | + | |title=Forms and UI | |
| − | + | |content= | |
| − | + | {{LuaIndexItem | |
| − | + | |page=getFormCount | |
| − | + | |label=getFormCount | |
| + | |description=Returns the total number of forms currently attached to the main CE application. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=getForm | ||
| + | |label=getForm | ||
| + | |description=Returns the form object at the specified index (0-based). | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=getMemoryViewForm | ||
| + | |label=getMemoryViewForm | ||
| + | |description=Returns the first MemoryView form object (the hex editor window). | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=getMainForm | ||
| + | |label=getMainForm | ||
| + | |description=Returns the main Cheat Engine window form object. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=getSettingsForm | ||
| + | |label=getSettingsForm | ||
| + | |description=Returns the settings/options dialog form object. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=getLuaEngine | ||
| + | |label=getLuaEngine | ||
| + | |description=Returns the Lua engine/console form object (creates it if needed). | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=unhideMainCEwindow | ||
| + | |label=unhideMainCEwindow | ||
| + | |description=Shows the main Cheat Engine window (opposite of <code>hideAllCEWindows</code>). | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=hideAllCEWindows | ||
| + | |label=hideAllCEWindows | ||
| + | |description=Hides all normal Cheat Engine windows (e.g. the trainer table UI). | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=registerFormAddNotification | ||
| + | |label=registerFormAddNotification | ||
| + | |description=Registers a callback function invoked when a form is added to CE's form list. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=unregisterFormAddNotification | ||
| + | |label=unregisterFormAddNotification | ||
| + | |description=Unregisters a previously registered form add notification callback. | ||
| + | }} | ||
| + | }} | ||
| + | ==== Messages ==== | ||
| + | {{LuaIndexBox | ||
| + | |title=Messages | ||
| + | |content= | ||
| + | {{LuaIndexItem | ||
| + | |page=showMessage | ||
| + | |label=showMessage | ||
| + | |description=Shows a simple message box with the given text to the user. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=messageDialog | ||
| + | |label=messageDialog | ||
| + | |description=Pops up a message dialog box (similar to <code>showMessage</code>, with more control over buttons/options). | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=outputDebugString | ||
| + | |label=outputDebugString | ||
| + | |description=Outputs a message using the Windows <code>OutputDebugString</code> API (visible in debuggers). | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=processMessages | ||
| + | |label=processMessages | ||
| + | |description=Processes pending window messages in the event queue, allowing button clicks and UI updates to be handled. | ||
| + | }} | ||
| + | }} | ||
| − | == | + | ==== Input ==== |
| − | + | {{LuaIndexBox | |
| − | + | |title=Input | |
| − | + | |content= | |
| − | + | {{LuaIndexItem | |
| + | |page=inputQuery | ||
| + | |label=inputQuery | ||
| + | |description=Shows a dialog prompting the user to input a string. Returns the entered string, or <code>nil</code> if cancelled (CE 6.4+). | ||
| + | }} | ||
| + | }} | ||
| − | === | + | ==== Shortcuts ==== |
| − | + | {{LuaIndexBox | |
| − | + | |title=Shortcuts | |
| − | + | |content= | |
| − | + | {{LuaIndexItem | |
| − | + | |page=shortCutToText | |
| + | |label=shortCutToText | ||
| + | |description=Converts a shortcut integer value to its textual representation (e.g. <code>"Ctrl+Alt+A"</code>). (CE 6.4+) | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=textToShortCut | ||
| + | |label=textToShortCut | ||
| + | |description=Converts a text representation (e.g. <code>"Ctrl+Alt+A"</code>) to a shortcut integer value. (CE 6.4+) | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=convertKeyComboToString | ||
| + | |label=convertKeyComboToString | ||
| + | |description=Converts a key combination to its string representation, matching the hotkey handler's format. | ||
| + | }} | ||
| + | }} | ||
| − | == | + | ==== Speed Hack ==== |
| − | + | {{LuaIndexBox | |
| − | + | |title=Speed Hack | |
| + | |content= | ||
| + | {{LuaIndexItem | ||
| + | |page=speedhack_setSpeed | ||
| + | |label=speedhack_setSpeed | ||
| + | |description=Enables the speed hack (if not already active) and sets the game/process speed multiplier (e.g. <code>2.0</code> for 2x speed). | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=speedhack_getSpeed | ||
| + | |label=speedhack_getSpeed | ||
| + | |description=Returns the current speed hack multiplier value that was last set. | ||
| + | }} | ||
| + | }} | ||
| + | === Lua === | ||
| + | Functions for managing the Lua engine and state. | ||
| − | == | + | {{LuaIndexBox |
| + | |title=Lua | ||
| + | |content= | ||
| + | {{LuaIndexItem | ||
| + | |page=resetLuaState | ||
| + | |label=resetLuaState | ||
| + | |description=Creates a fresh Lua state, resetting the environment and clearing all previously defined variables/functions. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=sleep | ||
| + | |label=sleep | ||
| + | |description=Pauses execution for the specified number of milliseconds. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=createRef | ||
| + | |label=createRef | ||
| + | |description=Creates and returns an integer reference handle that can store and retrieve Lua objects persistently. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=getRef | ||
| + | |label=getRef | ||
| + | |description=Retrieves the Lua value/object referenced by the given reference handle. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=destroyRef | ||
| + | |label=destroyRef | ||
| + | |description=Destroys and frees a reference handle, removing the reference and allowing garbage collection. | ||
| + | }} | ||
| + | }} | ||
| − | + | === Types === | |
| − | + | Functions for registering and managing custom data types. | |
| + | {{LuaIndexBox | ||
| + | |title=Types | ||
| + | |content= | ||
| + | {{LuaIndexItem | ||
| + | |page=onAutoGuess | ||
| + | |label=onAutoGuess | ||
| + | |description=Registers a callback function invoked by Cheat Engine's auto-guess feature to predict and suggest variable types. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=registerCustomTypeLua | ||
| + | |label=registerCustomTypeLua | ||
| + | |description=Registers a custom data type defined using Lua functions for reading/writing/display logic. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=registerCustomTypeAutoAssembler | ||
| + | |label=registerCustomTypeAutoAssembler | ||
| + | |description=Registers a custom data type defined using an Auto Assembler script. | ||
| + | }} | ||
| + | }} | ||
| − | == | + | === Object-oriented === |
| + | Functions for determining class inheritance and type relationships. | ||
| − | + | {{LuaIndexBox | |
| − | + | |title=Object-oriented | |
| − | + | |content= | |
| − | + | {{LuaIndexItem | |
| − | + | |page=inheritsFromObject | |
| − | + | |label=inheritsFromObject | |
| − | + | |description=Returns <code>true</code> if the given object is a valid Cheat Engine class instance (inherits from Object). | |
| − | + | }} | |
| − | + | {{LuaIndexItem | |
| + | |page=inheritsFromComponent | ||
| + | |label=inheritsFromComponent | ||
| + | |description=Returns <code>true</code> if the given object inherits from the Component class. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=inheritsFromControl | ||
| + | |label=inheritsFromControl | ||
| + | |description=Returns <code>true</code> if the given object inherits from the Control class (UI controls). | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=inheritsFromWinControl | ||
| + | |label=inheritsFromWinControl | ||
| + | |description=Returns <code>true</code> if the given object inherits from the WinControl class (windowed controls). | ||
| + | }} | ||
| + | }} | ||
| + | === Assembly === | ||
| + | Functions for working with x86/x64 machine code and assembly instructions. | ||
| − | == | + | {{LuaIndexBox |
| − | + | |title=Assembly | |
| + | |content= | ||
| + | {{LuaIndexItem | ||
| + | |page=autoAssemble | ||
| + | |label=autoAssemble | ||
| + | |description=Executes an Auto Assembler script (given as text) for code injection, patching, or other assembly operations. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=autoAssembleCheck | ||
| + | |label=autoAssembleCheck | ||
| + | |description=Validates an Auto Assembler script for syntax errors. Returns <code>true</code> on success; <code>false</code> with error message on failure. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=disassemble | ||
| + | |label=disassemble | ||
| + | |description=Disassembles the instruction at the given address and returns a formatted string: <code>"address - bytes - opcode extra"</code>. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=splitDisassembledString | ||
| + | |label=splitDisassembledString | ||
| + | |description=Parses a disassembled instruction string and returns 4 separate strings: address, bytes, opcode, and extra field. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=getInstructionSize | ||
| + | |label=getInstructionSize | ||
| + | |description=Returns the size (in bytes) of the instruction at the given address. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=getPreviousOpcode | ||
| + | |label=getPreviousOpcode | ||
| + | |description=Attempts to find and return the address of the previous instruction (heuristic guess). | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=registerAssembler | ||
| + | |label=registerAssembler | ||
| + | |description=Registers a custom callback function for the single-line assembler to convert instruction mnemonics to bytes. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=unregisterAssembler | ||
| + | |label=unregisterAssembler | ||
| + | |description=Unregisters a previously registered custom assembler callback. | ||
| + | }} | ||
| + | }} | ||
| − | + | === Auto Assembler === | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | === | + | ==== Commands & Hooks ==== |
| − | + | {{LuaIndexBox | |
| − | + | |title=Commands & Hooks | |
| − | + | |content= | |
| − | + | {{LuaIndexItem | |
| − | + | |page=registerAutoAssemblerCommand | |
| − | + | |label=registerAutoAssemblerCommand | |
| − | + | |description=Registers a custom Auto Assembler command that calls the specified Lua function when invoked in a script. | |
| − | + | }} | |
| − | + | {{LuaIndexItem | |
| − | + | |page=unregisterAutoAssemblerCommand | |
| + | |label=unregisterAutoAssemblerCommand | ||
| + | |description=Unregisters a previously registered Auto Assembler command. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=registerAutoAssemblerPrologue | ||
| + | |label=registerAutoAssemblerPrologue | ||
| + | |description=Registers a callback function invoked before the Auto Assembler parses a script (prologue phase). | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=unregisterAutoAssemblerPrologue | ||
| + | |label=unregisterAutoAssemblerPrologue | ||
| + | |description=Unregisters an Auto Assembler prologue callback. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=fullAccess | ||
| + | |label=fullAccess | ||
| + | |description=Changes memory protection on a block of memory to be writable and executable. | ||
| + | }} | ||
| + | }} | ||
| − | === | + | ==== Scripts & Templates ==== |
| − | + | {{LuaIndexBox | |
| − | + | |title=Scripts & Templates | |
| − | + | |content= | |
| − | + | {{LuaIndexItem | |
| + | |page=registerAutoAssemblerTemplate | ||
| + | |label=registerAutoAssemblerTemplate | ||
| + | |description=Registers a reusable template for the Auto Assembler script generator. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=unregisterAutoAssemblerTemplate | ||
| + | |label=unregisterAutoAssemblerTemplate | ||
| + | |description=Unregisters a previously registered Auto Assembler template. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=generateCodeInjectionScript | ||
| + | |label=generateCodeInjectionScript | ||
| + | |description=Generates and appends a default code injection script to the provided script (allocates space, injects code, patches original). | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=generateAOBInjectionScript | ||
| + | |label=generateAOBInjectionScript | ||
| + | |description=Generates and appends an Array-of-Bytes (AOB) injection script to the provided script (searches for pattern, injects code). | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=generateFullInjectionScript | ||
| + | |label=generateFullInjectionScript | ||
| + | |description=Generates and appends a complete full injection script with all patches and cleanup code. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=generateAPIHookScript | ||
| + | |label=generateAPIHookScript | ||
| + | |description=Generates an Auto Assembler script that hooks (intercepts) the given API function address. | ||
| + | }} | ||
| + | }} | ||
| − | === | + | === Debugger === |
| − | + | Functions for managing the debugger. See [[Lua Debugging]] for detailed information. | |
| − | === | + | ==== Status and Information ==== |
| − | + | {{LuaIndexBox | |
| − | + | |title=Status and Information | |
| − | + | |content= | |
| + | {{LuaIndexItem | ||
| + | |page=debug_isDebugging | ||
| + | |label=debug_isDebugging | ||
| + | |description=Returns <code>true</code> if the debugger has been started and is active. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=debug_getCurrentDebuggerInterface | ||
| + | |label=debug_getCurrentDebuggerInterface | ||
| + | |description=Returns the current debugger interface type: <code>1</code>=Windows, <code>2</code>=VEH, <code>3</code>=Kernel, <code>nil</code>=no debugging. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=debug_canBreak | ||
| + | |label=debug_canBreak | ||
| + | |description=Returns <code>true</code> if the target process can stop on a breakpoint. (CE 6.4+) | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=debug_isBroken | ||
| + | |label=debug_isBroken | ||
| + | |description=Returns <code>true</code> if the debugger is currently halted on a thread (at a breakpoint). | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=debug_getBreakpointList | ||
| + | |label=debug_getBreakpointList | ||
| + | |description=Returns a Lua table containing all currently active breakpoint addresses. | ||
| + | }} | ||
| + | }} | ||
| − | === | + | ==== Breakpoint Management ==== |
| − | + | {{LuaIndexBox | |
| − | + | |title=Breakpoint Management | |
| + | |content= | ||
| + | {{LuaIndexItem | ||
| + | |page=debugProcess | ||
| + | |label=debugProcess | ||
| + | |description=Starts debugging the currently attached process. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=debug_setBreakpoint | ||
| + | |label=debug_setBreakpoint | ||
| + | |description=Sets a breakpoint of a specific size (in bytes) at the given address. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=debug_removeBreakpoint | ||
| + | |label=debug_removeBreakpoint | ||
| + | |description=Removes a breakpoint at the specified address. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=debug_continueFromBreakpoint | ||
| + | |label=debug_continueFromBreakpoint | ||
| + | |description=Resumes execution when the debugger is halted on a breakpoint. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=debug_addThreadToNoBreakList | ||
| + | |label=debug_addThreadToNoBreakList | ||
| + | |description=Adds a thread to the no-break list so breakpoints on it will be ignored. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=debug_removeThreadFromNoBreakList | ||
| + | |label=debug_removeThreadFromNoBreakList | ||
| + | |description=Removes a thread from the no-break list. | ||
| + | }} | ||
| + | }} | ||
| + | ==== Callbacks ==== | ||
| + | {{LuaIndexBox | ||
| + | |title=Callbacks | ||
| + | |content= | ||
| + | {{LuaIndexItem | ||
| + | |page=debugger_onBreakpoint | ||
| + | |label=debugger_onBreakpoint | ||
| + | |description=User-defined callback invoked by CE when a breakpoint is hit (define your own implementation). | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=debugger_onModuleLoad | ||
| + | |label=debugger_onModuleLoad | ||
| + | |description=User-defined callback invoked by the Windows debugger when a module is loaded. | ||
| + | }} | ||
| + | }} | ||
| − | == Lua == | + | ==== Register and Context Management ==== |
| − | + | {{LuaIndexBox | |
| + | |title=Register and Context Management | ||
| + | |content= | ||
| + | {{LuaIndexItem | ||
| + | |page=debug_getContext | ||
| + | |label=debug_getContext | ||
| + | |description=Force-updates the Lua variables representing CPU registers from the current thread context. (CE 6.5+) | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=debug_setContext | ||
| + | |label=debug_setContext | ||
| + | |description=Force-updates the CPU registers from the Lua variables representing them. (CE 6.5+) | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=debug_updateGUI | ||
| + | |label=debug_updateGUI | ||
| + | |description=Refreshes the UI to reflect the current debug context if the debugger is broken. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=debug_getXMMPointer | ||
| + | |label=debug_getXMMPointer | ||
| + | |description=Returns the memory address of the specified XMM register for the currently broken thread. | ||
| + | }} | ||
| + | }} | ||
| − | + | ==== Advanced Debugging ==== | |
| − | + | {{LuaIndexBox | |
| − | + | |title=Advanced Debugging | |
| − | + | |content= | |
| − | + | {{LuaIndexItem | |
| + | |page=debug_setLastBranchRecording | ||
| + | |label=debug_setLastBranchRecording | ||
| + | |description=Tells the kernel-mode debugger to record the last few branch/jump instructions before a breakpoint is hit. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=debug_getMaxLastBranchRecord | ||
| + | |label=debug_getMaxLastBranchRecord | ||
| + | |description=Returns the maximum number of branch records this CPU supports. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=debug_getLastBranchRecord | ||
| + | |label=debug_getLastBranchRecord | ||
| + | |description=Returns the Last Branch Record value at the given index (when handling a breakpoint with branch recording enabled). | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=detachIfPossible | ||
| + | |label=detachIfPossible | ||
| + | |description=Detaches the debugger from the target process if possible. | ||
| + | }} | ||
| + | }} | ||
| + | === DBK (Driver-Based Kernel) === | ||
| + | Functions for kernel-mode operations via the DBK driver. | ||
| − | == | + | ==== Initialization and Setup ==== |
| − | + | {{LuaIndexBox | |
| + | |title=Initialization and Setup | ||
| + | |content= | ||
| + | {{LuaIndexItem | ||
| + | |page=dbk_initialize | ||
| + | |label=dbk_initialize | ||
| + | |description=Loads and initializes the DBK kernel driver into memory if possible. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=dbk_useKernelmodeOpenProcess | ||
| + | |label=dbk_useKernelmodeOpenProcess | ||
| + | |description=Redirects <code>OpenProcess</code> API calls to use kernel-mode DBK equivalents. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=dbk_useKernelmodeProcessMemoryAccess | ||
| + | |label=dbk_useKernelmodeProcessMemoryAccess | ||
| + | |description=Redirects <code>ReadProcessMemory</code> and <code>WriteProcessMemory</code> to use kernel-mode DBK versions. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=dbk_useKernelmodeQueryMemoryRegions | ||
| + | |label=dbk_useKernelmodeQueryMemoryRegions | ||
| + | |description=Redirects virtual memory query APIs to use kernel-mode DBK equivalents. | ||
| + | }} | ||
| + | }} | ||
| − | + | ==== Process and Thread Information ==== | |
| − | + | {{LuaIndexBox | |
| − | + | |title=Process and Thread Information | |
| + | |content= | ||
| + | {{LuaIndexItem | ||
| + | |page=dbk_getPEProcess | ||
| + | |label=dbk_getPEProcess | ||
| + | |description=Returns the kernel pointer to the EPROCESS structure of the selected process ID. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=dbk_getPEThread | ||
| + | |label=dbk_getPEThread | ||
| + | |description=Returns the kernel pointer to the ETHREAD structure of a given thread ID. | ||
| + | }} | ||
| + | }} | ||
| + | ==== CPU Register Access ==== | ||
| + | {{LuaIndexBox | ||
| + | |title=CPU Register Access | ||
| + | |content= | ||
| + | {{LuaIndexItem | ||
| + | |page=dbk_readMSR | ||
| + | |label=dbk_readMSR | ||
| + | |description=Reads a Model-Specific Register (MSR) using the DBK driver. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=dbk_writeMSR | ||
| + | |label=dbk_writeMSR | ||
| + | |description=Writes a Model-Specific Register (MSR) using the DBK driver. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=dbk_getCR0 | ||
| + | |label=dbk_getCR0 | ||
| + | |description=Returns the value of Control Register 0 (CR0). | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=dbk_getCR3 | ||
| + | |label=dbk_getCR3 | ||
| + | |description=Returns the value of Control Register 3 (CR3) for the currently opened process. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=dbk_getCR4 | ||
| + | |label=dbk_getCR4 | ||
| + | |description=Returns the value of Control Register 4 (CR4). | ||
| + | }} | ||
| + | }} | ||
| − | == | + | ==== Memory and Execution ==== |
| − | + | {{LuaIndexBox | |
| + | |title=Memory and Execution | ||
| + | |content= | ||
| + | {{LuaIndexItem | ||
| + | |page=dbk_getPhysicalAddress | ||
| + | |label=dbk_getPhysicalAddress | ||
| + | |description=Converts a virtual address to its physical address using the DBK driver. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=dbk_executeKernelMemory | ||
| + | |label=dbk_executeKernelMemory | ||
| + | |description=Executes a routine from kernel mode (e.g. injected code written with Auto Assembler). | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=dbk_writesIgnoreWriteProtection | ||
| + | |label=dbk_writesIgnoreWriteProtection | ||
| + | |description=When set to <code>true</code>, write operations bypass copy-on-write behavior. | ||
| + | }} | ||
| + | }} | ||
| − | + | === DBVM === | |
| − | + | Functions for hypervisor-based operations and advanced memory monitoring via DBVM. | |
| − | |||
| − | |||
| + | ==== Initialization ==== | ||
| + | {{LuaIndexBox | ||
| + | |title=Initialization | ||
| + | |content= | ||
| + | {{LuaIndexItem | ||
| + | |page=dbvm_initialize | ||
| + | |label=dbvm_initialize | ||
| + | |description=Initializes the DBVM hypervisor functions for use. | ||
| + | }} | ||
| + | }} | ||
| − | == | + | ==== Memory Operations ==== |
| + | {{LuaIndexBox | ||
| + | |title=Memory Operations | ||
| + | |content= | ||
| + | {{LuaIndexItem | ||
| + | |page=dbvm_addMemory | ||
| + | |label=dbvm_addMemory | ||
| + | |description=Adds a memory region to DBVM. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=dbvm_readPhysicalMemory | ||
| + | |label=dbvm_readPhysicalMemory | ||
| + | |description=Reads physical memory directly using DBVM (hypervisor-level access). | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=dbvm_writePhysicalMemory | ||
| + | |label=dbvm_writePhysicalMemory | ||
| + | |description=Writes physical memory directly using DBVM (hypervisor-level access). | ||
| + | }} | ||
| + | }} | ||
| − | + | ==== MSR and Control Register Access ==== | |
| + | {{LuaIndexBox | ||
| + | |title=MSR and Control Register Access | ||
| + | |content= | ||
| + | {{LuaIndexItem | ||
| + | |page=dbvm_readMSR | ||
| + | |label=dbvm_readMSR | ||
| + | |description=Reads a Model-Specific Register (MSR) using DBVM (bypasses driver). | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=dbvm_writeMSR | ||
| + | |label=dbvm_writeMSR | ||
| + | |description=Writes a Model-Specific Register (MSR) using DBVM (bypasses driver). | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=dbvm_getCR4 | ||
| + | |label=dbvm_getCR4 | ||
| + | |description=Returns the real (unhooked) value of Control Register 4 (CR4). | ||
| + | }} | ||
| + | }} | ||
| − | + | ==== Memory Monitoring ==== | |
| − | + | {{LuaIndexBox | |
| − | + | |title=Memory Monitoring | |
| − | + | |content= | |
| − | + | {{LuaIndexItem | |
| − | + | |page=dbvm_watch_writes | |
| − | + | |label=dbvm_watch_writes | |
| − | + | |description=Starts monitoring write accesses to a memory region. | |
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=dbvm_watch_reads | ||
| + | |label=dbvm_watch_reads | ||
| + | |description=Starts monitoring read accesses to a memory region. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=dbvm_watch_retrievelog | ||
| + | |label=dbvm_watch_retrievelog | ||
| + | |description=Retrieves the log/results of memory region monitoring (reads or writes). | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=dbvm_watch_disable | ||
| + | |label=dbvm_watch_disable | ||
| + | |description=Stops memory region monitoring. | ||
| + | }} | ||
| + | }} | ||
| + | ==== Memory Cloaking ==== | ||
| + | {{LuaIndexBox | ||
| + | |title=Memory Cloaking | ||
| + | |content= | ||
| + | {{LuaIndexItem | ||
| + | |page=dbvm_cloak_activate | ||
| + | |label=dbvm_cloak_activate | ||
| + | |description=Cloaks a memory page so modifications become invisible to the target process. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=dbvm_cloak_deactivate | ||
| + | |label=dbvm_cloak_deactivate | ||
| + | |description=Disables cloaking on a page and undoes hidden modifications. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=dbvm_cloak_readOriginal | ||
| + | |label=dbvm_cloak_readOriginal | ||
| + | |description=Reads the original (hidden) memory contents of a cloaked region. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=dbvm_cloak_writeOriginal | ||
| + | |label=dbvm_cloak_writeOriginal | ||
| + | |description=Writes to the original (hidden) memory contents of a cloaked region. | ||
| + | }} | ||
| + | }} | ||
| − | == | + | ==== Breakpoints and Debugging ==== |
| − | + | {{LuaIndexBox | |
| − | + | |title=Breakpoints and Debugging | |
| − | + | |content= | |
| − | + | {{LuaIndexItem | |
| − | + | |page=dbvm_changeregonbp | |
| + | |label=dbvm_changeregonbp | ||
| + | |description=Cloaks a page, sets a breakpoint at the given address, and modifies registers when the breakpoint is hit. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=dbvm_removechangeregonbp | ||
| + | |label=dbvm_removechangeregonbp | ||
| + | |description=Removes a "change registers on breakpoint" breakpoint. | ||
| + | }} | ||
| + | }} | ||
| + | ==== CR3 (Process Context) Logging ==== | ||
| + | {{LuaIndexBox | ||
| + | |title=CR3 (Process Context) Logging | ||
| + | |content= | ||
| + | {{LuaIndexItem | ||
| + | |page=dbvm_log_cr3_start | ||
| + | |label=dbvm_log_cr3_start | ||
| + | |description=Starts logging all CR3 (process context/page directory) changes. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=dbvm_log_cr3_stop | ||
| + | |label=dbvm_log_cr3_stop | ||
| + | |description=Stops CR3 logging. | ||
| + | }} | ||
| + | }} | ||
| − | === | + | ==== Performance and Anti-Detection ==== |
| − | + | {{LuaIndexBox | |
| − | + | |title=Performance and Anti-Detection | |
| − | + | |content= | |
| − | + | {{LuaIndexItem | |
| − | + | |page=dbvm_speedhack_setSpeed | |
| − | + | |label=dbvm_speedhack_setSpeed | |
| + | |description=Sets system-wide speed hack via DBVM (affects all processes). | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=dbvm_setTSCAdjust | ||
| + | |label=dbvm_setTSCAdjust | ||
| + | |description=Configures TSC (Time Stamp Counter) adjustment to bypass VM detection (RDTSC hooks). | ||
| + | }} | ||
| + | }} | ||
| + | === Translation === | ||
| + | {{LuaIndexBox | ||
| + | |title=Translation | ||
| + | |content= | ||
| + | {{LuaIndexItem | ||
| + | |page=getTranslationFolder | ||
| + | |label=getTranslationFolder | ||
| + | |description=Returns the path to the current translation files. Returns an empty string if no translation is active. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=loadPOFile | ||
| + | |label=loadPOFile | ||
| + | |description=Loads a ".PO" translation file into Cheat Engine's translation system. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=translate | ||
| + | |label=translate | ||
| + | |description=Returns the translated text for a given source string. If no translation is found, returns the original string. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=translateID | ||
| + | |label=translateID | ||
| + | |description=Returns the translation for a specific string ID (lookup by numerical or symbolic ID). | ||
| + | }} | ||
| + | }} | ||
| − | == | + | === Files === |
| − | + | {{LuaIndexBox | |
| + | |title=Files | ||
| + | |content= | ||
| + | {{LuaIndexItem | ||
| + | |page=getFileVersion | ||
| + | |label=getFileVersion | ||
| + | |description=Returns a 64-bit file version and a table splitting the version into <code>major</code>, <code>minor</code>, <code>release</code>, and <code>build</code>. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=getFileList | ||
| + | |label=getFileList | ||
| + | |description=Returns an indexed table (array) of filenames in the specified directory. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=getDirectoryList | ||
| + | |label=getDirectoryList | ||
| + | |description=Returns an indexed table (array) of subdirectory names in the specified directory. | ||
| + | }} | ||
| + | }} | ||
| − | + | === Structures === | |
| − | + | {{LuaIndexBox | |
| − | + | |title=Structures | |
| − | + | |content= | |
| − | + | {{LuaIndexItem | |
| − | + | |page=registerStructureDissectOverride | |
| − | + | |label=registerStructureDissectOverride | |
| − | + | |description=Registers a callback similar to [[Lua:onAutoGuess|onAutoGuess]] that the structure dissect window calls when the user requests Cheat Engine to guess a structure layout. | |
| − | + | }} | |
| − | + | {{LuaIndexItem | |
| − | + | |page=unregisterStructureDissectOverride | |
| − | + | |label=unregisterStructureDissectOverride | |
| − | + | |description=Unregisters a previously registered structure dissect auto-guess override. | |
| − | + | }} | |
| − | + | {{LuaIndexItem | |
| − | + | |page=registerStructureNameLookup | |
| − | + | |label=registerStructureNameLookup | |
| − | + | |description=Registers a function that will be called when the structure dissect UI requests a name for a newly detected structure definition. | |
| − | + | }} | |
| − | + | {{LuaIndexItem | |
| − | + | |page=unregisterStructureNameLookup | |
| − | + | |label=unregisterStructureNameLookup | |
| + | |description=Unregisters a previously registered structure name lookup callback. | ||
| + | }} | ||
| + | }} | ||
| + | === Miscellaneous === | ||
| + | {{LuaIndexBox | ||
| + | |title=Miscellaneous | ||
| + | |content= | ||
| + | {{LuaIndexItem | ||
| + | |page=injectDll | ||
| + | |label=injectDll | ||
| + | |description=Injects a DLL into the currently opened process. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=shellExecute | ||
| + | |label=shellExecute | ||
| + | |description=Executes a given command or opens a file/URL using the system shell. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=executeCode | ||
| + | |label=executeCode | ||
| + | |description=Executes a stdcall function at a given address in the target process with one parameter and waits for it to return. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=executeCodeEx | ||
| + | |label=executeCodeEx | ||
| + | |description=Extended version of <code>executeCode</code> (supports more parameters/options). | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=executeCodeLocal | ||
| + | |label=executeCodeLocal | ||
| + | |description=Executes a stdcall function at a given address in Cheat Engine's own process (local execution). | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=executeCodeLocalEx | ||
| + | |label=executeCodeLocalEx | ||
| + | |description=Extended version of <code>executeCodeLocal</code> with additional options. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=onAPIPointerChange | ||
| + | |label=onAPIPointerChange | ||
| + | |description=Registers a callback invoked when an API pointer is changed (allows reacting to API remapping). | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=setAPIPointer | ||
| + | |label=setAPIPointer | ||
| + | |description=Sets the pointer/address used for a specified API function. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=md5memory | ||
| + | |label=md5memory | ||
| + | |description=Computes and returns the MD5 checksum (hex string) of the bytes at the provided memory address/size. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=md5file | ||
| + | |label=md5file | ||
| + | |description=Computes and returns the MD5 checksum (hex string) of a file's contents. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=getSystemMetrics | ||
| + | |label=getSystemMetrics | ||
| + | |description=Retrieves the specified system metric or configuration setting. See: [https://msdn.microsoft.com/en-us/library/windows/desktop/ms724385.aspx MSDN documentation]. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=getTickCount | ||
| + | |label=getTickCount | ||
| + | |description=Returns the tick count in milliseconds since the system started. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=getUserRegistryEnvironmentVariable | ||
| + | |label=getUserRegistryEnvironmentVariable | ||
| + | |description=Reads an environment variable stored in the current user's registry environment. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=setUserRegistryEnvironmentVariable | ||
| + | |label=setUserRegistryEnvironmentVariable | ||
| + | |description=Writes an environment variable to the current user's registry environment. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=broadcastEnvironmentUpdate | ||
| + | |label=broadcastEnvironmentUpdate | ||
| + | |description=Broadcasts a notification that environment variables were changed (call after setting registry variables). | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=getApplication | ||
| + | |label=getApplication | ||
| + | |description=Returns the application object (main application/titlebar context). | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=getInternet | ||
| + | |label=getInternet | ||
| + | |description=Returns an Internet client class object. The provided string specifies the client name/type. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=signTable | ||
| + | |label=signTable | ||
| + | |description=Signs a .CT-File given a valid and installed Cheat Engine Signature. | ||
| + | }} | ||
| + | }} | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | = | + | <!-- BEGIN: CELUA-75 additional API coverage --> |
| − | + | === Extended API reference (CE 7.5) === | |
| − | + | This section covers additional global and factory APIs exposed by <code>celua-75.lua</code>. It is grouped by the task they support rather than by their implementation order. Class instance methods remain documented with their respective classes. | |
| − | |||
| − | |||
| + | ==== Core runtime, memory, and conversion helpers ==== | ||
| + | Use these for runtime detection, memory-protection changes, byte/value conversion, and sharing simple values between Lua states. | ||
| + | {{LuaIndexBox | ||
| + | |title=Core runtime, memory, and conversion helpers | ||
| + | |content= | ||
| + | {{LuaIndexItem | ||
| + | |page=getOperatingSystem | ||
| + | |label=getOperatingSystem | ||
| + | |description=Returns 0 if CE is running in Windows, 1 for Mac | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=darkMode | ||
| + | |label=darkMode | ||
| + | |description=Returns true if CE is running in windows Dark Mode. Has no effect on mac | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=setMemoryProtection | ||
| + | |label=setMemoryProtection | ||
| + | |description=Sets the given protection on the address range. Note, some systems do not support X and W to be true at the same time | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=readByte | ||
| + | |label=readByte | ||
| + | |description=Alias for readShortInteger; reads an 8-bit integer from target-process memory. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=readShortInteger | ||
| + | |label=readShortInteger | ||
| + | |description=Reads an 8-bit integer from target-process memory. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=writeByte | ||
| + | |label=writeByte | ||
| + | |description=Alias for writeShortInteger; writes an 8-bit integer to target-process memory. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=writeShortInteger | ||
| + | |label=writeShortInteger | ||
| + | |description=Writes an 8-bit integer to target-process memory. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=writePointer | ||
| + | |label=writePointer | ||
| + | |description=Writes a pointer-sized integer to target-process memory. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=writePointerLocal | ||
| + | |label=writePointerLocal | ||
| + | |description=Writes a pointer-sized integer to Cheat Engine memory. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=signExtend | ||
| + | |label=signExtend | ||
| + | |description=Sign-extends a value using the specified most-significant bit. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=extendedToByteTable | ||
| + | |label=extendedToByteTable | ||
| + | |description=Converts an Extended value to a byte table. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=byteTableToExtended | ||
| + | |label=byteTableToExtended | ||
| + | |description=Converts a byte table to an Extended value (returned as a double). | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=getGlobalVariable | ||
| + | |label=getGlobalVariable | ||
| + | |description=Returns the given variable from the main lua state. Only basic types are supported. (Handy for new lua state threads) | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=setGlobalVariable | ||
| + | |label=setGlobalVariable | ||
| + | |description=Sets the global variable names string in the main lua state. Only basic types are supported | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=encodeFunctionEx | ||
| + | |label=encodeFunctionEx | ||
| + | |description=Encodes a Lua script, optionally using the specified Lua DLL. | ||
| + | }} | ||
| + | }} | ||
| − | == | + | ==== Files, symbol loading, and native compilation ==== |
| − | + | These APIs operate on paths, augment symbol information, or compile and assemble native and .NET code. | |
| − | + | {{LuaIndexBox | |
| − | + | |title=Files, symbol loading, and native compilation | |
| − | + | |content= | |
| + | {{LuaIndexItem | ||
| + | |page=extractFileName | ||
| + | |label=extractFileName | ||
| + | |description=returns the filename of the path | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=extractFileExt | ||
| + | |label=extractFileExt | ||
| + | |description=returns the file extension of the path | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=extractFileNameWithoutExt | ||
| + | |label=extractFileNameWithoutExt | ||
| + | |description=Returns the filename of the path, without the extension | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=extractFilePath | ||
| + | |label=extractFilePath | ||
| + | |description=removes the filename from the path | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=getTempFolder | ||
| + | |label=getTempFolder | ||
| + | |description=Returns the path to the temp folder | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=fileExists | ||
| + | |label=fileExists | ||
| + | |description=Returns true if a file exists at that path | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=deleteFile | ||
| + | |label=deleteFile | ||
| + | |description=Returns true if a file existed at that path, and now not anymore | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=enableWindowsSymbols | ||
| + | |label=enableWindowsSymbols | ||
| + | |description=Will download the PDB files of Windows and load them (Takes a long time the first time) | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=enableKernelSymbols | ||
| + | |label=enableKernelSymbols | ||
| + | |description=Will check the option for kernelmode symbols in memory view (Gets only the exports unless enableWindowsSymbols() is used) | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=getRTTIClassName | ||
| + | |label=getRTTIClassName | ||
| + | |description=Returns the classname of a given structure based on RTTI information (assuming it can be found, returns nil if not or unknown) | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=reinitializeSelfSymbolhandler | ||
| + | |label=reinitializeSelfSymbolhandler | ||
| + | |description=Reinitializes Cheat Engine's own symbol handler. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=waitForSections | ||
| + | |label=waitForSections | ||
| + | |description=Waits till the sections have been enumerated | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=waitForExports | ||
| + | |label=waitForExports | ||
| + | |description=Waits till all DLL Exports are loaded | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=waitForDotNet | ||
| + | |label=waitForDotNet | ||
| + | |description=Waits till all .NET symbols are loaded (this includes DLL Exports) | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=waitForPDB | ||
| + | |label=waitForPDB | ||
| + | |description=Waits till all PDB symbols are loaded (this includes DLL Exports, and .NET) | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=searchPDBWhileLoading | ||
| + | |label=searchPDBWhileLoading | ||
| + | |description=Will interrupt symbol enum to query the debughelp symbol handler about a specific symbol. This can take a while. Default is false | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=releaseDebugFiles | ||
| + | |label=releaseDebugFiles | ||
| + | |description=Stops the symbolloader from processing any debug files and releases what it had open | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=waitforsymbols | ||
| + | |label=waitforsymbols | ||
| + | |description=If set to true looking up a symbol will wait for the symbol to be loaded(default true) | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=assemble | ||
| + | |label=assemble | ||
| + | |description=Assembles one instruction and returns its bytes. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=compile | ||
| + | |label=compile | ||
| + | |description=Compiles C code and returns a table with the addresses of the symbols on success, or nil with a secondary result containing the errormessage | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=compileFiles | ||
| + | |label=compileFiles | ||
| + | |description=Compiles an indexed list of C source files. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=compileTCCLib | ||
| + | |label=compileTCCLib | ||
| + | |description=Compiles the TCC library functions some C code may need to function internally | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=addCIncludePath | ||
| + | |label=addCIncludePath | ||
| + | |description=Adds an extra default include path for the compile() function | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=removeCIncludePath | ||
| + | |label=removeCIncludePath | ||
| + | |description=Removes a specific path previously added with addCIncludePath | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=compileCS | ||
| + | |label=compileCS | ||
| + | |description=Compiles c# code and returns the autogenerated filename. references is a list of c# assemblies this code may reference. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=dotNetExecuteClassMethod | ||
| + | |label=dotNetExecuteClassMethod | ||
| + | |description=Calls a static .NET class method from Cheat Engine. | ||
| + | }} | ||
| + | }} | ||
| + | ==== Auto Assembler authoring and callbacks ==== | ||
| + | Use callback registrations to extend Auto Assembler parsing and structure dissection; keep any returned registration ID for cleanup. | ||
| + | {{LuaIndexBox | ||
| + | |title=Auto Assembler authoring and callbacks | ||
| + | |content= | ||
| + | {{LuaIndexItem | ||
| + | |page=registerLuaFunctionHighlight | ||
| + | |label=registerLuaFunctionHighlight | ||
| + | |description=Makes the lua highlighter show the functionname as a functionkeyword | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=unregisterLuaFunctionHighlight | ||
| + | |label=unregisterLuaFunctionHighlight | ||
| + | |description=Removes the given name from showing up as a functionkeyword | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=registerGlobalStructureListUpdateNotification | ||
| + | |label=registerGlobalStructureListUpdateNotification | ||
| + | |description=Registers a callback for global-structure-list updates. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=unregisterGlobalStructureListUpdateNotification | ||
| + | |label=unregisterGlobalStructureListUpdateNotification | ||
| + | |description=Unregisters a global-structure-list update callback. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=registerStructureAndElementListCallback | ||
| + | |label=registerStructureAndElementListCallback | ||
| + | |description=Registers a function to be called when a structure needs to be dissected | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=unregisterStructureAndElementListCallback | ||
| + | |label=unregisterStructureAndElementListCallback | ||
| + | |description=Unregisters the structure and element list callback. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=getNextAllocNumber | ||
| + | |label=getNextAllocNumber | ||
| + | |description=Returns the next unused newmem allocation number in an Auto Assembler script. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=addSnapshotAsComment | ||
| + | |label=addSnapshotAsComment | ||
| + | |description=Adds a snapshot of original code as a comment to an Auto Assembler script. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=getUniqueAOB | ||
| + | |label=getUniqueAOB | ||
| + | |description=Finds a unique AOB pattern for an address and returns its offset. | ||
| + | }} | ||
| + | }} | ||
| − | == | + | ==== Process control, code execution, and prompts ==== |
| − | + | This group covers process handles, code invocation, clipboard access, GC control, and small user-facing dialogs. | |
| − | + | {{LuaIndexBox | |
| − | + | |title=Process control, code execution, and prompts | |
| + | |content= | ||
| + | {{LuaIndexItem | ||
| + | |page=showSelectionList | ||
| + | |label=showSelectionList | ||
| + | |description=Shows a selection list and returns the selected index and text. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=duplicateHandle | ||
| + | |label=duplicateHandle | ||
| + | |description=Duplicates the provided CE based handle into the target process (You still need tell the target about this handle, like an injected dll data block) | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=onTableLoad | ||
| + | |label=onTableLoad | ||
| + | |description=If defined this function will be called twice when a table gets loaded. Once before the loading, and once after. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=getOpenedProcessHandle | ||
| + | |label=getOpenedProcessHandle | ||
| + | |description=Returns the handle of the currently opened process | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=getOpenedFileSize | ||
| + | |label=getOpenedFileSize | ||
| + | |description=Returns the size of the currently opened target executable. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=getPointerSize | ||
| + | |label=getPointerSize | ||
| + | |description=Gets the current pointersize | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=cpuid | ||
| + | |label=cpuid | ||
| + | |description=Returns CPUID register values for the supplied EAX and ECX inputs. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=gc_setPassive | ||
| + | |label=gc_setPassive | ||
| + | |description=Enables or disables the passive Lua garbage collector. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=gc_setActive | ||
| + | |label=gc_setActive | ||
| + | |description=Configures the active Lua garbage collector. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=invertColor | ||
| + | |label=invertColor | ||
| + | |description=Returns the inverted color | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=runCommand | ||
| + | |label=runCommand | ||
| + | |description=Executes the given command and returns the output of the command as a string and the exitcode as an integer (Should not open a console window) If pathtoexecutein is not provided the path... | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=readFromClipboard | ||
| + | |label=readFromClipboard | ||
| + | |description=Reads the text from the clipboard | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=injectLibrary | ||
| + | |label=injectLibrary | ||
| + | |description=Alias for injectDLL; injects a DLL or dylib into the target process. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=injectDotNetDLL | ||
| + | |label=injectDotNetDLL | ||
| + | |description=Injects a .NET assembly and invokes its specified method. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=executeMethod | ||
| + | |label=executeMethod | ||
| + | |description=Executes a method. | ||
| + | }} | ||
| + | }} | ||
| + | ==== Target inspection, allocation, and task progress ==== | ||
| + | These helpers inspect the target architecture, allocate memory in Cheat Engine, disassemble bytes, or update Windows taskbar progress. | ||
| + | {{LuaIndexBox | ||
| + | |title=Target inspection, allocation, and task progress | ||
| + | |content= | ||
| + | {{LuaIndexItem | ||
| + | |page=allocateSharedMemoryLocal | ||
| + | |label=allocateSharedMemoryLocal | ||
| + | |description=Allocates named shared memory in the Cheat Engine process. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=targetIsX86 | ||
| + | |label=targetIsX86 | ||
| + | |description=Returns true if the target process is x86 based | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=targetIsArm | ||
| + | |label=targetIsArm | ||
| + | |description=Returns true if the target process is arm based | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=targetIsAndroid | ||
| + | |label=targetIsAndroid | ||
| + | |description=Returns true if the target process is running on the Android OS | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=getAutorunPath | ||
| + | |label=getAutorunPath | ||
| + | |description=Returns the autorun path | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=disassembleBytes | ||
| + | |label=disassembleBytes | ||
| + | |description=Disassembles the given bytes and returns the result. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=printf | ||
| + | |label=printf | ||
| + | |description=Same as print(string.format(...)) | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=setProgressState | ||
| + | |label=setProgressState | ||
| + | |description=Sets the state of the cheatengine task in the taskbar (windows only) values: tbpsNone, tbpsIndeterminate, tbpsNormal, tbpsError, tbpsPaused | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=setProgressValue | ||
| + | |label=setProgressValue | ||
| + | |description=Sets the state of the cheatengine task progress status | ||
| + | }} | ||
| + | }} | ||
| − | == | + | ==== Registered symbols ==== |
| − | + | Use these only for symbols registered through Lua or Auto Assembler; they do not enumerate every symbol known to the symbol handler. | |
| − | + | {{LuaIndexBox | |
| − | + | |title=Registered symbols | |
| − | + | |content= | |
| + | {{LuaIndexItem | ||
| + | |page=enumRegisteredSymbols | ||
| + | |label=enumRegisteredSymbols | ||
| + | |description=Returns a table with elements containing {symbolname, address, OPTIONAL {allocsize, processid, donotsave}} | ||
| + | {{LuaIndexItem | ||
| + | |page=deleteAllRegisteredSymbols | ||
| + | |label=deleteAllRegisteredSymbols | ||
| + | |description=Deletes all symbols registered with registerSymbols, both in AA and Lua scripts (Does not remove registered symbolLists)}} | ||
| + | }} | ||
| + | ==== Debugging extensions ==== | ||
| + | These functions add debugger state checks and per-thread breakpoint control beyond the main debugger section. | ||
| + | {{LuaIndexBox | ||
| + | |title=Debugging extensions | ||
| + | |content= | ||
| + | {{LuaIndexItem | ||
| + | |page=debug_isStepping | ||
| + | |label=debug_isStepping | ||
| + | |description=Returns true if the debugger was single stepping an instruction earlier | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=debug_breakThread | ||
| + | |label=debug_breakThread | ||
| + | |description=Breaks the thread with the specific threadID (Note: The thread may not break instantly and may have to be awakened first) | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=debug_setBreakpointForThread | ||
| + | |label=debug_setBreakpointForThread | ||
| + | |description=sets a breakpoint of a specific size at the given address for the specified thread. if trigger is bptExecute then size is ignored. | ||
| + | }} | ||
| + | }} | ||
| − | == | + | ==== Forms, controls, graphics, dialogs, and streams ==== |
| − | + | All <code>create...</code> entries here return a CE class object. Assign an owner where the function accepts one so the object's lifetime is managed correctly. | |
| − | + | {{LuaIndexBox | |
| − | + | |title=Forms, controls, graphics, dialogs, and streams | |
| − | + | |content= | |
| − | + | {{LuaIndexItem | |
| − | + | |page=createRegion | |
| − | + | |label=createRegion | |
| − | + | |description=Created an empty region | |
| − | + | }} | |
| − | + | {{LuaIndexItem | |
| − | + | |page=createMenuItem | |
| − | + | |label=createMenuItem | |
| − | + | |description=Creates a menu item that gets added to the owner menu | |
| − | + | }} | |
| + | {{LuaIndexItem | ||
| + | |page=createMainMenu | ||
| + | |label=createMainMenu | ||
| + | |description=Creates a MainMenu object. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=createPopupMenu | ||
| + | |label=createPopupMenu | ||
| + | |description=Creates a PopupMenu object. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=createImageList | ||
| + | |label=createImageList | ||
| + | |description=creates an imagelist object | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=createStringlist | ||
| + | |label=createStringlist | ||
| + | |description=Creates a stringlist class object (for whatever reason, lua strings are probably easier to use) | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=createForm | ||
| + | |label=createForm | ||
| + | |description=creates a CEForm class object(window) and returns the pointer for it. Visible is default true but can be changed | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=createFormFromFile | ||
| + | |label=createFormFromFile | ||
| + | |description=Returns the generated CEform | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=createFormFromStream | ||
| + | |label=createFormFromStream | ||
| + | |description=Returns the generated CEform | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=createLuaEngine | ||
| + | |label=createLuaEngine | ||
| + | |description=Creates a new lua engine form object. If there is no main luaengine window, this will become it. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=createAutoAssemblerForm | ||
| + | |label=createAutoAssemblerForm | ||
| + | |description=TFrmAutoInject - Spawns an autoassembler window with the optionally provided script | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=createPaintBox | ||
| + | |label=createPaintBox | ||
| + | |description=Creates a Paintbox class object | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=createLabel | ||
| + | |label=createLabel | ||
| + | |description=Creates a Label class object which belongs to the given owner. Owner can be any object inherited from WinControl | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=createSplitter | ||
| + | |label=createSplitter | ||
| + | |description=Creates a Splitter class object which belongs to the given owner. Owner can be any object inherited from WinControl | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=createPanel | ||
| + | |label=createPanel | ||
| + | |description=Creates a Panel class object which belongs to the given owner. Owner can be any object inherited from WinControl | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=createImage | ||
| + | |label=createImage | ||
| + | |description=Creates an Image class object which belongs to the given owner. Owner can be any object inherited from WinControl | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=createEdit | ||
| + | |label=createEdit | ||
| + | |description=Creates an Edit class object which belongs to the given owner. Owner can be any object inherited from WinControl | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=createMemo | ||
| + | |label=createMemo | ||
| + | |description=Creates a Memo class object which belongs to the given owner. Owner can be any object inherited from WinControl | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=createSynEdit | ||
| + | |label=createSynEdit | ||
| + | |description=Creates a synedit object. mode: 0=Lua highlighting, 1=Auto Assembler highlighting | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=createButton | ||
| + | |label=createButton | ||
| + | |description=Creates a Button class object which belongs to the given owner. Owner can be any object inherited from WinControl | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=createCheckBox | ||
| + | |label=createCheckBox | ||
| + | |description=Creates a CheckBox class object which belongs to the given owner. Owner can be any object inherited from WinControl | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=createToggleBox | ||
| + | |label=createToggleBox | ||
| + | |description=Creates a ToggleBox class object which belongs to the given owner. Owner can be any object inherited from WinControl | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=createGroupBox | ||
| + | |label=createGroupBox | ||
| + | |description=Creates a GroupBox class object which belongs to the given owner. Owner can be any object inherited from WinControl | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=createRadioGroup | ||
| + | |label=createRadioGroup | ||
| + | |description=Creates a RadioGroup class object which belongs to the given owner. Owner can be any object inherited from WinControl | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=createListBox | ||
| + | |label=createListBox | ||
| + | |description=Creates a ListBox class object which belongs to the given owner. Owner can be any object inherited from WinControl | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=createCalendar | ||
| + | |label=createCalendar | ||
| + | |description=Creates a Calendar class object which belongs to the given owner. Owner can be any object inherited from WinControl. Valid date is between "September 14, 1752" and "December 31, 9999" | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=createComboBox | ||
| + | |label=createComboBox | ||
| + | |description=Creates a ComboBox class object which belongs to the given owner. Owner can be any object inherited from WinControl | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=createProgressBar | ||
| + | |label=createProgressBar | ||
| + | |description=Creates a ProgressBar class object which belongs to the given owner. Owner can be any object inherited from WinControl | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=createTrackBar | ||
| + | |label=createTrackBar | ||
| + | |description=Creates a TrackBar class object which belongs to the given owner. Owner can be any object inherited from WinControl | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=createListView | ||
| + | |label=createListView | ||
| + | |description=Creates a ListView class object which belongs to the given owner. Owner can be any object inherited from WinControl | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=createTreeView | ||
| + | |label=createTreeView | ||
| + | |description=Creates a TreeView object. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=createTimer | ||
| + | |label=createTimer | ||
| + | |description=Creates a Timer object. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=createFont | ||
| + | |label=createFont | ||
| + | |description=Returns a font object (default initialized based on the main ce window) | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=createBitmap | ||
| + | |label=createBitmap | ||
| + | |description=Returns a Bitmap object | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=createPNG | ||
| + | |label=createPNG | ||
| + | |description=Returns a PortableNetworkGraphic object | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=createJpeg | ||
| + | |label=createJpeg | ||
| + | |description=Returns a Jpeg object | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=createIcon | ||
| + | |label=createIcon | ||
| + | |description=Returns an Icon object | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=createPicture | ||
| + | |label=createPicture | ||
| + | |description=Returns a empty picture object | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=createHotkey | ||
| + | |label=createHotkey | ||
| + | |description=returns an initialized GenericHotkey class object. Maximum of 5 keys | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=createColorDialog | ||
| + | |label=createColorDialog | ||
| + | |description=Creates a new colordialog | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=createColorBox | ||
| + | |label=createColorBox | ||
| + | |description=Creates a new colorbox | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=createFindDialog | ||
| + | |label=createFindDialog | ||
| + | |description=Creates a find dialog object. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=createOpenDialog | ||
| + | |label=createOpenDialog | ||
| + | |description=Creates an opendialog object | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=createSaveDialog | ||
| + | |label=createSaveDialog | ||
| + | |description=Creates a save dialog object. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=createSelectDirectoryDialog | ||
| + | |label=createSelectDirectoryDialog | ||
| + | |description=Creates a directory-selection dialog object. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=createFileStream | ||
| + | |label=createFileStream | ||
| + | |description=Creates a file-backed stream with the requested mode. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=createStringStream | ||
| + | |label=createStringStream | ||
| + | |description=Creates a stream backed by a string buffer. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=createMemScan | ||
| + | |label=createMemScan | ||
| + | |description=Returns a new MemScan class object | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=createFoundList | ||
| + | |label=createFoundList | ||
| + | |description=Creates a FoundList for the provided MemScan object. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=createMemoryView | ||
| + | |label=createMemoryView | ||
| + | |description=Creates a new memoryview window. This window will not receive debug events. Use getMemoryViewForm() function to get the main memoryview window | ||
| + | }} | ||
| + | }} | ||
| + | ==== Threads, synchronization, and structures ==== | ||
| + | Use synchronization objects when worker threads share state. Structure helpers create or retrieve layout definitions used by the structure dissector. | ||
| + | {{LuaIndexBox | ||
| + | |title=Threads, synchronization, and structures | ||
| + | |content= | ||
| + | {{LuaIndexItem | ||
| + | |page=createThread | ||
| + | |label=createThread | ||
| + | |description=Creates and starts a native thread for the supplied Lua function. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=createThreadSuspended | ||
| + | |label=createThreadSuspended | ||
| + | |description=Creates a native thread in the suspended state. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=createThreadNewState | ||
| + | |label=createThreadNewState | ||
| + | |description=Creates a new thread in a new lua state. This is more efficient as no locking inside lua takes place, but has no access to userdefined lua functions and only limited base CE functions. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=createCriticalSection | ||
| + | |label=createCriticalSection | ||
| + | |description=Returns a critical section object | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=createEvent | ||
| + | |label=createEvent | ||
| + | |description=Returns an event object | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=createSemaphore | ||
| + | |label=createSemaphore | ||
| + | |description=Returns an semaphore object | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=createMultiReadExclusiveWriteSynchronizer | ||
| + | |label=createMultiReadExclusiveWriteSynchronizer | ||
| + | |description=Returns a createMultiReadExclusiveWriteSynchronizer | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=createStructureForm | ||
| + | |label=createStructureForm | ||
| + | |description=Opens a structure dissect form for an address. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=enumStructureForms | ||
| + | |label=enumStructureForms | ||
| + | |description=returns a table of StructureFrm objects (can be useful for finding a structure window with the wanted structure) | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=getStructureCount | ||
| + | |label=getStructureCount | ||
| + | |description=Returns the number of Global structures. (Global structures are the visible structures) | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=getStructure | ||
| + | |label=getStructure | ||
| + | |description=Returns the Structure object at the given index | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=createStructure | ||
| + | |label=createStructure | ||
| + | |description=Returns an empty structure object (Not yet added to the Global list. Call structure.addToGlobalStructureList manually) | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=createStructureFromName | ||
| + | |label=createStructureFromName | ||
| + | |description=If PDB files are loaded this will create a structure with that name if it can be found | ||
| + | }} | ||
| + | }} | ||
| − | = | + | ==== Low-level memory: DBK and DBVM ==== |
| − | + | '''Advanced / platform-specific.''' These APIs require the DBK driver and/or DBVM and can affect the whole system, not only the opened process. | |
| + | {{LuaIndexBox | ||
| + | |title=Low-level memory: DBK and DBVM | ||
| + | |content= | ||
| + | {{LuaIndexItem | ||
| + | |page=dbk_usePhysicalMemoryAccess | ||
| + | |label=dbk_usePhysicalMemoryAccess | ||
| + | |description=Changes all memory access to physical memory | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=dbk_setSaferPhysicalMemoryScanning | ||
| + | |label=dbk_setSaferPhysicalMemoryScanning | ||
| + | |description=When set to true CE's memory scanner will skip hardware device owned memory. Default state is true | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=dbk_readPhysicalMemory | ||
| + | |label=dbk_readPhysicalMemory | ||
| + | |description=Reads physical memory through the DBK driver and returns a byte table. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=dbk_writePhysicalMemory | ||
| + | |label=dbk_writePhysicalMemory | ||
| + | |description=Writes physical memory through the DBK driver. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=dbvm_setKeys | ||
| + | |label=dbvm_setKeys | ||
| + | |description=Sets the keys to operate DBVM. Key1 and Key3 are pointersize, key2 is 32-bit. Note that if key1 or key3 are 64-bit wide, 32-bit CE can not use DBVM. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=dbvm_getMemory | ||
| + | |label=dbvm_getMemory | ||
| + | |description=Returns the total memory free for DBVM, and the total number of full pages as secondary result | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=dbvm_watch_executes | ||
| + | |label=dbvm_watch_executes | ||
| + | |description=Creates a DBVM watch that records instruction execution. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=dbvm_traceonbp | ||
| + | |label=dbvm_traceonbp | ||
| + | |description=Sets a int3 breakpoint at the given address after cloaking that page and when hit does a trace. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=dbvm_traceonbp_getstatus | ||
| + | |label=dbvm_traceonbp_getstatus | ||
| + | |description=Returns DBVM trace status, current entry count, and maximum count. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=dbvm_traceonbp_stoptrace | ||
| + | |label=dbvm_traceonbp_stoptrace | ||
| + | |description=Requests the active DBVM trace to stop. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=dbvm_traceonbp_remove | ||
| + | |label=dbvm_traceonbp_remove | ||
| + | |description=Disables the current trace and removes all results | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=dbvm_traceonbp_retrievelog | ||
| + | |label=dbvm_traceonbp_retrievelog | ||
| + | |description=Returns an array of traceentries. (Context of the system at the time of the event, like registers) | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=dbvm_bp_getBrokenThreadListSize | ||
| + | |label=dbvm_bp_getBrokenThreadListSize | ||
| + | |description=Returns the number of breakpoint slots currently available | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=dbvm_bp_getBrokenThreadEventShort | ||
| + | |label=dbvm_bp_getBrokenThreadEventShort | ||
| + | |description=Returns summary information for a DBVM breakpoint event. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=dbvm_bp_getBrokenThreadEventFull | ||
| + | |label=dbvm_bp_getBrokenThreadEventFull | ||
| + | |description=Returns full register, FPU, and stack information for a DBVM breakpoint event. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=dbvm_bp_setBrokenThreadEventFull | ||
| + | |label=dbvm_bp_setBrokenThreadEventFull | ||
| + | |description=Sets the state of the frozen thread | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=dbvm_bp_resumeBrokenThread | ||
| + | |label=dbvm_bp_resumeBrokenThread | ||
| + | |description=Resumes the specific thread. continueMethod can be 0=run, 1=step into | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=dbvm_bp_getProcessAndThreadIDFromEvent | ||
| + | |label=dbvm_bp_getProcessAndThreadIDFromEvent | ||
| + | |description=Returns the process and thread IDs for a DBVM breakpoint event. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=getPhysicalAddressCR3 | ||
| + | |label=getPhysicalAddressCR3 | ||
| + | |description=Looks up the physical address for the given virtual address in the given pagetable base. Returns nil if not paged | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=readProcessMemoryCR3 | ||
| + | |label=readProcessMemoryCR3 | ||
| + | |description=Reads the virtual memory of the given process's CR3 value. Returns a bytetable on success, nil if fail to read (paged out) | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=writeProcessMemoryCR3 | ||
| + | |label=writeProcessMemoryCR3 | ||
| + | |description=Writes virtual memory using the supplied process CR3 value. | ||
| + | }} | ||
| + | }} | ||
| − | + | ==== Direct3D, disassembly, and pipes ==== | |
| − | + | Use this group for overlays, custom disassembly output, named-pipe communication, and related analysis tools. | |
| − | + | {{LuaIndexBox | |
| − | + | |title=Direct3D, disassembly, and pipes | |
| − | + | |content= | |
| − | + | {{LuaIndexItem | |
| − | + | |page=createD3DHook | |
| − | + | |label=createD3DHook | |
| − | + | |description=Creates a Direct3D hook object. | |
| − | + | }} | |
| − | + | {{LuaIndexItem | |
| − | + | |page=createDisassembler | |
| − | + | |label=createDisassembler | |
| − | + | |description=Creates a disassembler object that can be used to disassemble an instruction and at the same time get more data | |
| − | + | }} | |
| − | + | {{LuaIndexItem | |
| − | + | |page=getDefaultDisassembler | |
| − | + | |label=getDefaultDisassembler | |
| − | + | |description=Returns the default disassembler object used by a lot of ce's disassembler routines (Only use this from the main thread) | |
| − | + | }} | |
| − | + | {{LuaIndexItem | |
| − | + | |page=getVisibleDisassembler | |
| − | + | |label=getVisibleDisassembler | |
| − | + | |description=Returns the legacy shared visible-disassembler override object. | |
| − | + | }} | |
| − | + | {{LuaIndexItem | |
| − | + | |page=registerGlobalDisassembleOverride | |
| − | + | |label=registerGlobalDisassembleOverride | |
| − | + | |description=Same as Disassembler.OnDisassembleOverride, but does it for all disassemblers, including newly created ones. Tip: Check the sender to see if you should use syntax highlighting codes or not | |
| − | + | }} | |
| − | + | {{LuaIndexItem | |
| − | + | |page=unregisterGlobalDisassembleOverride | |
| − | + | |label=unregisterGlobalDisassembleOverride | |
| − | + | |description=Unregisters a global disassembler override callback. | |
| − | + | }} | |
| − | + | {{LuaIndexItem | |
| − | + | |page=getDissectCode | |
| − | + | |label=getDissectCode | |
| − | + | |description=Creates or returns the current code DissectCode object | |
| − | + | }} | |
| − | + | {{LuaIndexItem | |
| − | + | |page=createRipRelativeScanner | |
| − | + | |label=createRipRelativeScanner | |
| − | + | |description=Creates a RipRelativeScanner object. | |
| − | + | }} | |
| − | + | {{LuaIndexItem | |
| − | + | |page=connectToPipe | |
| − | + | |label=connectToPipe | |
| − | + | |description=Returns a LuaPipeClient connected to the given pipename. Nil if the connection fails. Timeout is number of milliseconds before it disconnects on read/write operations. 0 or nil means never | |
| − | + | }} | |
| − | + | {{LuaIndexItem | |
| − | + | |page=createPipe | |
| − | + | |label=createPipe | |
| − | + | |description=Creates a LuaPipeServer which can be connected to by a pipe client. InputSize and Outputsize define buffers how much data can be in the specific buffer before the writer halts. | |
| − | + | }} | |
| − | + | {{LuaIndexItem | |
| − | + | |page=openLuaServer | |
| − | + | |label=openLuaServer | |
| − | + | |description=Starts a Lua server with the supplied name. | |
| − | + | }} | |
| − | + | {{LuaIndexItem | |
| − | + | |page=getUltimap2 | |
| − | + | |label=getUltimap2 | |
| − | + | |description=Returns the Ultimap2 form, or nil when it is not open. | |
| − | + | }} | |
| − | + | {{LuaIndexItem | |
| − | + | |page=getCodeFilter | |
| − | + | |label=getCodeFilter | |
| − | + | |description=Returns the Code Filter form. | |
| − | + | }} | |
| − | + | }} | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| + | ==== SQL and data access ==== | ||
| + | These factory functions create database connections, transactions, and queries. Configure the appropriate connection before executing a query. | ||
| + | {{LuaIndexBox | ||
| + | |title=SQL and data access | ||
| + | |content= | ||
| + | {{LuaIndexItem | ||
| + | |page=createSQLite3Connection | ||
| + | |label=createSQLite3Connection | ||
| + | |description=creates an SQLite3Connection object | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=setSQLiteLibraryName | ||
| + | |label=setSQLiteLibraryName | ||
| + | |description=Lets you set the path to the sqlite3.dll in case it's not .\win*\sqlite3.dll | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=createODBCConnection | ||
| + | |label=createODBCConnection | ||
| + | |description=creates an ODBCConnection object | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=createSQLTransaction | ||
| + | |label=createSQLTransaction | ||
| + | |description=Creates an SQLTransaction object | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=createSQLQuery | ||
| + | |label=createSQLQuery | ||
| + | |description=Creates an SQL query object. | ||
| + | }} | ||
| + | }} | ||
| − | == | + | ==== Modules, .NET, and diagrams ==== |
| − | + | The .NET functions query data collected from the target; they require an active .NET data collector and may return empty data when the runtime is unavailable. | |
| − | + | {{LuaIndexBox | |
| − | + | |title=Modules, .NET, and diagrams | |
| − | + | |content= | |
| − | + | {{LuaIndexItem | |
| − | + | |page=getHotkeyHandlerThread | |
| − | + | |label=getHotkeyHandlerThread | |
| − | + | |description=Returns the hotkey handler thread used internally by CE | |
| − | + | }} | |
| − | + | {{LuaIndexItem | |
| − | + | |page=createRemoteThread | |
| − | + | |label=createRemoteThread | |
| − | + | |description=Creates a remote thread in the target process. | |
| − | + | }} | |
| − | + | {{LuaIndexItem | |
| + | |page=loadModule | ||
| + | |label=loadModule | ||
| + | |description=Loads a DLL/module into the target process. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=getDotNetDataCollector | ||
| + | |label=getDotNetDataCollector | ||
| + | |description=Returns the current dotnetdatacollector object | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=enumDomains | ||
| + | |label=enumDomains | ||
| + | |description=Returns all .NET application domains collected from the target. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=enumModuleList | ||
| + | |label=enumModuleList | ||
| + | |description=Returns .NET modules for the specified application domain. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=enumTypeDefs | ||
| + | |label=enumTypeDefs | ||
| + | |description=Returns type definitions for the specified .NET module. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=getTypeDefMethods | ||
| + | |label=getTypeDefMethods | ||
| + | |description=Returns methods for the specified .NET type definition. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=getTypeDefParent | ||
| + | |label=getTypeDefParent | ||
| + | |description=Returns the parent module and type definition for a .NET type. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=getTypeDefData | ||
| + | |label=getTypeDefData | ||
| + | |description=Returns field and layout data for the specified .NET type. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=getMethodParameters | ||
| + | |label=getMethodParameters | ||
| + | |description=Returns parameters for the specified .NET method. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=getAddressData | ||
| + | |label=getAddressData | ||
| + | |description=Returns .NET object and field data for the specified address. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=enumAllObjects | ||
| + | |label=enumAllObjects | ||
| + | |description=Enumerates all collected .NET objects; this may take a long time. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=enumAllObjectsOfType | ||
| + | |label=enumAllObjectsOfType | ||
| + | |description=Returns addresses of collected .NET objects with the specified type. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=createDiagram | ||
| + | |label=createDiagram | ||
| + | |description=Creates a diagram control object. | ||
| + | }} | ||
| + | }} | ||
| + | ==== Remote execution, XML, and virtual trees ==== | ||
| + | These APIs create reusable helpers for remote calls, XML documents, custom CE controls, and virtual trees. | ||
| + | {{LuaIndexBox | ||
| + | |title=Remote execution, XML, and virtual trees | ||
| + | |content= | ||
| + | {{LuaIndexItem | ||
| + | |page=createExecuteMethodStub | ||
| + | |label=createExecuteMethodStub | ||
| + | |description=Creates an ExecuteCodeExStub object which the executor can execute | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=createExecuteCodeExStub | ||
| + | |label=createExecuteCodeExStub | ||
| + | |description=Creates an ExecuteCodeExStub object which the executor can execute | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=createRemoteExecutor | ||
| + | |label=createRemoteExecutor | ||
| + | |description=creates a new remote executor | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=createCECustomButton | ||
| + | |label=createCECustomButton | ||
| + | |description=Creates a Cheat Engine custom button control. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=createXMLDocument | ||
| + | |label=createXMLDocument | ||
| + | |description=Creates an empty XML document | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=createXMLDocumentFromFile | ||
| + | |label=createXMLDocumentFromFile | ||
| + | |description=reads the given filename and return an XMLDocument with the parsed contents of the file | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=createXMLDocumentFromStream | ||
| + | |label=createXMLDocumentFromStream | ||
| + | |description=reads the given stream and returns an XMLDocument with the parsed contents of the stream | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=createVirtualStringTree | ||
| + | |label=createVirtualStringTree | ||
| + | |description=Creates a VirtualStringTree object. | ||
| + | }} | ||
| + | }} | ||
| − | == | + | ==== CEServer and Lua string extensions ==== |
| − | + | CEServer functions apply only after connecting to a server. The string functions are called as methods (for example <code>text:startsWith('CE')</code>). | |
| − | + | {{LuaIndexBox | |
| − | + | |title=CEServer and Lua string extensions | |
| − | + | |content= | |
| − | + | {{LuaIndexItem | |
| − | + | |page=isConnectedToCEServer | |
| + | |label=isConnectedToCEServer | ||
| + | |description=Returns whether Cheat Engine is connected to CEServer. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=getCEServerPath | ||
| + | |label=getCEServerPath | ||
| + | |description=Returns the CEServer path on the target. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=split | ||
| + | |label=split | ||
| + | |description=Splits a string at the specified separator. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=endsWith | ||
| + | |label=endsWith | ||
| + | |description=Returns whether a string ends with the specified text. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=startsWith | ||
| + | |label=startsWith | ||
| + | |description=Returns whether a string starts with the specified text. | ||
| + | }} | ||
| + | }} | ||
| + | <!-- END: CELUA-75 additional API coverage --> | ||
| − | == | + | == Classes == |
| − | + | A compact list of notable classes implemented by Cheat Engine. | |
| + | {{LuaIndexBox | ||
| + | |title=Classes | ||
| + | |content= | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:Addresslist | ||
| + | |label=Addresslist | ||
| + | |description=Container for memory records in a cheat table. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:Bitmap | ||
| + | |label=Bitmap | ||
| + | |description=Bitmap graphic object for drawing images. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:Brush | ||
| + | |label=Brush | ||
| + | |description=Brush used by a Canvas to fill areas. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:Button | ||
| + | |label=Button | ||
| + | |description=Visual button component. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:ButtonControl | ||
| + | |label=ButtonControl | ||
| + | |description=Base class common to button-like controls. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:Canvas | ||
| + | |label=Canvas | ||
| + | |description=Drawing surface used in paint events for lines, text, and images. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:Calendar | ||
| + | |label=Calendar | ||
| + | |description=Calendar/date-picker UI control. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:CEForm | ||
| + | |label=CEForm | ||
| + | |description=Cheat Engine main/form window class. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:CheatComponent | ||
| + | |label=CheatComponent | ||
| + | |description=Component used in Cheat Engine 5.x trainers. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:CheckBox | ||
| + | |label=CheckBox | ||
| + | |description=Checkbox UI control supporting checked/unchecked/indeterminate states. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:Component | ||
| + | |label=Component | ||
| + | |description=Base class for owner-managed components. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:Control | ||
| + | |label=Control | ||
| + | |description=Base class for visible UI controls. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:Collection | ||
| + | |label=Collection | ||
| + | |description=Abstract collection class (used by ListColumns and similar). | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:CollectionItem | ||
| + | |label=CollectionItem | ||
| + | |description=Item managed by a Collection. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:ComboBox | ||
| + | |label=ComboBox | ||
| + | |description=Edit field with an attached dropdown ListBox. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:CriticalSection | ||
| + | |label=CriticalSection | ||
| + | |description=Synchronization primitive for thread-safe access. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:CustomControl | ||
| + | |label=CustomControl | ||
| + | |description=Base class for windowed controls that handle their own painting. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:CustomType | ||
| + | |label=CustomType | ||
| + | |description=Custom data-type converter for interpreting raw memory. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:D3DHOOK | ||
| + | |label=D3DHOOK | ||
| + | |description=D3D hook helper for rendering overlays in DirectX 9/10/11 games. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:D3DHook_FontMap | ||
| + | |label=D3DHook_FontMap | ||
| + | |description=Font texture map used by D3D hook rendering. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:D3DHook_Texture | ||
| + | |label=D3DHook_Texture | ||
| + | |description=Texture management for D3D hook sprites. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:D3Dhook_TextContainer | ||
| + | |label=D3Dhook_TextContainer | ||
| + | |description=Text container used to draw text via D3D hook. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:D3DHook_RenderObject | ||
| + | |label=D3DHook_RenderObject | ||
| + | |description=Abstract render object controlling rendering behavior. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:D3DHook_Sprite | ||
| + | |label=D3DHook_Sprite | ||
| + | |description=Rendered sprite/texture displayed via D3D hook. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:Disassembler | ||
| + | |label=Disassembler | ||
| + | |description=Disassembler helper class. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:Disassemblerview | ||
| + | |label=Disassemblerview | ||
| + | |description=Visual disassembler UI used in Memory View. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:DisassemblerviewLine | ||
| + | |label=DisassemblerviewLine | ||
| + | |description=Single line entry in a disassembler view. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:DissectCode | ||
| + | |label=DissectCode | ||
| + | |description=Structure dissection helper. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:Edit | ||
| + | |label=Edit | ||
| + | |description=Single-line text edit control. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:Event | ||
| + | |label=Event | ||
| + | |description=Event wrapper class for callbacks. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:FileStream | ||
| + | |label=FileStream | ||
| + | |description=Stream class for file-based I/O. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:FileDialog | ||
| + | |label=FileDialog | ||
| + | |description=Standard file selection dialog wrapper. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:FindDialog | ||
| + | |label=FindDialog | ||
| + | |description=Search/find dialog class. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:Font | ||
| + | |label=Font | ||
| + | |description=Font definition and metrics class. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:Form | ||
| + | |label=Form | ||
| + | |description=Window/form class. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:FoundList | ||
| + | |label=FoundList | ||
| + | |description=Companion class for MemScan results; reads result files. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:GenericHotkey | ||
| + | |label=GenericHotkey | ||
| + | |description=Register hotkeys with CE's hotkey handler. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:Graphic | ||
| + | |label=Graphic | ||
| + | |description=Abstract base for image/graphic classes. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:GraphicControl | ||
| + | |label=GraphicControl | ||
| + | |description=Lightweight control for simple graphics. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:GroupBox | ||
| + | |label=GroupBox | ||
| + | |description=Panel-like container with a header. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:Hexadecimal | ||
| + | |label=Hexadecimal | ||
| + | |description=Hex display helper used by Memory View. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:Hexadecimalview | ||
| + | |label=Hexadecimalview | ||
| + | |description=Hex display UI component in the Memory View. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:Icon | ||
| + | |label=Icon | ||
| + | |description=Icon resource wrapper. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:Image | ||
| + | |label=Image | ||
| + | |description=Image control for displaying pictures. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:Internet | ||
| + | |label=Internet | ||
| + | |description=Internet client helper class. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:JpegImage | ||
| + | |label=JpegImage | ||
| + | |description=JPEG image handler class. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:Label | ||
| + | |label=Label | ||
| + | |description=Static text label control. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:LuaPipe | ||
| + | |label=LuaPipe | ||
| + | |description=Abstract pipe communication class. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:LuaPipeClient | ||
| + | |label=LuaPipeClient | ||
| + | |description=Client implementation for pipe communication. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:LuaPipeServer | ||
| + | |label=LuaPipeServer | ||
| + | |description=Server implementation for pipe communication. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:ListBox | ||
| + | |label=ListBox | ||
| + | |description=List box control with selectable strings. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:ListColumn | ||
| + | |label=ListColumn | ||
| + | |description=Column descriptor for a ListView. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:ListColumns | ||
| + | |label=ListColumns | ||
| + | |description=Container for ListColumn objects. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:ListItem | ||
| + | |label=ListItem | ||
| + | |description=Entry in a ListView. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:ListItems | ||
| + | |label=ListItems | ||
| + | |description=Container for ListItem objects. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:Listview | ||
| + | |label=Listview | ||
| + | |description=Multi-column list view control. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:MainMenu | ||
| + | |label=MainMenu | ||
| + | |description=Top-level menu bar for a form. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:Memo | ||
| + | |label=Memo | ||
| + | |description=Multi-line text editor control. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:MemScan | ||
| + | |label=MemScan | ||
| + | |description=Memory scanner class for performing scans. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:Menu | ||
| + | |label=Menu | ||
| + | |description=Common ancestor for menu-related classes. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:MenuItem | ||
| + | |label=MenuItem | ||
| + | |description=Menu item descriptor. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:MemoryRecord | ||
| + | |label=MemoryRecord | ||
| + | |description=Cheat table entry describing an address/value/hotkey etc. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:MemoryRecordHotkey | ||
| + | |label=MemoryRecordHotkey | ||
| + | |description=Hotkey interface for a MemoryRecord. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:MemoryStream | ||
| + | |label=MemoryStream | ||
| + | |description=In-memory stream class. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:Memoryview | ||
| + | |label=Memoryview | ||
| + | |description=Memory view (hex editor) window class. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:MultiReadExclusiveWriteSynchronizer | ||
| + | |label=MultiReadExclusiveWriteSynchronizer | ||
| + | |description=Synchronizer for safe concurrent read/write access. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:Object | ||
| + | |label=Object | ||
| + | |description=Root base class for most CE classes. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:PaintBox | ||
| + | |label=PaintBox | ||
| + | |description=Control for custom painting surface. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:PageControl | ||
| + | |label=PageControl | ||
| + | |description=Container for multiple pages/tabs. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:Panel | ||
| + | |label=Panel | ||
| + | |description=Container control for grouping child controls. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:Pen | ||
| + | |label=Pen | ||
| + | |description=Drawing pen used by Canvas for lines. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:Picture | ||
| + | |label=Picture | ||
| + | |description=Container for Graphic objects. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:PopupMenu | ||
| + | |label=PopupMenu | ||
| + | |description=Context (right-click) menu class. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:PortableNetworkGraphic | ||
| + | |label=PortableNetworkGraphic | ||
| + | |description=PNG image class. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:ProgressBar | ||
| + | |label=ProgressBar | ||
| + | |description=Visual progress indicator control. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:RadioGroup | ||
| + | |label=RadioGroup | ||
| + | |description=Group of radio-button controls. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:RasterImage | ||
| + | |label=RasterImage | ||
| + | |description=Base class for raster image controls. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:RIPRelativeScanner | ||
| + | |label=RIPRelativeScanner | ||
| + | |description=Helper for RIP-relative instruction scanning. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:OpenDialog | ||
| + | |label=OpenDialog | ||
| + | |description=File open dialog class. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:SaveDialog | ||
| + | |label=SaveDialog | ||
| + | |description=File save dialog class. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:SelectDirectoryDialog | ||
| + | |label=SelectDirectoryDialog | ||
| + | |description=Directory selection dialog class. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:Semaphore | ||
| + | |label=Semaphore | ||
| + | |description=Semaphore synchronization primitive. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:Settings | ||
| + | |label=Settings | ||
| + | |description=Access and modify Cheat Engine settings and store plugin data. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:Splitter | ||
| + | |label=Splitter | ||
| + | |description=UI splitter control for resizing panels. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:Stringlist | ||
| + | |label=Stringlist | ||
| + | |description=Ordered list container for strings. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:Strings | ||
| + | |label=Strings | ||
| + | |description=Abstract base for text collections. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:StringStream | ||
| + | |label=StringStream | ||
| + | |description=Stream wrapper around a string buffer. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:Structure | ||
| + | |label=Structure | ||
| + | |description=Structure definition class for memory layouts. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:StructureElement | ||
| + | |label=StructureElement | ||
| + | |description=Single element inside a Structure. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:StructureFrm | ||
| + | |label=StructureFrm | ||
| + | |description=Structure editor/dissector form class. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:structGroup | ||
| + | |label=structGroup | ||
| + | |description=Grouping helper for structure elements. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:SymbolList | ||
| + | |label=SymbolList | ||
| + | |description=Symbol lookup class (address ↔ name). | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:TabSheet | ||
| + | |label=TabSheet | ||
| + | |description=Single page within a PageControl. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:TableFile | ||
| + | |label=TableFile | ||
| + | |description=Represents a file stored inside a cheat table. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:Thread | ||
| + | |label=Thread | ||
| + | |description=Thread wrapper class. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:Timer | ||
| + | |label=Timer | ||
| + | |description=Non-visual timer component triggering onTimer events. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:ToggleBox | ||
| + | |label=ToggleBox | ||
| + | |description=Toggleable button-like control. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:TrackBar | ||
| + | |label=TrackBar | ||
| + | |description=Slider control for numeric values. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:TreeNode | ||
| + | |label=TreeNode | ||
| + | |description=Node in a Treeview. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:TreeNodes | ||
| + | |label=TreeNodes | ||
| + | |description=Container for TreeNode objects. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:Treeview | ||
| + | |label=Treeview | ||
| + | |description=Tree view control. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:WinControl | ||
| + | |label=WinControl | ||
| + | |description=Base class for windowed controls. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=Class:xmplayer | ||
| + | |label=xmplayer | ||
| + | |description=XM player class for tracker music playback. | ||
| + | }} | ||
| + | }} | ||
| − | + | === SQL Classes === | |
| − | + | {{LuaIndexBox | |
| − | + | |title=SQL Classes | |
| − | + | |content= | |
| − | + | {{LuaIndexItem | |
| + | |page=SQL:CustomConnection | ||
| + | |label=CustomConnection | ||
| + | |description=Base for custom DB connection implementations. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=SQL:Database | ||
| + | |label=Database | ||
| + | |description=Database container/manager for connections and datasets. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=SQL:SQLConnection | ||
| + | |label=SQLConnection | ||
| + | |description=Generic SQL connection abstraction. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=SQL:SQLite3Connection | ||
| + | |label=SQLite3Connection | ||
| + | |description=SQLite3 connection implementation. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=SQL:ODBCConnection | ||
| + | |label=ODBCConnection | ||
| + | |description=ODBC data source connection. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=SQL:DBTransaction | ||
| + | |label=DBTransaction | ||
| + | |description=Transaction object for DB operations. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=SQL:SQLTransaction | ||
| + | |label=SQLTransaction | ||
| + | |description=SQL-specific transaction object. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=SQL:Param | ||
| + | |label=Param | ||
| + | |description=Single query parameter object. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=SQL:Params | ||
| + | |label=Params | ||
| + | |description=Parameter container for queries. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=SQL:Fields | ||
| + | |label=Fields | ||
| + | |description=Field metadata and values container. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=SQL:Dataset | ||
| + | |label=Dataset | ||
| + | |description=Abstract dataset representing query results. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=SQL:DBDataset | ||
| + | |label=DBDataset | ||
| + | |description=Database-backed dataset implementation. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=SQL:CustomBufDataset | ||
| + | |label=CustomBufDataset | ||
| + | |description=In-memory buffered dataset. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=SQL:CustomSQLQuery | ||
| + | |label=CustomSQLQuery | ||
| + | |description=Extended/custom SQL query object. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=SQL:SQLQuery | ||
| + | |label=SQLQuery | ||
| + | |description=Standard SQL query executor and result-holder. | ||
| + | }} | ||
| + | }} | ||
| + | |||
| + | === Class Helper Functions === | ||
| + | {{LuaIndexBox | ||
| + | |title=Class Helper Functions | ||
| + | |content= | ||
| + | {{LuaIndexItem | ||
| + | |page=inheritsFromObject | ||
| + | |label=inheritsFromObject | ||
| + | |description=Returns <code>true</code> if the given object/class inherits from <code>Object</code>. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=inheritsFromComponent | ||
| + | |label=inheritsFromComponent | ||
| + | |description=Returns <code>true</code> if the object/class inherits from <code>Component</code>. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=inheritsFromControl | ||
| + | |label=inheritsFromControl | ||
| + | |description=Returns <code>true</code> if the object/class inherits from <code>Control</code>. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=inheritsFromWinControl | ||
| + | |label=inheritsFromWinControl | ||
| + | |description=Returns <code>true</code> if the object/class inherits from <code>WinControl</code>. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=createClass | ||
| + | |label=createClass | ||
| + | |description=Creates an instance of the specified registered class (default constructor). | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=createComponentClass | ||
| + | |label=createComponentClass | ||
| + | |description=Creates an instance of the specified component class (owner/parent may be required). | ||
| + | }} | ||
| + | }} | ||
| + | |||
| + | === Undefined Class Property Functions === | ||
| + | Not all class properties are explicitly exposed; these helpers allow dynamic access to published properties and method/event bindings. | ||
| + | |||
| + | {{LuaIndexBox | ||
| + | |title=Undefined Class Property Functions | ||
| + | |content= | ||
| + | {{LuaIndexItem | ||
| + | |page=getPropertyList | ||
| + | |label=getPropertyList | ||
| + | |description=Returns a [[Lua:Class:StringList|StringList]] of published property names for the specified class. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=setProperty | ||
| + | |label=setProperty | ||
| + | |description=Sets the value of a published property on an object instance (not usable for method properties). | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=getProperty | ||
| + | |label=getProperty | ||
| + | |description=Gets the value of a published property on an object instance (not usable for method properties). | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=setMethodProperty | ||
| + | |label=setMethodProperty | ||
| + | |description=Assigns a Lua function to a method/event property on an object. | ||
| + | }} | ||
| + | {{LuaIndexItem | ||
| + | |page=getMethodProperty | ||
| + | |label=getMethodProperty | ||
| + | |description=Retrieves a callable wrapper to invoke the original method/property on the object. | ||
| + | }} | ||
| + | }} | ||
Latest revision as of 19:35, 25 June 2026
Cheat Engine Lua API Index
A task-oriented reference index for Cheat Engine's Lua functions, classes, globals, and scripting helpers.
Cheat Engine exposes an extensive Lua API for cheat tables, trainers, and standalone scripts. This page is a task-oriented index: choose the area you are working in, then follow a function link for its detailed reference.
Contents
- 1 Variables
- 2 Functions
- 2.1 Quick navigation
- 2.2 Function naming guide
- 2.3 Cheat Table
- 2.4 Trainers
- 2.5 Protection
- 2.6 Scanning
- 2.7 Process
- 2.8 Threads
- 2.9 Handles
- 2.10 Addresses
- 2.11 Memory
- 2.12 Conversions
- 2.13 Input Devices
- 2.14 Screen
- 2.15 Sounds
- 2.16 Text-to-Speech
- 2.17 Fonts
- 2.18 Forms and Windows
- 2.19 Cheat Engine
- 2.20 Lua
- 2.21 Types
- 2.22 Object-oriented
- 2.23 Assembly
- 2.24 Auto Assembler
- 2.25 Debugger
- 2.26 DBK (Driver-Based Kernel)
- 2.27 DBVM
- 2.28 Translation
- 2.29 Files
- 2.30 Structures
- 2.31 Miscellaneous
- 2.32 Extended API reference (CE 7.5)
- 2.32.1 Core runtime, memory, and conversion helpers
- 2.32.2 Files, symbol loading, and native compilation
- 2.32.3 Auto Assembler authoring and callbacks
- 2.32.4 Process control, code execution, and prompts
- 2.32.5 Target inspection, allocation, and task progress
- 2.32.6 Registered symbols
- 2.32.7 Debugging extensions
- 2.32.8 Forms, controls, graphics, dialogs, and streams
- 2.32.9 Threads, synchronization, and structures
- 2.32.10 Low-level memory: DBK and DBVM
- 2.32.11 Direct3D, disassembly, and pipes
- 2.32.12 SQL and data access
- 2.32.13 Modules, .NET, and diagrams
- 2.32.14 Remote execution, XML, and virtual trees
- 2.32.15 CEServer and Lua string extensions
- 3 Classes
Variables[edit]
Globals[edit]
Global Variables
CPU / Debug Variables (Registers)[edit]
CPU / Debug Variables
Functions[edit]
Function names follow consistent patterns: create... creates an object or window, get... retrieves data, set... changes a setting, read.../write... transfer data, and register.../unregister... manage callbacks. Related functions are kept together where possible.
[edit]
Quick Navigation
Function naming guide[edit]
Function Naming Guide
create...get..., enum...set..., enable...read..., write...Local, memory functions normally operate on the opened target process.register..., unregister...Cheat Table[edit]
These functions help manage the cheat table and its files.
Cheat Table
Returns the cheat table Addresslist object.
Returns a TableFile stored in the cheat table (search by filename or identifier).
Adds a new file entry to the cheat table.
Loads a ".ct" or ".cetrainer" file or stream into the cheat table.
Saves the current cheat table to disk.
Trainers[edit]
Functions related to the trainer (.exe) generator.
Trainers
Adds a new feature to the EXE trainer generator window and calls your callback when a user builds a .exe trainer.
Unregisters a previously registered trainer feature.
Protection[edit]
Functions for protecting Cheat Engine or encoding code.
Protection
Prevents basic memory scanners from opening or inspecting the Cheat Engine process.
Enables kernel-mode protections or DRM measures to prevent normal memory scanners from reading the Cheat Engine process.
Encodes a given Lua function to a string that can be stored/transferred; can be decoded later with decodeFunction.
Decodes an encoded function string back into a callable Lua function.
Scanning[edit]
Functions that control and query memory scans.
Scanning
Scans the currently opened process for an array-of-bytes (AOB) pattern and returns a StringList of all matches.
Scans the process memory for a byte pattern and returns the address if exactly one unique match is found; returns nil otherwise.
Scans the entire process for a pattern and returns the address if exactly one unique match exists; returns nil otherwise.
Returns the currently active scan session as a MemScan object.
Process[edit]
Functions for creating/opening processes and querying system/process state.
Process
Creates (and optionally debugs) a new process.
Opens a process given a process name or PID; attaches Cheat Engine to it for memory access.
Callback invoked by Cheat Engine when it opens a process (user-defined handler).
Returns the process ID (PID) of the currently foreground (top) window process.
Returns the PID of the currently opened/attached process.
Returns the PID for a given process name (if running).
Opens a file and treats it like a process (gives memory access similar to opening a process).
Saves changes made to the opened file.
Sets the pointer size (in bytes) Cheat Engine will use (e.g. 4 or 8); useful if a 64-bit process requires 32-bit pointer handling.
Sets assembler bit mode: 0 = 32-bit, 1 = 64-bit.
Returns a system process list object.
Returns a list of top-level windows.
Pauses the currently opened process.
Resumes the currently opened process.
Returns true if the target process is 64-bit, otherwise false.
Returns a table with information about each module in the current process (or a specified PID).
Returns a table containing the memory layout with information about each memory region.
Closes a remote handle to a process.
Threads[edit]
Threads
Returns the number of CPU cores available on the system.
Fills a List object with the thread list of the currently opened process (returns thread IDs and basic info).
Returns true if the current Lua code is running in the main thread (available in CE 6.4+); otherwise false.
Executes the provided function in the main thread and returns that function's return value. Useful for GUI updates or operations that must run on the main thread.
Schedules the provided function to run in the main thread but does not wait for the result (fire-and-forget).
Intended to be called from the main thread's loop to process pending synchronized calls when using threads and synchronize/queue.
Handles[edit]
Handles
Returns a table (or list object) containing system handles (open handles) for the system or the current process, depending on context.
Addresses[edit]
These functions help convert between memory addresses and symbol/CE address string representations.
Addresses
Returns the numeric address of a symbol (module+export, label, or CE symbol). Raises an error if the symbol cannot be resolved.
Same as getAddress but returns nil if the symbol cannot be found (does not throw).
Returns the address formatted as a string, preferring symbol/module+offset notation when available.
Assigns the specified symbol name to an address (adds a user-defined symbol).
Removes a previously registered symbol mapping for an address.
Returns a table/object with symbol information (module name, search key, address, size), matching the SymbolList structure.
Reinitializes the symbol handler (useful after loading new modules).
Returns true if the specified address lies inside a loaded module.
Returns true if the address is inside a system module (OS module), e.g., kernel or system DLLs.
Returns the size (in bytes) of the specified module. Use getAddress to retrieve the module base address first if needed.
Sets whether address/symbol lookups will throw errors on failure or return 0/nil depending on configuration.
Registers a callback function invoked when a symbol is parsed/loaded.
Unregisters a previously registered symbol lookup callback.
Registers a callback called when an address-to-name conversion is requested.
Unregisters the address lookup callback.
Reinitializes only the .NET portion of the symbol handler (useful when .NET modules change).
Memory[edit]
Memory
Allocates executable/non-executable memory in the target process and returns the allocated address.
Frees memory previously allocated in the target process.
Creates or opens a named shared memory object of the given size for interprocess communication.
Creates a memory section object (OS-specific) for sharing or mapping memory.
Maps a created section into the process address space, returning the mapped base address.
Unmaps a previously mapped section view from the process address space.
Copies memory from a source address to a destination address (can be used within target process or between processes depending on API).
Compares two memory regions (can be used within target process or between processes depending on API).
Allocates a block of nonpaged kernel memory (requires driver or appropriate privileges) and returns its address.
Frees kernel-mode memory previously allocated.
Maps memory from one process context into another usermode context (maps a specified address from PID A into PID B's address space).
Unmaps memory previously mapped with mapMemory.
Creates a memory stream object that can be used to read/write memory data conveniently from Lua.
Reading from Target Process[edit]
Reading from Target Process
Reads raw bytes at the given address. If ReturnAsTable is true, returns a table; otherwise returns multiple byte values.
Reads a 16-bit (word) integer from the specified address. Optional second parameter: if true, reads as signed integer.
Reads a 32-bit (dword) integer from the specified address. Optional second parameter: if true, reads as signed integer.
Reads a 64-bit (qword) integer from the specified address.
Reads a pointer-sized value: readQword on 64-bit targets, readInteger on 32-bit targets.
Reads a single-precision (32-bit) floating-point value from the specified address.
Reads a double-precision (64-bit) floating-point value from the specified address.
Reads a null-terminated string from memory up to maxlength bytes (prevents infinite loops on corrupted memory).
Reads a region from a file and writes it to a specific address in the target process.
Reading from Cheat Engine Memory[edit]
Reading from Cheat Engine Memory
Same as readBytes, but reads from Cheat Engine's own memory.
Reads a 16-bit integer from CE's memory. Optional: use signed if second parameter is true.
Reads a 32-bit integer from CE's memory. Optional: use signed if second parameter is true.
Reads a 64-bit integer from CE's memory.
Reads a pointer-sized value from CE's memory (64-bit or 32-bit depending on CE build).
Reads a single-precision float from CE's memory.
Reads a double-precision float from CE's memory.
Reads a null-terminated string from CE's memory.
Writing to Target Process[edit]
Writing to Target Process
Writes the given bytes (from a table) to the specified address in the target process.
Writes a 16-bit integer to the specified address. Returns true on success.
Writes a 32-bit integer to the specified address. Returns true on success.
Writes a 64-bit integer to the specified address. Returns true on success.
Writes a single-precision float to the specified address. Returns true on success.
Writes a double-precision float to the specified address. Returns true on success.
Writes a string to the specified address (typically null-terminated). Returns true on success.
Writes a memory region to a file. Returns the number of bytes written.
Writing to Cheat Engine Memory[edit]
Writing to Cheat Engine Memory
Writes a 16-bit integer to CE's memory. Returns true on success.
Writes a 32-bit integer to CE's memory. Returns true on success.
Writes a 64-bit integer to CE's memory. Returns true on success.
Writes a single-precision float to CE's memory. Returns true on success.
Writes a double-precision float to CE's memory. Returns true on success.
Writes a string to CE's memory. Returns true on success.
Writes the given bytes (from a table) to CE's memory.
Conversions[edit]
Encoding/Decoding[edit]
Encoding/Decoding
Converts a string from ANSI encoding to UTF-8 encoding.
Converts a string from UTF-8 encoding to ANSI encoding.
Computes and returns the MD5 hash of a string as a hexadecimal string.
Converts a given integer to a userdata variable.
Converts a given userdata variable back to an integer.
To Byte Table[edit]
Convert data types into byte tables (tables of individual byte values).
To Byte Table
Converts a 16-bit word to a byte table.
Converts a 32-bit dword to a byte table.
Converts a 64-bit qword to a byte table.
Converts a single-precision float to a byte table.
Converts a double-precision float to a byte table.
Converts a string (ANSI/UTF-8) to a byte table.
Converts a string to a wide string (Unicode) and then to a byte table.
From Byte Table[edit]
Convert byte tables back into data types.
From Byte Table
Converts a byte table to a 16-bit word.
Converts a byte table to a 32-bit dword.
Converts a byte table to a 64-bit qword.
Converts a byte table to a single-precision float.
Converts a byte table to a double-precision float.
Converts a byte table to a string.
Converts a byte table to a wide string (Unicode).
Binary Operations[edit]
Bitwise operations on integers.
Binary Operations
Bitwise OR operation.
Bitwise XOR (exclusive OR) operation.
Bitwise AND operation.
Bitwise shift left operation.
Bitwise shift right operation.
Bitwise NOT (complement) operation.
Input Devices[edit]
Keyboard & Mouse[edit]
Keyboard & Mouse
Returns the current mouse cursor position as X and Y coordinates.
Sets the mouse cursor position to the specified X and Y coordinates.
Returns true if the specified key is currently held down.
Simulates pressing a key (puts the key into down state).
Simulates releasing a key (puts the key into up state).
Simulates a complete key press (down and up).
Calls the Windows API mouse_event directly for advanced mouse control. See MSDN documentation.
Sets the global key poll interval (frequency of keyboard state updates).
Sets the minimum delay (in milliseconds) between consecutive activations of the same hotkey.
Game Controller[edit]
XBox/game controller input.
Game Controller
Fetches the current state (buttons, triggers, sticks) of a connected XBox 360 controller.
Sets the speed of the left and right vibration motors in an XBox 360 controller (for haptic feedback).
Clipboard[edit]
Screen[edit]
Screen
Returns the height of the screen in pixels.
Returns the width of the screen in pixels.
Returns the screen DPI (dots per inch) for determining screen scaling/density.
Returns the height of the usable work area (excludes taskbars).
Returns the width of the usable work area (excludes taskbars).
Returns a Canvas object for drawing directly to the screen. Limited usefulness in practice due to performance constraints.
Returns the RGB color value of a pixel at the specified screen coordinates.
Sounds[edit]
General Audio[edit]
General Audio
Plays an audio file (supports various formats like .wav, .mp3, etc.).
Plays a system beep/ping sound.
Text-to-Speech[edit]
Text-to-Speech
Speaks the given text using the system's text-to-speech engine and optional flags. See MSDN SpeakFlags.
Speaks the given text using an English voice by wrapping it in an XML voice specification.
XM Player[edit]
Plays tracked music (XM format) using the built-in XM player.
XM Player
Plays an XM audio file given its filename.
Pauses the currently playing XM audio file.
Resumes playback of a paused XM audio file.
Stops XM audio playback completely.
Returns true if an XM audio file is currently being played.
Fonts[edit]
Fonts
Loads a font from a memory stream and returns a handle/ID for later use with unloadLoadedFont.
Unloads a previously loaded font by its handle/ID, freeing resources.
Forms and Windows[edit]
Forms and Windows
Finds a window by class name and/or window title/caption.
Gets a window handle based on a relative command (e.g. parent, child, next). See MSDN GetWindow.
Returns the caption/title text of the specified window.
Returns the class name of the specified window.
Returns the process ID (PID) of the process that owns the specified window.
Returns the handle of the topmost (foreground) window currently active.
Sends a Windows message to the specified window.
Hooks a window's window procedure (WndProc) to intercept and handle messages.
Uninstalls a WndProc hook previously installed via hookWndProc.
Cheat Engine[edit]
Functions for managing and controlling Cheat Engine itself.
Version and Information[edit]
Version and Information
Returns the Cheat Engine version as a floating-point number (e.g. 7.5).
Returns full version information: a raw integer and a table containing major, minor, release, and build numbers.
Returns true if Cheat Engine is running as 64-bit; false if 32-bit.
Returns the process ID of the Cheat Engine process itself.
Returns the folder path where Cheat Engine (or the current trainer) is located.
Management[edit]
Management
Closes Cheat Engine.
Returns the Timer object responsible for freezing/unfreezing values in the address list.
Returns the Timer object responsible for updating displayed values in the address list.
Returns the common module list as a StringList object.
Returns the AutoAttach list as a StringList object.
Connects to a remote Cheat Engine server (given host and port). Subsequent operations route through the server.
Reloads Cheat Engine settings from the registry and applies them immediately.
Loads the specified plugin.
Returns the settings object for accessing/modifying CE configuration.
Registers a binutils (assembler/disassembler) toolset with Cheat Engine.
Comments and Headers[edit]
Comments and Headers
Gets the user-defined comment attached to the specified address.
Sets a user-defined comment at the specified address.
Gets the user-defined header text at the specified address.
Sets a user-defined header text at the specified address.
Advertising and Support[edit]
Advertising and Support
Displays an advertising/support window to help fund Cheat Engine development.
Hides/closes the advertising window if it was showing (crude but functional name).
Forms and UI[edit]
Forms and UI
Returns the total number of forms currently attached to the main CE application.
Returns the form object at the specified index (0-based).
Returns the first MemoryView form object (the hex editor window).
Returns the main Cheat Engine window form object.
Returns the settings/options dialog form object.
Returns the Lua engine/console form object (creates it if needed).
Shows the main Cheat Engine window (opposite of hideAllCEWindows).
Hides all normal Cheat Engine windows (e.g. the trainer table UI).
Registers a callback function invoked when a form is added to CE's form list.
Unregisters a previously registered form add notification callback.
Messages[edit]
Messages
Shows a simple message box with the given text to the user.
Pops up a message dialog box (similar to showMessage, with more control over buttons/options).
Outputs a message using the Windows OutputDebugString API (visible in debuggers).
Processes pending window messages in the event queue, allowing button clicks and UI updates to be handled.
Input[edit]
Input
Shows a dialog prompting the user to input a string. Returns the entered string, or nil if cancelled (CE 6.4+).
Shortcuts[edit]
Shortcuts
Converts a shortcut integer value to its textual representation (e.g. "Ctrl+Alt+A"). (CE 6.4+)
Converts a text representation (e.g. "Ctrl+Alt+A") to a shortcut integer value. (CE 6.4+)
Converts a key combination to its string representation, matching the hotkey handler's format.
Speed Hack[edit]
Speed Hack
Enables the speed hack (if not already active) and sets the game/process speed multiplier (e.g. 2.0 for 2x speed).
Returns the current speed hack multiplier value that was last set.
Lua[edit]
Functions for managing the Lua engine and state.
Lua
Creates a fresh Lua state, resetting the environment and clearing all previously defined variables/functions.
Pauses execution for the specified number of milliseconds.
Creates and returns an integer reference handle that can store and retrieve Lua objects persistently.
Retrieves the Lua value/object referenced by the given reference handle.
Destroys and frees a reference handle, removing the reference and allowing garbage collection.
Types[edit]
Functions for registering and managing custom data types.
Types
Registers a callback function invoked by Cheat Engine's auto-guess feature to predict and suggest variable types.
Registers a custom data type defined using Lua functions for reading/writing/display logic.
Registers a custom data type defined using an Auto Assembler script.
Object-oriented[edit]
Functions for determining class inheritance and type relationships.
Object-oriented
Returns true if the given object is a valid Cheat Engine class instance (inherits from Object).
Returns true if the given object inherits from the Component class.
Returns true if the given object inherits from the Control class (UI controls).
Returns true if the given object inherits from the WinControl class (windowed controls).
Assembly[edit]
Functions for working with x86/x64 machine code and assembly instructions.
Assembly
Executes an Auto Assembler script (given as text) for code injection, patching, or other assembly operations.
Validates an Auto Assembler script for syntax errors. Returns true on success; false with error message on failure.
Disassembles the instruction at the given address and returns a formatted string: "address - bytes - opcode extra".
Parses a disassembled instruction string and returns 4 separate strings: address, bytes, opcode, and extra field.
Returns the size (in bytes) of the instruction at the given address.
Attempts to find and return the address of the previous instruction (heuristic guess).
Registers a custom callback function for the single-line assembler to convert instruction mnemonics to bytes.
Unregisters a previously registered custom assembler callback.
Auto Assembler[edit]
Commands & Hooks[edit]
Commands & Hooks
Registers a custom Auto Assembler command that calls the specified Lua function when invoked in a script.
Unregisters a previously registered Auto Assembler command.
Registers a callback function invoked before the Auto Assembler parses a script (prologue phase).
Unregisters an Auto Assembler prologue callback.
Changes memory protection on a block of memory to be writable and executable.
Scripts & Templates[edit]
Scripts & Templates
Registers a reusable template for the Auto Assembler script generator.
Unregisters a previously registered Auto Assembler template.
Generates and appends a default code injection script to the provided script (allocates space, injects code, patches original).
Generates and appends an Array-of-Bytes (AOB) injection script to the provided script (searches for pattern, injects code).
Generates and appends a complete full injection script with all patches and cleanup code.
Generates an Auto Assembler script that hooks (intercepts) the given API function address.
Debugger[edit]
Functions for managing the debugger. See Lua Debugging for detailed information.
Status and Information[edit]
Status and Information
Returns true if the debugger has been started and is active.
Returns the current debugger interface type: 1=Windows, 2=VEH, 3=Kernel, nil=no debugging.
Returns true if the target process can stop on a breakpoint. (CE 6.4+)
Returns true if the debugger is currently halted on a thread (at a breakpoint).
Returns a Lua table containing all currently active breakpoint addresses.
Breakpoint Management[edit]
Breakpoint Management
Starts debugging the currently attached process.
Sets a breakpoint of a specific size (in bytes) at the given address.
Removes a breakpoint at the specified address.
Resumes execution when the debugger is halted on a breakpoint.
Adds a thread to the no-break list so breakpoints on it will be ignored.
Removes a thread from the no-break list.
Callbacks[edit]
Callbacks
User-defined callback invoked by CE when a breakpoint is hit (define your own implementation).
User-defined callback invoked by the Windows debugger when a module is loaded.
Register and Context Management[edit]
Register and Context Management
Force-updates the Lua variables representing CPU registers from the current thread context. (CE 6.5+)
Force-updates the CPU registers from the Lua variables representing them. (CE 6.5+)
Refreshes the UI to reflect the current debug context if the debugger is broken.
Returns the memory address of the specified XMM register for the currently broken thread.
Advanced Debugging[edit]
Advanced Debugging
Tells the kernel-mode debugger to record the last few branch/jump instructions before a breakpoint is hit.
Returns the maximum number of branch records this CPU supports.
Returns the Last Branch Record value at the given index (when handling a breakpoint with branch recording enabled).
Detaches the debugger from the target process if possible.
DBK (Driver-Based Kernel)[edit]
Functions for kernel-mode operations via the DBK driver.
Initialization and Setup[edit]
Initialization and Setup
Loads and initializes the DBK kernel driver into memory if possible.
Redirects OpenProcess API calls to use kernel-mode DBK equivalents.
Redirects ReadProcessMemory and WriteProcessMemory to use kernel-mode DBK versions.
Redirects virtual memory query APIs to use kernel-mode DBK equivalents.
Process and Thread Information[edit]
Process and Thread Information
Returns the kernel pointer to the EPROCESS structure of the selected process ID.
Returns the kernel pointer to the ETHREAD structure of a given thread ID.
CPU Register Access[edit]
CPU Register Access
Reads a Model-Specific Register (MSR) using the DBK driver.
Writes a Model-Specific Register (MSR) using the DBK driver.
Returns the value of Control Register 0 (CR0).
Returns the value of Control Register 3 (CR3) for the currently opened process.
Returns the value of Control Register 4 (CR4).
Memory and Execution[edit]
Memory and Execution
Converts a virtual address to its physical address using the DBK driver.
Executes a routine from kernel mode (e.g. injected code written with Auto Assembler).
When set to true, write operations bypass copy-on-write behavior.
DBVM[edit]
Functions for hypervisor-based operations and advanced memory monitoring via DBVM.
Initialization[edit]
Initialization
Initializes the DBVM hypervisor functions for use.
Memory Operations[edit]
Memory Operations
Adds a memory region to DBVM.
Reads physical memory directly using DBVM (hypervisor-level access).
Writes physical memory directly using DBVM (hypervisor-level access).
MSR and Control Register Access[edit]
MSR and Control Register Access
Reads a Model-Specific Register (MSR) using DBVM (bypasses driver).
Writes a Model-Specific Register (MSR) using DBVM (bypasses driver).
Returns the real (unhooked) value of Control Register 4 (CR4).
Memory Monitoring[edit]
Memory Monitoring
Starts monitoring write accesses to a memory region.
Starts monitoring read accesses to a memory region.
Retrieves the log/results of memory region monitoring (reads or writes).
Stops memory region monitoring.
Memory Cloaking[edit]
Memory Cloaking
Cloaks a memory page so modifications become invisible to the target process.
Disables cloaking on a page and undoes hidden modifications.
Reads the original (hidden) memory contents of a cloaked region.
Writes to the original (hidden) memory contents of a cloaked region.
Breakpoints and Debugging[edit]
Breakpoints and Debugging
Cloaks a page, sets a breakpoint at the given address, and modifies registers when the breakpoint is hit.
Removes a "change registers on breakpoint" breakpoint.
CR3 (Process Context) Logging[edit]
CR3 (Process Context) Logging
Starts logging all CR3 (process context/page directory) changes.
Stops CR3 logging.
Performance and Anti-Detection[edit]
Performance and Anti-Detection
Sets system-wide speed hack via DBVM (affects all processes).
Configures TSC (Time Stamp Counter) adjustment to bypass VM detection (RDTSC hooks).
Translation[edit]
Translation
Returns the path to the current translation files. Returns an empty string if no translation is active.
Loads a ".PO" translation file into Cheat Engine's translation system.
Returns the translated text for a given source string. If no translation is found, returns the original string.
Returns the translation for a specific string ID (lookup by numerical or symbolic ID).
Files[edit]
Files
Returns a 64-bit file version and a table splitting the version into major, minor, release, and build.
Returns an indexed table (array) of filenames in the specified directory.
Returns an indexed table (array) of subdirectory names in the specified directory.
Structures[edit]
Structures
Registers a callback similar to onAutoGuess that the structure dissect window calls when the user requests Cheat Engine to guess a structure layout.
Unregisters a previously registered structure dissect auto-guess override.
Registers a function that will be called when the structure dissect UI requests a name for a newly detected structure definition.
Unregisters a previously registered structure name lookup callback.
Miscellaneous[edit]
Miscellaneous
Injects a DLL into the currently opened process.
Executes a given command or opens a file/URL using the system shell.
Executes a stdcall function at a given address in the target process with one parameter and waits for it to return.
Extended version of executeCode (supports more parameters/options).
Executes a stdcall function at a given address in Cheat Engine's own process (local execution).
Extended version of executeCodeLocal with additional options.
Registers a callback invoked when an API pointer is changed (allows reacting to API remapping).
Sets the pointer/address used for a specified API function.
Computes and returns the MD5 checksum (hex string) of the bytes at the provided memory address/size.
Computes and returns the MD5 checksum (hex string) of a file's contents.
Retrieves the specified system metric or configuration setting. See: MSDN documentation.
Returns the tick count in milliseconds since the system started.
Reads an environment variable stored in the current user's registry environment.
Writes an environment variable to the current user's registry environment.
Broadcasts a notification that environment variables were changed (call after setting registry variables).
Returns the application object (main application/titlebar context).
Returns an Internet client class object. The provided string specifies the client name/type.
Signs a .CT-File given a valid and installed Cheat Engine Signature.
Extended API reference (CE 7.5)[edit]
This section covers additional global and factory APIs exposed by celua-75.lua. It is grouped by the task they support rather than by their implementation order. Class instance methods remain documented with their respective classes.
Core runtime, memory, and conversion helpers[edit]
Use these for runtime detection, memory-protection changes, byte/value conversion, and sharing simple values between Lua states.
Core runtime, memory, and conversion helpers
Returns 0 if CE is running in Windows, 1 for Mac
Returns true if CE is running in windows Dark Mode. Has no effect on mac
Sets the given protection on the address range. Note, some systems do not support X and W to be true at the same time
Alias for readShortInteger; reads an 8-bit integer from target-process memory.
Reads an 8-bit integer from target-process memory.
Alias for writeShortInteger; writes an 8-bit integer to target-process memory.
Writes an 8-bit integer to target-process memory.
Writes a pointer-sized integer to target-process memory.
Writes a pointer-sized integer to Cheat Engine memory.
Sign-extends a value using the specified most-significant bit.
Converts an Extended value to a byte table.
Converts a byte table to an Extended value (returned as a double).
Returns the given variable from the main lua state. Only basic types are supported. (Handy for new lua state threads)
Sets the global variable names string in the main lua state. Only basic types are supported
Encodes a Lua script, optionally using the specified Lua DLL.
Files, symbol loading, and native compilation[edit]
These APIs operate on paths, augment symbol information, or compile and assemble native and .NET code.
Files, symbol loading, and native compilation
returns the filename of the path
returns the file extension of the path
Returns the filename of the path, without the extension
removes the filename from the path
Returns the path to the temp folder
Returns true if a file exists at that path
Returns true if a file existed at that path, and now not anymore
Will download the PDB files of Windows and load them (Takes a long time the first time)
Will check the option for kernelmode symbols in memory view (Gets only the exports unless enableWindowsSymbols() is used)
Returns the classname of a given structure based on RTTI information (assuming it can be found, returns nil if not or unknown)
Reinitializes Cheat Engine's own symbol handler.
Waits till the sections have been enumerated
Waits till all DLL Exports are loaded
Waits till all .NET symbols are loaded (this includes DLL Exports)
Waits till all PDB symbols are loaded (this includes DLL Exports, and .NET)
Will interrupt symbol enum to query the debughelp symbol handler about a specific symbol. This can take a while. Default is false
Stops the symbolloader from processing any debug files and releases what it had open
If set to true looking up a symbol will wait for the symbol to be loaded(default true)
Assembles one instruction and returns its bytes.
Compiles C code and returns a table with the addresses of the symbols on success, or nil with a secondary result containing the errormessage
Compiles an indexed list of C source files.
Compiles the TCC library functions some C code may need to function internally
Adds an extra default include path for the compile() function
Removes a specific path previously added with addCIncludePath
Compiles c# code and returns the autogenerated filename. references is a list of c# assemblies this code may reference.
Calls a static .NET class method from Cheat Engine.
Auto Assembler authoring and callbacks[edit]
Use callback registrations to extend Auto Assembler parsing and structure dissection; keep any returned registration ID for cleanup.
Auto Assembler authoring and callbacks
Makes the lua highlighter show the functionname as a functionkeyword
Removes the given name from showing up as a functionkeyword
Registers a callback for global-structure-list updates.
Unregisters a global-structure-list update callback.
Registers a function to be called when a structure needs to be dissected
Unregisters the structure and element list callback.
Returns the next unused newmem allocation number in an Auto Assembler script.
Adds a snapshot of original code as a comment to an Auto Assembler script.
Finds a unique AOB pattern for an address and returns its offset.
Process control, code execution, and prompts[edit]
This group covers process handles, code invocation, clipboard access, GC control, and small user-facing dialogs.
Process control, code execution, and prompts
Shows a selection list and returns the selected index and text.
Duplicates the provided CE based handle into the target process (You still need tell the target about this handle, like an injected dll data block)
If defined this function will be called twice when a table gets loaded. Once before the loading, and once after.
Returns the handle of the currently opened process
Returns the size of the currently opened target executable.
Gets the current pointersize
Returns CPUID register values for the supplied EAX and ECX inputs.
Enables or disables the passive Lua garbage collector.
Configures the active Lua garbage collector.
Returns the inverted color
Executes the given command and returns the output of the command as a string and the exitcode as an integer (Should not open a console window) If pathtoexecutein is not provided the path...
Reads the text from the clipboard
Alias for injectDLL; injects a DLL or dylib into the target process.
Injects a .NET assembly and invokes its specified method.
Executes a method.
Target inspection, allocation, and task progress[edit]
These helpers inspect the target architecture, allocate memory in Cheat Engine, disassemble bytes, or update Windows taskbar progress.
Target inspection, allocation, and task progress
Allocates named shared memory in the Cheat Engine process.
Returns true if the target process is x86 based
Returns true if the target process is arm based
Returns true if the target process is running on the Android OS
Returns the autorun path
Disassembles the given bytes and returns the result.
Same as print(string.format(...))
Sets the state of the cheatengine task in the taskbar (windows only) values: tbpsNone, tbpsIndeterminate, tbpsNormal, tbpsError, tbpsPaused
Sets the state of the cheatengine task progress status
Registered symbols[edit]
Use these only for symbols registered through Lua or Auto Assembler; they do not enumerate every symbol known to the symbol handler.
Registered symbols
Returns a table with elements containing {symbolname, address, OPTIONAL {allocsize, processid, donotsave
Deletes all symbols registered with registerSymbols, both in AA and Lua scripts (Does not remove registered symbolLists)
Debugging extensions[edit]
These functions add debugger state checks and per-thread breakpoint control beyond the main debugger section.
Debugging extensions
Returns true if the debugger was single stepping an instruction earlier
Breaks the thread with the specific threadID (Note: The thread may not break instantly and may have to be awakened first)
sets a breakpoint of a specific size at the given address for the specified thread. if trigger is bptExecute then size is ignored.
Forms, controls, graphics, dialogs, and streams[edit]
All create... entries here return a CE class object. Assign an owner where the function accepts one so the object's lifetime is managed correctly.
Forms, controls, graphics, dialogs, and streams
Created an empty region
Creates a menu item that gets added to the owner menu
Creates a MainMenu object.
Creates a PopupMenu object.
creates an imagelist object
Creates a stringlist class object (for whatever reason, lua strings are probably easier to use)
creates a CEForm class object(window) and returns the pointer for it. Visible is default true but can be changed
Returns the generated CEform
Returns the generated CEform
Creates a new lua engine form object. If there is no main luaengine window, this will become it.
TFrmAutoInject - Spawns an autoassembler window with the optionally provided script
Creates a Paintbox class object
Creates a Label class object which belongs to the given owner. Owner can be any object inherited from WinControl
Creates a Splitter class object which belongs to the given owner. Owner can be any object inherited from WinControl
Creates a Panel class object which belongs to the given owner. Owner can be any object inherited from WinControl
Creates an Image class object which belongs to the given owner. Owner can be any object inherited from WinControl
Creates an Edit class object which belongs to the given owner. Owner can be any object inherited from WinControl
Creates a Memo class object which belongs to the given owner. Owner can be any object inherited from WinControl
Creates a synedit object. mode: 0=Lua highlighting, 1=Auto Assembler highlighting
Creates a Button class object which belongs to the given owner. Owner can be any object inherited from WinControl
Creates a CheckBox class object which belongs to the given owner. Owner can be any object inherited from WinControl
Creates a ToggleBox class object which belongs to the given owner. Owner can be any object inherited from WinControl
Creates a GroupBox class object which belongs to the given owner. Owner can be any object inherited from WinControl
Creates a RadioGroup class object which belongs to the given owner. Owner can be any object inherited from WinControl
Creates a ListBox class object which belongs to the given owner. Owner can be any object inherited from WinControl
Creates a Calendar class object which belongs to the given owner. Owner can be any object inherited from WinControl. Valid date is between "September 14, 1752" and "December 31, 9999"
Creates a ComboBox class object which belongs to the given owner. Owner can be any object inherited from WinControl
Creates a ProgressBar class object which belongs to the given owner. Owner can be any object inherited from WinControl
Creates a TrackBar class object which belongs to the given owner. Owner can be any object inherited from WinControl
Creates a ListView class object which belongs to the given owner. Owner can be any object inherited from WinControl
Creates a TreeView object.
Creates a Timer object.
Returns a font object (default initialized based on the main ce window)
Returns a Bitmap object
Returns a PortableNetworkGraphic object
Returns a Jpeg object
Returns an Icon object
Returns a empty picture object
returns an initialized GenericHotkey class object. Maximum of 5 keys
Creates a new colordialog
Creates a new colorbox
Creates a find dialog object.
Creates an opendialog object
Creates a save dialog object.
Creates a directory-selection dialog object.
Creates a file-backed stream with the requested mode.
Creates a stream backed by a string buffer.
Returns a new MemScan class object
Creates a FoundList for the provided MemScan object.
Creates a new memoryview window. This window will not receive debug events. Use getMemoryViewForm() function to get the main memoryview window
Threads, synchronization, and structures[edit]
Use synchronization objects when worker threads share state. Structure helpers create or retrieve layout definitions used by the structure dissector.
Threads, synchronization, and structures
Creates and starts a native thread for the supplied Lua function.
Creates a native thread in the suspended state.
Creates a new thread in a new lua state. This is more efficient as no locking inside lua takes place, but has no access to userdefined lua functions and only limited base CE functions.
Returns a critical section object
Returns an event object
Returns an semaphore object
Returns a createMultiReadExclusiveWriteSynchronizer
Opens a structure dissect form for an address.
returns a table of StructureFrm objects (can be useful for finding a structure window with the wanted structure)
Returns the number of Global structures. (Global structures are the visible structures)
Returns the Structure object at the given index
Returns an empty structure object (Not yet added to the Global list. Call structure.addToGlobalStructureList manually)
If PDB files are loaded this will create a structure with that name if it can be found
Low-level memory: DBK and DBVM[edit]
Advanced / platform-specific. These APIs require the DBK driver and/or DBVM and can affect the whole system, not only the opened process.
Low-level memory: DBK and DBVM
Changes all memory access to physical memory
When set to true CE's memory scanner will skip hardware device owned memory. Default state is true
Reads physical memory through the DBK driver and returns a byte table.
Writes physical memory through the DBK driver.
Sets the keys to operate DBVM. Key1 and Key3 are pointersize, key2 is 32-bit. Note that if key1 or key3 are 64-bit wide, 32-bit CE can not use DBVM.
Returns the total memory free for DBVM, and the total number of full pages as secondary result
Creates a DBVM watch that records instruction execution.
Sets a int3 breakpoint at the given address after cloaking that page and when hit does a trace.
Returns DBVM trace status, current entry count, and maximum count.
Requests the active DBVM trace to stop.
Disables the current trace and removes all results
Returns an array of traceentries. (Context of the system at the time of the event, like registers)
Returns the number of breakpoint slots currently available
Returns summary information for a DBVM breakpoint event.
Returns full register, FPU, and stack information for a DBVM breakpoint event.
Sets the state of the frozen thread
Resumes the specific thread. continueMethod can be 0=run, 1=step into
Returns the process and thread IDs for a DBVM breakpoint event.
Looks up the physical address for the given virtual address in the given pagetable base. Returns nil if not paged
Reads the virtual memory of the given process's CR3 value. Returns a bytetable on success, nil if fail to read (paged out)
Writes virtual memory using the supplied process CR3 value.
Direct3D, disassembly, and pipes[edit]
Use this group for overlays, custom disassembly output, named-pipe communication, and related analysis tools.
Direct3D, disassembly, and pipes
Creates a Direct3D hook object.
Creates a disassembler object that can be used to disassemble an instruction and at the same time get more data
Returns the default disassembler object used by a lot of ce's disassembler routines (Only use this from the main thread)
Returns the legacy shared visible-disassembler override object.
Same as Disassembler.OnDisassembleOverride, but does it for all disassemblers, including newly created ones. Tip: Check the sender to see if you should use syntax highlighting codes or not
Unregisters a global disassembler override callback.
Creates or returns the current code DissectCode object
Creates a RipRelativeScanner object.
Returns a LuaPipeClient connected to the given pipename. Nil if the connection fails. Timeout is number of milliseconds before it disconnects on read/write operations. 0 or nil means never
Creates a LuaPipeServer which can be connected to by a pipe client. InputSize and Outputsize define buffers how much data can be in the specific buffer before the writer halts.
Starts a Lua server with the supplied name.
Returns the Ultimap2 form, or nil when it is not open.
Returns the Code Filter form.
SQL and data access[edit]
These factory functions create database connections, transactions, and queries. Configure the appropriate connection before executing a query.
SQL and data access
creates an SQLite3Connection object
Lets you set the path to the sqlite3.dll in case it's not .\win*\sqlite3.dll
creates an ODBCConnection object
Creates an SQLTransaction object
Creates an SQL query object.
Modules, .NET, and diagrams[edit]
The .NET functions query data collected from the target; they require an active .NET data collector and may return empty data when the runtime is unavailable.
Modules, .NET, and diagrams
Returns the hotkey handler thread used internally by CE
Creates a remote thread in the target process.
Loads a DLL/module into the target process.
Returns the current dotnetdatacollector object
Returns all .NET application domains collected from the target.
Returns .NET modules for the specified application domain.
Returns type definitions for the specified .NET module.
Returns methods for the specified .NET type definition.
Returns the parent module and type definition for a .NET type.
Returns field and layout data for the specified .NET type.
Returns parameters for the specified .NET method.
Returns .NET object and field data for the specified address.
Enumerates all collected .NET objects; this may take a long time.
Returns addresses of collected .NET objects with the specified type.
Creates a diagram control object.
Remote execution, XML, and virtual trees[edit]
These APIs create reusable helpers for remote calls, XML documents, custom CE controls, and virtual trees.
Remote execution, XML, and virtual trees
Creates an ExecuteCodeExStub object which the executor can execute
Creates an ExecuteCodeExStub object which the executor can execute
creates a new remote executor
Creates a Cheat Engine custom button control.
Creates an empty XML document
reads the given filename and return an XMLDocument with the parsed contents of the file
reads the given stream and returns an XMLDocument with the parsed contents of the stream
Creates a VirtualStringTree object.
CEServer and Lua string extensions[edit]
CEServer functions apply only after connecting to a server. The string functions are called as methods (for example text:startsWith('CE')).
CEServer and Lua string extensions
Returns whether Cheat Engine is connected to CEServer.
Returns the CEServer path on the target.
Splits a string at the specified separator.
Returns whether a string ends with the specified text.
Returns whether a string starts with the specified text.
Classes[edit]
A compact list of notable classes implemented by Cheat Engine.
Classes
Container for memory records in a cheat table.
Bitmap graphic object for drawing images.
Brush used by a Canvas to fill areas.
Visual button component.
Base class common to button-like controls.
Drawing surface used in paint events for lines, text, and images.
Calendar/date-picker UI control.
Cheat Engine main/form window class.
Component used in Cheat Engine 5.x trainers.
Checkbox UI control supporting checked/unchecked/indeterminate states.
Base class for owner-managed components.
Base class for visible UI controls.
Abstract collection class (used by ListColumns and similar).
Item managed by a Collection.
Edit field with an attached dropdown ListBox.
Synchronization primitive for thread-safe access.
Base class for windowed controls that handle their own painting.
Custom data-type converter for interpreting raw memory.
D3D hook helper for rendering overlays in DirectX 9/10/11 games.
Font texture map used by D3D hook rendering.
Texture management for D3D hook sprites.
Text container used to draw text via D3D hook.
Abstract render object controlling rendering behavior.
Rendered sprite/texture displayed via D3D hook.
Disassembler helper class.
Visual disassembler UI used in Memory View.
Single line entry in a disassembler view.
Structure dissection helper.
Single-line text edit control.
Event wrapper class for callbacks.
Stream class for file-based I/O.
Standard file selection dialog wrapper.
Search/find dialog class.
Font definition and metrics class.
Window/form class.
Companion class for MemScan results; reads result files.
Register hotkeys with CE's hotkey handler.
Abstract base for image/graphic classes.
Lightweight control for simple graphics.
Panel-like container with a header.
Hex display helper used by Memory View.
Hex display UI component in the Memory View.
Icon resource wrapper.
Image control for displaying pictures.
Internet client helper class.
JPEG image handler class.
Static text label control.
Abstract pipe communication class.
Client implementation for pipe communication.
Server implementation for pipe communication.
List box control with selectable strings.
Column descriptor for a ListView.
Container for ListColumn objects.
Entry in a ListView.
Container for ListItem objects.
Multi-column list view control.
Top-level menu bar for a form.
Multi-line text editor control.
Memory scanner class for performing scans.
Common ancestor for menu-related classes.
Menu item descriptor.
Cheat table entry describing an address/value/hotkey etc.
Hotkey interface for a MemoryRecord.
In-memory stream class.
Memory view (hex editor) window class.
Synchronizer for safe concurrent read/write access.
Root base class for most CE classes.
Control for custom painting surface.
Container for multiple pages/tabs.
Container control for grouping child controls.
Drawing pen used by Canvas for lines.
Container for Graphic objects.
Context (right-click) menu class.
PNG image class.
Visual progress indicator control.
Group of radio-button controls.
Base class for raster image controls.
Helper for RIP-relative instruction scanning.
File open dialog class.
File save dialog class.
Directory selection dialog class.
Semaphore synchronization primitive.
Access and modify Cheat Engine settings and store plugin data.
UI splitter control for resizing panels.
Ordered list container for strings.
Abstract base for text collections.
Stream wrapper around a string buffer.
Structure definition class for memory layouts.
Single element inside a Structure.
Structure editor/dissector form class.
Grouping helper for structure elements.
Symbol lookup class (address ↔ name).
Single page within a PageControl.
Represents a file stored inside a cheat table.
Thread wrapper class.
Non-visual timer component triggering onTimer events.
Toggleable button-like control.
Slider control for numeric values.
Node in a Treeview.
Container for TreeNode objects.
Tree view control.
Base class for windowed controls.
XM player class for tracker music playback.
SQL Classes[edit]
SQL Classes
Base for custom DB connection implementations.
Database container/manager for connections and datasets.
Generic SQL connection abstraction.
SQLite3 connection implementation.
ODBC data source connection.
Transaction object for DB operations.
SQL-specific transaction object.
Single query parameter object.
Parameter container for queries.
Field metadata and values container.
Abstract dataset representing query results.
Database-backed dataset implementation.
In-memory buffered dataset.
Extended/custom SQL query object.
Standard SQL query executor and result-holder.
Class Helper Functions[edit]
Class Helper Functions
Returns true if the given object/class inherits from Object.
Returns true if the object/class inherits from Component.
Returns true if the object/class inherits from Control.
Returns true if the object/class inherits from WinControl.
Creates an instance of the specified registered class (default constructor).
Creates an instance of the specified component class (owner/parent may be required).
Undefined Class Property Functions[edit]
Not all class properties are explicitly exposed; these helpers allow dynamic access to published properties and method/event bindings.
Undefined Class Property Functions
Returns a StringList of published property names for the specified class.
Sets the value of a published property on an object instance (not usable for method properties).
Gets the value of a published property on an object instance (not usable for method properties).
Assigns a Lua function to a method/event property on an object.
Retrieves a callable wrapper to invoke the original method/property on the object.