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