Difference between revisions of "Help File:Script engine"

From Cheat Engine
Jump to navigation Jump to search
(Created page with '== Script engine == '''List of CE specific functions and variables''': ; TrainerOrigin : A variable that contains the path of the trainer that launched cheat engine (Only…')
 
(setHeader)
 
(50 intermediate revisions by 3 users not shown)
Line 1: Line 1:
== Script engine ==
+
[[Category:Help]]
 
+
[[Category:Assembler]]
 
'''List of CE specific functions and variables''':
 
'''List of CE specific functions and variables''':
 +
 +
==== TrainerOrigin ====
  
 
; [[TrainerOrigin]]
 
; [[TrainerOrigin]]
 
: A variable that contains the path of the trainer that launched cheat engine (Only set when launched as a trainer)
 
: A variable that contains the path of the trainer that launched cheat engine (Only set when launched as a trainer)
 +
 +
==== process ====
  
 
; [[process]]
 
; [[process]]
 
: A variable that contains the main modulename of the currently opened process
 
: A variable that contains the main modulename of the currently opened process
 +
 +
==== getCEVersion ====
  
 
; [[getCEVersion]]()
 
; [[getCEVersion]]()
 
: Returns a floating point value specifying the version of cheat engine
 
: Returns a floating point value specifying the version of cheat engine
  
 +
 +
==== activateProtection ====
  
 
; [[activateProtection]]()
 
; [[activateProtection]]()
 
: Prevents basic memory scanners from opening the cheat engine process
 
: Prevents basic memory scanners from opening the cheat engine process
 +
==== fullAccess ====
 +
 
; [[fullAccess]](address,size)
 
; [[fullAccess]](address,size)
 
: Changes the protection of a block of memory to writable and executable
 
: Changes the protection of a block of memory to writable and executable
  
 +
 +
==== loadTable ====
  
 
; [[loadTable]](filename, merge OPTIONAL)
 
; [[loadTable]](filename, merge OPTIONAL)
 
: Loads a .ct or .cetrainer. If merge is provided and set to true it will not clear the old table
 
: Loads a .ct or .cetrainer. If merge is provided and set to true it will not clear the old table
 +
 +
==== saveTable ====
  
 
; [[saveTable]](filename, protect OPTIONAL)
 
; [[saveTable]](filename, protect OPTIONAL)
Line 30: Line 44:
 
</blockquote>
 
</blockquote>
  
 +
 +
==== readBytes ====
  
 
; [[readBytes]](address,bytecount, ReturnAsTable )
 
; [[readBytes]](address,bytecount, ReturnAsTable )
 
: returns the bytes at the given address. If ReturnAsTable is true it will return a table instead of multiple bytes Reads the bytes at the given address and returns a table containing the read out bytes
 
: returns the bytes at the given address. If ReturnAsTable is true it will return a table instead of multiple bytes Reads the bytes at the given address and returns a table containing the read out bytes
  
 +
 +
==== writeBytes ====
  
 
; [[writeBytes]](address, x,x,x,x,...)
 
; [[writeBytes]](address, x,x,x,x,...)
: Write the given bytes to the given address from a table
+
; writeBytes(address, table)
 +
: Write the given bytes to the given address.
  
; [[writeBytes]](address, table)
+
==== readSmallInteger ====
: Write the given bytes to the given address from a table
 
  
 +
; [[readSmallInteger]](address)
 +
: Reads a 16-bit integer from the specified address
  
 +
==== readInteger ====
  
 
; [[readInteger]](address)
 
; [[readInteger]](address)
: Reads an integer from the specified address
+
: Reads a 32-bit integer from the specified address
 +
 
 +
==== readQword ====
  
 
; [[readQword]](address)
 
; [[readQword]](address)
 
: Reads a 64-bit integer from the specified address
 
: Reads a 64-bit integer from the specified address
 +
 +
==== readPointer ====
  
 
; [[readPointer]](address)
 
; [[readPointer]](address)
 
: In a 64-bit target this equals readQword, in a 32-bit target readInteger()
 
: In a 64-bit target this equals readQword, in a 32-bit target readInteger()
 +
 +
==== readFloat ====
  
 
; [[readFloat]](address)
 
; [[readFloat]](address)
 
: Reads a single precision floating point value from the specified address
 
: Reads a single precision floating point value from the specified address
 +
 +
==== readDouble ====
  
 
; [[readDouble]](address)
 
; [[readDouble]](address)
 
: Reads a double precision floating point value from the specified address
 
: Reads a double precision floating point value from the specified address
 +
 +
==== readString ====
  
 
; [[readString]](address, maxlength, widechar OPTIONAL)
 
; [[readString]](address, maxlength, widechar OPTIONAL)
: Reads a string till it encounters a 0-terminator. Maxlength is just so you won't freeze for too long, set to 6000 if you don't care too much. Set WideChar to true if it is encoded using a widechar formatting
+
: Reads a string till it encounters a 0-terminator. Maxlength is just so you won't freeze for too long, set to 6000 if you don't care too much. Set WideChar to true if it is encoded using a widechar formatting.
 +
 
 +
==== writeSmallInteger ====
 +
 
 +
; [[writeSmallInteger]](address,value)
 +
: Writes a 16-bit integer to the specified address. Returns true on success.
 +
 
 +
==== writeInteger ====
  
 
; [[writeInteger]](address,value)
 
; [[writeInteger]](address,value)
: Writes an integer to the specified address. Returns true on success
+
: Writes a 32-bit integer to the specified address. Returns true on success.
 +
 
 +
==== writeQword ====
  
 
; [[writeQword]](address, value)
 
; [[writeQword]](address, value)
 
: Write a 64-bit integer to the specified address
 
: Write a 64-bit integer to the specified address
 +
 +
==== writeFloat ====
  
 
; [[writeFloat]](address,value)
 
; [[writeFloat]](address,value)
 
: Writes a single precision floating point to the specified address. Returns true on success
 
: Writes a single precision floating point to the specified address. Returns true on success
 +
 +
==== writeDouble ====
  
 
; [[writeDouble]](address,value)
 
; [[writeDouble]](address,value)
 
: Writes a double precision floating point to the specified address. Returns true on success
 
: Writes a double precision floating point to the specified address. Returns true on success
 +
 +
==== writeString ====
  
 
; [[writeString]](address,text, widechar OPTIONAL)
 
; [[writeString]](address,text, widechar OPTIONAL)
: Write a string to the specified address. Returns true on success
+
: Write a string to the specified address. Returns true on success. Set WideChar to true if it is encoded using a widechar formatting.
 
 
  
 +
==== readBytesLocal ====
  
 
; [[readBytesLocal]](address,bytecount, ReturnAsTable)
 
; [[readBytesLocal]](address,bytecount, ReturnAsTable)
 
: See readBytes but then it's for Cheat engine's memory
 
: See readBytes but then it's for Cheat engine's memory
 +
 +
==== readIntegerLocal ====
  
 
; [[readIntegerLocal]](address)
 
; [[readIntegerLocal]](address)
 
: Reads an integer from the specified address in CE's memory
 
: Reads an integer from the specified address in CE's memory
 +
 +
==== readQwordLocal ====
  
 
; [[readQwordLocal]](address)
 
; [[readQwordLocal]](address)
 
: Reads a 64-bit integer from the specified address in CE's memory
 
: Reads a 64-bit integer from the specified address in CE's memory
 +
 +
==== readPointerLocal ====
  
 
; [[readPointerLocal]](address)
 
; [[readPointerLocal]](address)
 
: ReadQwordLocal/ReadIntegerLocal depending on the cheat engine build
 
: ReadQwordLocal/ReadIntegerLocal depending on the cheat engine build
 +
 +
==== readFloatLocal ====
  
 
; [[readFloatLocal]](address)
 
; [[readFloatLocal]](address)
 
: Reads a single precision floating point value from the specified address in CE's memory
 
: Reads a single precision floating point value from the specified address in CE's memory
 +
 +
==== readDoubleLocal ====
  
 
; [[readDoubleLocal]](address)
 
; [[readDoubleLocal]](address)
 
: Reads a double precision floating point value from the specified address in CE's memory
 
: Reads a double precision floating point value from the specified address in CE's memory
 +
 +
==== readStringLocal ====
  
 
; [[readStringLocal]](address, maxlength, widechar OPTIONAL)
 
; [[readStringLocal]](address, maxlength, widechar OPTIONAL)
 
: Reads a string from CE's memory till it encounters a 0-terminator. Maxlength is just so you won't freeze for too long, set to 6000 if you don't care too much. Set WideChar to true if it is encoded using a widechar formatting
 
: Reads a string from CE's memory till it encounters a 0-terminator. Maxlength is just so you won't freeze for too long, set to 6000 if you don't care too much. Set WideChar to true if it is encoded using a widechar formatting
 +
 +
==== writeIntegerLocal ====
  
 
; [[writeIntegerLocal]](address,value)
 
; [[writeIntegerLocal]](address,value)
 
: Writes an integer to the specified address in CE's memory. Returns true on success
 
: Writes an integer to the specified address in CE's memory. Returns true on success
 +
 +
==== writeQwordLocal ====
  
 
; [[writeQwordLocal]](address,value)
 
; [[writeQwordLocal]](address,value)
 
: Writes a 64-bit integer to the specified address in CE's memory. Returns true on success
 
: Writes a 64-bit integer to the specified address in CE's memory. Returns true on success
 +
 +
==== writeFloatLocal ====
  
 
; [[writeFloatLocal]](address,value)
 
; [[writeFloatLocal]](address,value)
 
: Writes a single precision floating point to the specified address in CE's memory. Returns true on success
 
: Writes a single precision floating point to the specified address in CE's memory. Returns true on success
 +
 +
==== writeDoubleLocal ====
  
 
; [[writeDoubleLocal]](address,value)
 
; [[writeDoubleLocal]](address,value)
 
: Writes a double precision floating point to the specified address in CE's memory. Returns true on success
 
: Writes a double precision floating point to the specified address in CE's memory. Returns true on success
 +
 +
==== writeStringLocal ====
  
 
; [[writeStringLocal]](address,string, widechar OPTIONAL)
 
; [[writeStringLocal]](address,string, widechar OPTIONAL)
: Write a string to CE's memory at the specified address. Returns true on success
+
: Write a string to CE's memory at the specified address. Returns true on success. Set WideChar to true if it is encoded using a widechar formatting.
 +
 
 +
==== writeBytesLocal ====
  
 
; [[writeBytesLocal]](address, x,x,x,x,...)
 
; [[writeBytesLocal]](address, x,x,x,x,...)
: See writeBytes but then it's for Cheat Engine's memory
+
; writeBytesLocal(address, table, , count)
 
+
: See writeBytes but then it's for Cheat Engine's memory.
; [[writeBytesLocal]](address, table, , count)
 
: See writeBytes but then it's for Cheat Engine's memory
 
  
 +
==== wordToByteTable ====
  
 
; [[wordToByteTable]](number)
 
; [[wordToByteTable]](number)
 
: Converts a word to a bytetable
 
: Converts a word to a bytetable
 +
 +
==== dwordToByteTable ====
  
 
; [[dwordToByteTable]](number)
 
; [[dwordToByteTable]](number)
 
: Converts a dword to a bytetable
 
: Converts a dword to a bytetable
 +
 +
==== qwordToByteTable ====
  
 
; [[qwordToByteTable]](number)
 
; [[qwordToByteTable]](number)
 
: Converts a qword to a bytetable
 
: Converts a qword to a bytetable
 +
 +
==== floatToByteTable ====
  
 
; [[floatToByteTable]](number)
 
; [[floatToByteTable]](number)
 
: Converts a float to a bytetable
 
: Converts a float to a bytetable
 +
 +
==== doubleToByteTable ====
  
 
; [[doubleToByteTable]](number)
 
; [[doubleToByteTable]](number)
 
: Converts a double to a bytetable
 
: Converts a double to a bytetable
 +
 +
==== stringToByteTable ====
  
 
; [[stringToByteTable]](string)
 
; [[stringToByteTable]](string)
 
: Converts a string to a bytetable
 
: Converts a string to a bytetable
 +
 +
==== wideStringToByteTable ====
  
 
; [[wideStringToByteTable]](string)
 
; [[wideStringToByteTable]](string)
 
: Converts a string to a widestring and converts that to a bytetable
 
: Converts a string to a widestring and converts that to a bytetable
  
 +
 +
==== byteTableToWord ====
  
 
; [[byteTableToWord]](table)
 
; [[byteTableToWord]](table)
 
: Converts a bytetable to a word
 
: Converts a bytetable to a word
 +
 +
==== byteTableToDword ====
  
 
; [[byteTableToDword]](table)
 
; [[byteTableToDword]](table)
 
: Converts a bytetable to a dword
 
: Converts a bytetable to a dword
 +
 +
==== byteTableToQword ====
  
 
; [[byteTableToQword]](table)
 
; [[byteTableToQword]](table)
 
: Converts a bytetable to a qword
 
: Converts a bytetable to a qword
 +
 +
==== byteTableToFloat ====
  
 
; [[byteTableToFloat]](table)
 
; [[byteTableToFloat]](table)
 
: Converts a bytetable to a float
 
: Converts a bytetable to a float
 +
 +
==== byteTableToDouble ====
  
 
; [[byteTableToDouble]](table)
 
; [[byteTableToDouble]](table)
 
: Converts a bytetable to a double
 
: Converts a bytetable to a double
 +
 +
==== byteTableToString ====
  
 
; [[byteTableToString]](table)
 
; [[byteTableToString]](table)
 
: Converts a bytetable to a string
 
: Converts a bytetable to a string
 +
 +
==== byteTableToWideString ====
  
 
; [[byteTableToWideString]](table)
 
; [[byteTableToWideString]](table)
: Converts a bytetable to a widestring and convets that to a string
+
: Converts a bytetable to a widestring and converts that to a string
  
 +
==== bOr ====
  
 
; [[bOr]](int1, int2)
 
; [[bOr]](int1, int2)
 
: Binary Or
 
: Binary Or
 +
 +
==== bXor ====
  
 
; [[bXor]](int1, int2)
 
; [[bXor]](int1, int2)
 
: Binary Xor
 
: Binary Xor
  
; [[bAnd]](int1, int2
+
==== bAnd ====
 +
 
 +
; [[bAnd]](int1, int2)
 
: Binary And
 
: Binary And
 +
 +
==== bShl ====
  
 
; [[bShl]](int, int2)
 
; [[bShl]](int, int2)
 
: Binary shift leftP
 
: Binary shift leftP
 +
 +
==== bShr ====
  
 
; [[bShr]](int, int2)
 
; [[bShr]](int, int2)
 
: Binary shift right
 
: Binary shift right
 +
 +
==== bNot ====
  
 
; [[bNot]](int)
 
; [[bNot]](int)
 
: Binary not
 
: Binary not
  
 +
 +
==== writeRegionToFile ====
  
 
; [[writeRegionToFile]](filename, sourceaddress,size)
 
; [[writeRegionToFile]](filename, sourceaddress,size)
 
: Writes the given region to a file. Returns the number of bytes written
 
: Writes the given region to a file. Returns the number of bytes written
 +
 +
==== readRegionFromFile ====
  
 
; [[readRegionFromFile]](filename, destinationaddress)
 
; [[readRegionFromFile]](filename, destinationaddress)
 
: Reads a file from memory and writes the contents of that file to the specified address
 
: Reads a file from memory and writes the contents of that file to the specified address
  
 +
 +
==== resetLuaState ====
  
 
; [[resetLuaState]]()
 
; [[resetLuaState]]()
 
: This will create a new lua state that will be used. (Does not destroy the old one, so memory leak)
 
: This will create a new lua state that will be used. (Does not destroy the old one, so memory leak)
  
 +
 +
==== createRef ====
  
 
; [[createRef]](...)
 
; [[createRef]](...)
: Returns an integer reference that you can use with getRef. Useful for objects that can only store integers and need to reference lua
+
: Returns an integer reference that you can use with getRef. Useful for objects that can only store integers and need to reference lua objects.  (Component.Tag...)
 +
 
 +
==== getRef ====
  
objects.  (Component.Tag...)
 
 
; [[getRef]](integer)
 
; [[getRef]](integer)
 
: Returns whatever the reference points out
 
: Returns whatever the reference points out
  
destroyRef(integer) - Removes the reference
+
==== destroyRef ====
 +
 
 +
; [[destroyRef]](integer)
 +
: Removes the reference.
 +
 
 +
==== reloadSettingsFromRegistry ====
  
 
; [[reloadSettingsFromRegistry]]()
 
; [[reloadSettingsFromRegistry]]()
 
: This will cause cheat engine to reload the settings from the registry and apply them
 
: This will cause cheat engine to reload the settings from the registry and apply them
  
 +
 +
==== getTranslationFolder ====
  
 
; [[getTranslationFolder]]()
 
; [[getTranslationFolder]]()
 
: Returns the path of the current translation files. Empty if there is no translation going on
 
: Returns the path of the current translation files. Empty if there is no translation going on
 +
 +
==== loadPOFile ====
  
 
; [[loadPOFile]](path)
 
; [[loadPOFile]](path)
 
: Loads a '.PO' file used for translation
 
: Loads a '.PO' file used for translation
 +
 +
==== translate ====
  
 
; [[translate]](string)
 
; [[translate]](string)
 
: Returns a translation of the string. Returns the same string if it can't be found
 
: Returns a translation of the string. Returns the same string if it can't be found
 +
 +
==== translateID ====
  
 
; [[translateID]](translationid - string, originalstring - string OPTIONAL)
 
; [[translateID]](translationid - string, originalstring - string OPTIONAL)
 
: Returns a translation of the string id
 
: Returns a translation of the string id
  
 +
 +
==== ansiToUtf8 ====
  
 
; [[ansiToUtf8]](string)
 
; [[ansiToUtf8]](string)
 
: Converts a string in Ansi encoding to UTF8
 
: Converts a string in Ansi encoding to UTF8
 +
 +
==== utf8ToAnsi ====
  
 
; [[utf8ToAnsi]](string)
 
; [[utf8ToAnsi]](string)
Line 232: Line 364:
 
</blockquote>
 
</blockquote>
  
 +
 +
==== enumModules ====
  
 
; [[enumModules]](processid OPTIONAL)
 
; [[enumModules]](processid OPTIONAL)
Line 240: Line 374:
 
* '''PathToFile''': String to the location this module is loaded
 
* '''PathToFile''': String to the location this module is loaded
  
 +
 +
==== getAddress ====
  
 
; [[getAddress]](string, local OPTIONAL)
 
; [[getAddress]](string, local OPTIONAL)
 
: returns the address of a symbol. Can be a modulename or an export. set Local to true if you wish to querry the symboltable of the ce process
 
: returns the address of a symbol. Can be a modulename or an export. set Local to true if you wish to querry the symboltable of the ce process
 +
 +
==== getSymbolInfo ====
  
 
; [[getSymbolInfo]](symbolname)
 
; [[getSymbolInfo]](symbolname)
 
: Returns a table as defined by the SymbolList class object (modulename, searchkey, address, size)
 
: Returns a table as defined by the SymbolList class object (modulename, searchkey, address, size)
 +
 +
==== getModuleSize ====
  
 
; [[getModuleSize]](modulename)
 
; [[getModuleSize]](modulename)
: Returns the size of a given module (Use getAddress to get the base address)
+
: Returns the size of a given module (Use [[getAddress]] to get the base address)
 +
 
 +
==== reinitializeSymbolhandler ====
  
 
; [[reinitializeSymbolhandler]](waittilldone &#58; BOOLEAN OPTIONAL, default=TRUE)
 
; [[reinitializeSymbolhandler]](waittilldone &#58; BOOLEAN OPTIONAL, default=TRUE)
 
: reinitializes the symbolhandler. E.g when new modules have been loaded
 
: reinitializes the symbolhandler. E.g when new modules have been loaded
 +
 +
==== reinitializeDotNetSymbolhandler ====
  
 
; [[reinitializeDotNetSymbolhandler]](modulename OPTIONAL)
 
; [[reinitializeDotNetSymbolhandler]](modulename OPTIONAL)
 
: Reinitializes only the DotNet part of the symbol list. (E.g After an ILCode has been JITed) (6.4+)
 
: Reinitializes only the DotNet part of the symbol list. (E.g After an ILCode has been JITed) (6.4+)
  
 +
 +
==== errorOnLookupFailure ====
  
 
; [[errorOnLookupFailure]](state)
 
; [[errorOnLookupFailure]](state)
 
: If set to true (default) address lookups in stringform will raise an error if it can not be looked up. This includes symbolnames that are not defined and pointers that are bad. If set to false it will return 0 in those cases (Useful for pointers that don't work 100% of the time) ''6.4+:Returns the original state''
 
: If set to true (default) address lookups in stringform will raise an error if it can not be looked up. This includes symbolnames that are not defined and pointers that are bad. If set to false it will return 0 in those cases (Useful for pointers that don't work 100% of the time) ''6.4+:Returns the original state''
  
 +
 +
==== generateAPIHookScript ====
  
 
; [[generateAPIHookScript]](address, addresstojumpto, addresstogetnewcalladdress OPT)
 
; [[generateAPIHookScript]](address, addresstojumpto, addresstogetnewcalladdress OPT)
 
: Generates an auto assembler script which will hook the given address when executed
 
: Generates an auto assembler script which will hook the given address when executed
 +
 +
==== autoAssemble ====
  
 
; [[autoAssemble]](text, targetself OPTIONAL)
 
; [[autoAssemble]](text, targetself OPTIONAL)
 
: runs the auto assembler with the given text. Returns true on success (if targetself is set it will assemble into Cheat Engine itself)
 
: runs the auto assembler with the given text. Returns true on success (if targetself is set it will assemble into Cheat Engine itself)
  
 +
 +
==== registerAutoAssemblerCommand ====
  
 
; [[registerAutoAssemblerCommand]](command, function(parameters, syntaxcheckonly))
 
; [[registerAutoAssemblerCommand]](command, function(parameters, syntaxcheckonly))
Line 275: Line 427:
 
* '''Nil, String''': Will raise an error with the given string
 
* '''Nil, String''': Will raise an error with the given string
 
* '''MultilineString''': Replaces the line in the script with the given strings.
 
* '''MultilineString''': Replaces the line in the script with the given strings.
 +
 +
==== unregisterAutoAssemblerCommand ====
  
 
; [[unregisterAutoAssemblerCommand]](command)
 
; [[unregisterAutoAssemblerCommand]](command)
 
: Removes the callback.
 
: Removes the callback.
  
 +
 +
==== registerSymbolLookupCallback ====
  
 
; [[registerSymbolLookupCallback]](function(string) &#58; integer, location) &#58; ID  6.4+
 
; [[registerSymbolLookupCallback]](function(string) &#58; integer, location) &#58; ID  6.4+
Line 293: Line 449:
 
'''''Note: slNotSymbol and slFailure are similar, but failure comes only if there's no token after the current token that can be concatenated. Else slNotSymbol will loop several times till all tokens make up the full string'''''
 
'''''Note: slNotSymbol and slFailure are similar, but failure comes only if there's no token after the current token that can be concatenated. Else slNotSymbol will loop several times till all tokens make up the full string'''''
 
</blockquote>
 
</blockquote>
 +
 +
==== unregisterSymbolLookupCallback ====
  
 
; [[unregisterSymbolLookupCallback]](ID)
 
; [[unregisterSymbolLookupCallback]](ID)
 
: Removes the callback.
 
: Removes the callback.
  
 +
 +
==== registerAddressLookupCallback ====
  
 
; [[registerAddressLookupCallback]](function(integer) &#58; string) &#58; ID
 
; [[registerAddressLookupCallback]](function(integer) &#58; string) &#58; ID
 
: Registers a function to be called when the name of an address is requested
 
: Registers a function to be called when the name of an address is requested
 +
 +
==== unregisterAddressLookupCallback ====
  
 
; [[unregisterAddressLookupCallback]](ID)
 
; [[unregisterAddressLookupCallback]](ID)
 
: Removes the callback.
 
: Removes the callback.
  
 +
 +
==== registerStructureDissectOverride ====
  
 
; [[registerStructureDissectOverride]](function(structure, baseaddress) &#58; table)
 
; [[registerStructureDissectOverride]](function(structure, baseaddress) &#58; table)
Line 312: Line 476:
 
'''''Tip: Use inputQuery to ask the user the size if your function doesn't do that automatically'''''
 
'''''Tip: Use inputQuery to ask the user the size if your function doesn't do that automatically'''''
 
</blockquote>
 
</blockquote>
 +
 +
==== unregisterStructureDissectOverride ====
  
 
; [[unregisterStructureDissectOverride]](ID)
 
; [[unregisterStructureDissectOverride]](ID)
 
: Removes the callback.
 
: Removes the callback.
  
 +
 +
==== registerStructureNameLookup ====
  
 
; [[registerStructureNameLookup]](function(address) &#58; name, address OPTIONAL)
 
; [[registerStructureNameLookup]](function(address) &#58; name, address OPTIONAL)
 
: Registers a function to be called when dissect data asks the user for the name of a new structure define. If you have code that can look up the name of a structure, and perhaps also the real starting point, you can use this to improve the data dissection.
 
: Registers a function to be called when dissect data asks the user for the name of a new structure define. If you have code that can look up the name of a structure, and perhaps also the real starting point, you can use this to improve the data dissection.
 +
 +
==== unregisterStructureNameLookup ====
  
 
; [[unregisterStructureNameLookup]](ID)
 
; [[unregisterStructureNameLookup]](ID)
 
: Removes the callback.
 
: Removes the callback.
  
 +
 +
==== registerAssembler ====
  
 
; [[registerAssembler]](function(address, instruction) &#58; bytetable)
 
; [[registerAssembler]](function(address, instruction) &#58; bytetable)
 
: Registers a function to be called when the single line assembler is invoked to convert an instruction to a list of bytes
 
: Registers a function to be called when the single line assembler is invoked to convert an instruction to a list of bytes
 
: Return a bytetable with the specific bytes, or nil if you wish to let another function, or the original x86 assembler to assemble it
 
: Return a bytetable with the specific bytes, or nil if you wish to let another function, or the original x86 assembler to assemble it
 +
 +
==== unregisterAssembler ====
  
 
; [[unregisterAssembler]](ID)
 
; [[unregisterAssembler]](ID)
 
: Unregisters the registered assembler
 
: Unregisters the registered assembler
  
 +
 +
==== registerAutoAssemblerPrologue ====
  
 
; [[registerAutoAssemblerPrologue]](function(script, syntaxcheck))
 
; [[registerAutoAssemblerPrologue]](function(script, syntaxcheck))
 
: Registers a function to be called when the auto assembler is about to parse an auto assembler script. The script you get is after the [ENABLE] and [DISABLE] tags have been used to strip the script to the according one, but before comment stripping and trimming has occured.
 
: Registers a function to be called when the auto assembler is about to parse an auto assembler script. The script you get is after the [ENABLE] and [DISABLE] tags have been used to strip the script to the according one, but before comment stripping and trimming has occured.
 
: Script is a Strings object which when changed has direct effect to the script.
 
: Script is a Strings object which when changed has direct effect to the script.
 +
 +
==== unregisterAutoAssemblerPrologue ====
  
 
; [[unregisterAutoAssemblerPrologue]](ID)
 
; [[unregisterAutoAssemblerPrologue]](ID)
Line 340: Line 518:
  
  
 +
 +
==== showMessage ====
  
 
; [[showMessage]](text)
 
; [[showMessage]](text)
 
: shows a messagebox with the given text
 
: shows a messagebox with the given text
 +
 +
==== inputQuery ====
  
 
; [[inputQuery]](caption, prompt, initialstring)
 
; [[inputQuery]](caption, prompt, initialstring)
 
: Shows a dialog where the user can input a string. This function returns the given string, or nil on cancel  CE6.4+
 
: Shows a dialog where the user can input a string. This function returns the given string, or nil on cancel  CE6.4+
 +
 +
==== messageDialog ====
  
 
; [[messageDialog]](text, type, buttons...)
 
; [[messageDialog]](text, type, buttons...)
 
: pops up a messagebox with a specific icon/sound with the specified buttons (mbok, mbyes, ....)
 
: pops up a messagebox with a specific icon/sound with the specified buttons (mbok, mbyes, ....)
 +
 +
==== sleep ====
  
 
; [[sleep]](milliseconds)
 
; [[sleep]](milliseconds)
Line 354: Line 540:
  
  
; [[getProcesslist]](Strings)
+
==== getProcesslist ====
: Fills a Strings inherited object with the processlist of the system.
 
: Format: %x-pidname
 
  
 
; [[getProcesslist]]()
 
; [[getProcesslist]]()
: Returns a table with the processlist  (pid - name )
+
; getProcesslist(Strings)
 +
: Returns a table with the process list (pid - name ), if 'Strings' is not set.
 +
: If 'Strings' is set fills a Strings inherited object with the process list of the system.
 +
: Format: %x-pidname
  
; [[getWindowlist]](Strings)
+
==== getWindowlist ====
: Fills a Strings inherited object with the top-window list of the system.
 
: Format: %x-windowcaption
 
  
 
; [[getWindowlist]]()
 
; [[getWindowlist]]()
: Returns a table with the windowlist (pid - window caption )
+
; getWindowlist(Strings)
 +
: Returns a table with the window list (pid - window caption), if 'Strings' is not set.
 +
: If 'Strings' is set fills a Strings inherited object with the top-window list of the system.
 +
: Format: %x-windowcaption
  
 +
==== getThreadlist ====
  
 
; [[getThreadlist]](List)
 
; [[getThreadlist]](List)
Line 374: Line 563:
  
  
;[[ '']]function'' onOpenProcess(processid)
+
==== onOpenProcess ====
 +
 
 +
; function [[onOpenProcess]](processid)
 
: If this function is defined it will be called whenever cheat engine opens a process.
 
: If this function is defined it will be called whenever cheat engine opens a process.
 
<blockquote>
 
<blockquote>
Line 382: Line 573:
 
</blockquote>
 
</blockquote>
  
 +
==== getOpenedProcessID ====
  
 
; [[getOpenedProcessID]]()
 
; [[getOpenedProcessID]]()
 
: Returns the currently opened process. If none is open, returns 0
 
: Returns the currently opened process. If none is open, returns 0
 +
 +
==== getProcessIDFromProcessName ====
  
 
; [[getProcessIDFromProcessName]](name)
 
; [[getProcessIDFromProcessName]](name)
 
: returns a processid
 
: returns a processid
 +
 +
==== openProcess ====
  
 
; [[openProcess]](processid)
 
; [[openProcess]](processid)
Line 394: Line 590:
 
; [[openProcess]](processname)
 
; [[openProcess]](processname)
 
: causes cheat engine to find and open the given process
 
: causes cheat engine to find and open the given process
 +
 +
==== setPointerSize ====
  
 
; [[setPointerSize]](size)
 
; [[setPointerSize]](size)
 
: Sets the size cheat engine will deal with pointers in bytes. (Some 64-bit processes can only use 32-bit addresses)
 
: Sets the size cheat engine will deal with pointers in bytes. (Some 64-bit processes can only use 32-bit addresses)
 +
 +
==== pause ====
  
 
; [[pause]]()
 
; [[pause]]()
 
: pauses the current opened process
 
: pauses the current opened process
 +
 +
==== unpause ====
  
 
; [[unpause]]()
 
; [[unpause]]()
Line 405: Line 607:
  
  
; [[getPixel]](x,y)
+
==== getPixel ====
 +
 
 +
; [[getPixel]](x, y)
 
: returns the rgb value of the pixel at the specific screen coordinate
 
: returns the rgb value of the pixel at the specific screen coordinate
 +
 +
==== getMousePos ====
  
 
; [[getMousePos]]
 
; [[getMousePos]]
 
: returns the x,y coordinates of the mouse
 
: returns the x,y coordinates of the mouse
 +
 +
==== setMousePos ====
  
 
; [[setMousePos]](x,y)
 
; [[setMousePos]](x,y)
 
: sets the mouse position
 
: sets the mouse position
  
 +
 +
==== isKeyPressed ====
  
 
; [[isKeyPressed]](key)
 
; [[isKeyPressed]](key)
 
: returns true if the specified key is currently pressed
 
: returns true if the specified key is currently pressed
 +
 +
==== keyDown ====
  
 
; [[keyDown]](key)
 
; [[keyDown]](key)
 
: causes the key to go into down state
 
: causes the key to go into down state
 +
 +
==== keyUp ====
  
 
; [[keyUp]](key)
 
; [[keyUp]](key)
 
: causes the key to go up
 
: causes the key to go up
 +
 +
==== doKeyPress ====
  
 
; [[doKeyPress]](key)
 
; [[doKeyPress]](key)
 
: simulates a key press
 
: simulates a key press
  
 +
 +
==== shortCutToText ====
  
 
; [[shortCutToText]](shortcut)
 
; [[shortCutToText]](shortcut)
 
: Returns the textual representation of the given shortut value (integer) (6.4+)
 
: Returns the textual representation of the given shortut value (integer) (6.4+)
 +
 +
==== textToShortCut ====
  
 
; [[textToShortCut]](shortcutstring)
 
; [[textToShortCut]](shortcutstring)
 
: Returns an shortcut integer that the given string represents. (6.4+)
 
: Returns an shortcut integer that the given string represents. (6.4+)
  
 +
 +
==== convertKeyComboToString ====
  
 
; [[convertKeyComboToString]](key1,...)
 
; [[convertKeyComboToString]](key1,...)
Line 439: Line 661:
 
: Returns a string representation of the given keys like the hotkey handler does
 
: Returns a string representation of the given keys like the hotkey handler does
  
 +
 +
==== outputDebugString ====
  
 
; [[outputDebugString]](text)
 
; [[outputDebugString]](text)
 
: Outputs a message using the windows OutputDebugString message. You can use tools like dbgview to read this. Useful for testing situations where the GUI freezes
 
: Outputs a message using the windows OutputDebugString message. You can use tools like dbgview to read this. Useful for testing situations where the GUI freezes
 +
 +
==== shellExecute ====
  
 
; [[shellExecute]](command, parameters OPTIONAL, folder OPTIONAL, showcommand OPTIONAL)
 
; [[shellExecute]](command, parameters OPTIONAL, folder OPTIONAL, showcommand OPTIONAL)
 
: Executes a given command
 
: Executes a given command
  
 +
 +
==== getTickCount ====
  
 
; [[getTickCount]]()
 
; [[getTickCount]]()
 
:  Returns the current tickcount since windows was started. Each tick is one millisecond
 
:  Returns the current tickcount since windows was started. Each tick is one millisecond
 +
 +
==== processMessages ====
  
 
; [[processMessages]]()
 
; [[processMessages]]()
 
:  Lets the main eventhandler process the new messages (allows for new button clicks)
 
:  Lets the main eventhandler process the new messages (allows for new button clicks)
 +
 +
==== inMainThread ====
  
 
; [[inMainThread]]()
 
; [[inMainThread]]()
 
: Returns true if the current code is running inside the main thread (6.4+)
 
: Returns true if the current code is running inside the main thread (6.4+)
 +
 +
==== integerToUserData ====
  
 
; [[integerToUserData]](int)
 
; [[integerToUserData]](int)
 
:  Converts a given integer to a userdata variable
 
:  Converts a given integer to a userdata variable
 +
 +
==== userDataToInteger ====
  
 
; [[userDataToInteger]](UserDataVar)
 
; [[userDataToInteger]](UserDataVar)
 
:  Converts a given userdata variable to an integer
 
:  Converts a given userdata variable to an integer
  
 +
 +
==== synchronize ====
  
 
; [[synchronize]](function(...), ...)
 
; [[synchronize]](function(...), ...)
 
: Calls the given function from the main thread. Returns the return value of the given function
 
: Calls the given function from the main thread. Returns the return value of the given function
 +
 +
==== checkSynchronize ====
  
 
; [[checkSynchronize]]()
 
; [[checkSynchronize]]()
 
: Calls this from an infinite loop in the main thread when using threading and synchronize calls. This will execute any queued synchronize calls
 
: Calls this from an infinite loop in the main thread when using threading and synchronize calls. This will execute any queued synchronize calls
  
 +
 +
==== writeToClipboard ====
  
 
; [[writeToClipboard]](text)
 
; [[writeToClipboard]](text)
 
:  Writes the given text to the clipboard
 
:  Writes the given text to the clipboard
 +
 +
==== readFromClipboard ====
  
 
; [[readFromClipboard]]()
 
; [[readFromClipboard]]()
 
:  Reads the text from the clipboard
 
:  Reads the text from the clipboard
  
 +
 +
==== speedhack_setSpeed ====
  
 
; [[speedhack_setSpeed]](speed)
 
; [[speedhack_setSpeed]](speed)
 
: Enables the speedhack if needed and sets the specific speed
 
: Enables the speedhack if needed and sets the specific speed
 +
 +
==== speedhack_getSpeed ====
  
 
; [[speedhack_getSpeed]]()
 
; [[speedhack_getSpeed]]()
 
: Returns the last set speed
 
: Returns the last set speed
  
 +
 +
==== injectDLL ====
  
 
; [[injectDLL]](filename)
 
; [[injectDLL]](filename)
 
: Injects a dll, and returns true on success
 
: Injects a dll, and returns true on success
  
 +
 +
==== loadPlugin ====
  
 
; [[loadPlugin]](dllnameorpath)
 
; [[loadPlugin]](dllnameorpath)
 
: Loads the given plugin. Returns nil on failure. On success returns a value of 0 or greater
 
: Loads the given plugin. Returns nil on failure. On success returns a value of 0 or greater
  
 +
 +
==== registerCustomTypeLua ====
  
 
; [[registerCustomTypeLua]](typename, bytecount, bytestovaluefunction, valuetobytesfunction, isFloat)
 
; [[registerCustomTypeLua]](typename, bytecount, bytestovaluefunction, valuetobytesfunction, isFloat)
Line 497: Line 751:
 
: The value to bytes function should be defined as "function valuetobytes (integer)" and return the bytes it should write.
 
: The value to bytes function should be defined as "function valuetobytes (integer)" and return the bytes it should write.
  
 +
 +
==== registerCustomTypeAutoAssembler ====
  
 
; [[registerCustomTypeAutoAssembler]](script)
 
; [[registerCustomTypeAutoAssembler]](script)
 
: Registers a custom type based on an auto assembler script. The script must allocate an "ConvertRoutine" and "ConvertBackRoutine".
 
: Registers a custom type based on an auto assembler script. The script must allocate an "ConvertRoutine" and "ConvertBackRoutine".
  
 +
 +
==== onAutoGuess ====
  
 
; [[onAutoGuess]](function)
 
; [[onAutoGuess]](function)
Line 506: Line 764:
 
: '''function override (address, ceguess)''': Return the variable type you want it to be. If no change, just return ceguess.
 
: '''function override (address, ceguess)''': Return the variable type you want it to be. If no change, just return ceguess.
  
 +
 +
==== closeCE ====
  
 
; [[closeCE]]()
 
; [[closeCE]]()
 
: just closes ce
 
: just closes ce
 +
 +
==== hideAllCEWindows ====
  
 
; [[hideAllCEWindows]]()
 
; [[hideAllCEWindows]]()
 
: makes all normal ce windows invisible (e.g trainer table)
 
: makes all normal ce windows invisible (e.g trainer table)
 +
 +
==== unhideMainCEwindow ====
  
 
; [[unhideMainCEwindow]]()
 
; [[unhideMainCEwindow]]()
 
: shows the main cheat engine window
 
: shows the main cheat engine window
  
 +
 +
==== getAutoAttachList ====
  
 
; [[getAutoAttachList]]()
 
; [[getAutoAttachList]]()
Line 521: Line 787:
  
  
; [[AOBScan]](x,x,x,x,...)
+
==== AOBScan ====
 +
 
 +
; [[AOBScan]](x, x, x, x, ...)
 
; AOBScan(aobstring, protectionflags OPTIONAL, alignmenttype OPTIONAL, alignmentparam HALFOPTIONAL)
 
; AOBScan(aobstring, protectionflags OPTIONAL, alignmenttype OPTIONAL, alignmentparam HALFOPTIONAL)
 
: scans the currently opened process and returns a StringList object containing all the results. don't forget to free this list when done.
 
: scans the currently opened process and returns a StringList object containing all the results. don't forget to free this list when done.
Line 548: Line 816:
 
If initialized using a function itself it won't be able to get saved in the table.
 
If initialized using a function itself it won't be able to get saved in the table.
  
 
+
==== allocateSharedMemory ====
  
 
; [[allocateSharedMemory]](name, size)
 
; [[allocateSharedMemory]](name, size)
Line 554: Line 822:
 
: It then maps this shared memory block into the currently targeted process. It returns the address of mapped region in the target process.
 
: It then maps this shared memory block into the currently targeted process. It returns the address of mapped region in the target process.
  
 +
 +
==== getForegroundProcess ====
  
 
; [[getForegroundProcess]]()
 
; [[getForegroundProcess]]()
: Returns the processID of the process that is currently on top
+
: Returns the processID of the process that is currently on top.
  
 +
==== findWindow ====
  
; [[cheatEngineIs64Bit]]()
+
; [[findWindow]](classname OPTIONAL, caption OPTIONAL)<nowiki>:</nowiki> ''windowhandle''
: Returns true if CE is 64-bit, false if 32-bit
+
: Finds a window with the given classname and/or windowname.
  
; [[targetIs64Bit]]()
+
==== getWindow ====
: Returns true if the target process is 64-bit, false if 32-bit
 
  
 +
; [[getWindow]](windowhandle, command) <nowiki>:</nowiki> ''windowhandle''
 +
: Gets a specific window based on the given window (Check MSDN getWindow for the command description).
  
; [[getCheatEngineDir]]()
+
==== getWindowCaption ====
: Returns the folder Cheat Engine is located at
 
  
 +
; [[getWindowCaption]](windowhandle) <nowiki>:</nowiki> ''string''
 +
: Returns the caption of the window.
  
; [[disassemble]](address)
+
==== getWindowClassName ====
: Disassembles the given address and returns a string in the format of "address - bytes - opcode &#58; extra"
 
  
; [[splitDisassembledString]](disassembledstring)
+
; [[getWindowClassName]](windowhandle) <nowiki>:</nowiki> ''string''
: Returns 4 strings. The address, bytes, opcode and extra field
+
: Returns the classname of the window.
  
  
; [[getInstructionSize]](address)
+
==== getWindowProcessID ====
: Returns the size of an instruction (basically it disassembles the instruction and returns the number of bytes for you)
 
  
; [[getPreviousOpcode]](address)
+
; [[getWindowProcessID]](windowhandle) <nowiki>:</nowiki> ''processid''
: Returns the address of the previous opcode (this is just an estimated guess)
+
: Returns the processid of the process this window belongs to.
  
 +
==== getForegroundWindow ====
  
; [[beep]]()
+
; [[getForegroundWindow]]() <nowiki>:</nowiki> ''windowhandle''
: Plays the fabulous beep/ping sound!
+
: Returns the windowhandle of the topmost window.
  
; [[playSound]](stream, waittilldone OPTIONAL)
+
==== sendMessage ====
: Plays the given memorystream containing a .WAV formatted memory object. If waittilldone is true the script will stop executing till the sound has stopped
 
  
; [[playSound]](tablefile, waittilldone OPTIONAL)
+
; [[sendMessage]](hwnd, msg, wparam, lparam) <nowiki>:</nowiki> ''result''
: Takes the memorystream from the tablefile and plays it.
+
: Sends a message to a window. Those that wish to use it, should know how to use it (and fill in the msg id's yourself).
: There are two tablefiles predeclared inside cheat engine "Activate" and "Deactivate" . You are free to use or override them
 
  
 +
==== hookWndProc ====
  
; [[getUserRegistryEnvironmentVariable]](name)
+
; [[hookWndProc]](hwnd, function(hwnd, msg, wparam, lparam), async) <nowiki>:</nowiki> ''result''
: Returns the environment variable stored in the user registry environment
+
: Hooks a window's wndproc procedure. The given function will receive all functions.
 +
: Return 0 to say you handled it. 1 to let the default windows handler deal with it.
 +
: Or anything else, to let the original handler deal with it.
 +
: Besides the return value, you can also return hWnd, Msg, lParam and wParam, modified, or nil for the original value.
 +
: Set ASYNC to true if you don't want to run this in the CE GUI. (faster, but you can't touch GUI objects).
  
; [[setUserRegistryEnvironmentVariable]](name, string)
+
==== unhookWndProc ====
: Sets the environment variable stored in the user registry environment
 
  
; [[broadcastEnvironmentUpdate]]()
+
; [[unhookWndProc]](hwnd)
: Call this when you've changed the environment variables in the registry. This will cause at least the shell to update so you don't have to reboot. (It's always recommended to reboot though)
+
: Call this when done with the hook.  
 +
: Not calling this function will result in the process window behaving badly when you exit CE.
  
 +
==== cheatEngineIs64Bit ====
  
; [[stringToMD5String]](string)
+
; [[cheatEngineIs64Bit]]()
: Returns an md5 hash string from the provided string
+
: Returns true if CE is 64-bit, false if 32-bit
  
 +
==== targetIs64Bit ====
  
; [[getFormCount]]()
+
; [[targetIs64Bit]]()
: Returns the total number of forms assigned to the main CE application
+
: Returns true if the target process is 64-bit, false if 32-bit
  
; [[getForm]](index)
 
: Returns the form at the specific index
 
  
; [[registerFormAddNotification]](function(form))
+
==== getCheatEngineDir ====
: Registers a function to be called when a form is attached to ce's form list. This is useful for extentions that add new functionality to certain existing forms.
 
: It returns an object you can use with [[unregisterFormAddNotification]]
 
: unregisterFormAddNotification(Object)
 
  
 +
; [[getCheatEngineDir]]()
 +
: Returns the folder Cheat Engine is located at
  
; [[getSettingsForm]]()
 
: Returns the main settings form
 
  
; [[getMemoryViewForm]]()
+
==== disassemble ====
: Returns the main memoryview form class object which can be accessed using the Form_ class methods and the methods of the classes it inherits from. There can be multiple memory views, but this will only find the original/base
 
  
; [[getMainForm]]()
+
; [[disassemble]](address)
: Returns the main form class object which can be accessed using the Form_ class methods and the methods of the classes it inherits from
+
: Disassembles the given address and returns a string in the format of "address - bytes - opcode &#58; extra"
  
; [[getLuaEngine]]()
+
==== splitDisassembledString ====
: Returns the lua engine form object (Creates it if needed)
 
  
; [[getApplication]]()
+
; [[splitDisassembledString]](disassembledstring)
: Returns the application object. (the titlebar)
+
: Returns 4 strings. The address, bytes, opcode and extra field
  
; [[getAddressList]]()
 
: Returns the cheat table addresslist object
 
  
; [[getFreezeTimer]]()
+
==== getInstructionSize ====
: Returns the freeze timer object
 
  
; [[getUpdateTimer]]()
+
; [[getInstructionSize]](address)
: Returns the update timer object
+
: Returns the size of an instruction (basically it disassembles the instruction and returns the number of bytes for you)
  
 +
==== getPreviousOpcode ====
  
; [[setGlobalKeyPollInterval]](integer)
+
; [[getPreviousOpcode]](address)
: Sets the global keypoll interval. The interval determines the speed of how often CE checks if a key has been pressed or not.
+
: Returns the address of the previous opcode (this is just an estimated guess)
: Lower is more accurate, but eats more cpu power
 
  
; [[setGlobalDelayBetweenHotkeyActivation]](integer)
 
: Sets the minimum delay between the activation of the same hotey in milliseconds. Affects all hotkeys that do not set their own minimum delay
 
  
 +
==== beep ====
  
 +
; [[beep]]()
 +
: Plays the fabulous beep/ping sound!
  
 +
==== playSound ====
  
'''undefined property functions'''. Not all properties of all classes have been explicitly exposed to lua, but if you know the name of a property of a specific class you
+
; [[playSound]](stream, waittilldone OPTIONAL)
can still access them (assuming they are declared as published in the pascal class declaration)
+
: Plays the given memorystream containing a .WAV formatted memory object. If waittilldone is true the script will stop executing till the sound has stopped
getPropertyList(class): Returns a stringlist object containing all the published properties of the specified class: (free the list when done) (Note, not all classed
 
with properties have 'published' properties. E.g: stringlist)
 
setProperty(class, propertyname, propertyvalue): Sets the value of a published property of a class: (Won't work for method properties)
 
getProperty(class, propertyname): Gets the value of a published property of a class: (Won't work for method properties)
 
setMethodProperty(class, propertyname, function): Sets the method property to the specific function
 
getMethodProperty(Class, propertyname): Returns a function you can use to call the original function
 
  
 +
; [[playSound]](tablefile, waittilldone OPTIONAL)
 +
: Takes the memorystream from the tablefile and plays it.
 +
: There are two tablefiles predeclared inside cheat engine "Activate" and "Deactivate" . You are free to use or override them
  
 +
==== speak ====
  
; [[registerSymbol]](symbolname, address, OPTIONAL donotsave)
+
; [[speak]](text, waittilldone OPTIONAL)
: Registers a userdefined symbol. If donotsave is true this symbol will not get saved when the table is saved
+
: Speaks a given text.
 +
: If waitTillDone is true the thread it's in will be frozen till it is done
  
; [[unregisterSymbol]](symbolname)
+
; [[speak]](text, flags)
: Unregisters a userdefined symbol.
+
: Speaks a given text using the given flags.
  
 +
==== speakEnglish ====
  
; [[getNameFromAddress]](address)
+
; [[speakEnglish]](text, waittilldone OPTIONAL)
: Returns the given address as a string. Registered symbolname, modulename+offset, or just a hexadecimal string depending on what address
+
: Will try the English voice by wrapping the given text into an XML statement specifying the English voice.  
 +
: It'll not say anything, if no English language is present on your computer.
  
; [[inModule]](address)
+
==== getUserRegistryEnvironmentVariable ====
: returns true if the given address is inside a module
 
  
; [[inSystemModule]](address)
+
; [[getUserRegistryEnvironmentVariable]](name)
: returns true if the given address is inside a system module
+
: Returns the environment variable stored in the user registry environment
  
; [[getCommonModuleList]]
+
==== setUserRegistryEnvironmentVariable ====
: Returns the commonModuleList stringlist. (Do not free this one)
 
  
 +
; [[setUserRegistryEnvironmentVariable]](name, string)
 +
: Sets the environment variable stored in the user registry environment
  
 +
==== broadcastEnvironmentUpdate ====
  
 +
; [[broadcastEnvironmentUpdate]]()
 +
: Call this when you've changed the environment variables in the registry. This will cause at least the shell to update so you don't have to reboot. (It's always recommended to reboot though)
  
=== debugging ===
 
  
 +
==== stringToMD5String ====
 +
 +
; [[stringToMD5String]](string)
 +
: Returns an md5 hash string from the provided string
  
  
==== debug variables ====
+
==== getFormCount ====
  
 +
; [[getFormCount]]()
 +
: Returns the total number of forms assigned to the main CE application
  
; EFLAGS
+
==== getForm ====
: '''32-bit''': EAX, EBX, ECX, EDX, EDI, ESP, EBP, ESP, EIP
 
: '''64-bit''': RAX, EBX, RBX, RDX, RDI, RSP, RBP, RSP, RIP, R8, R9, R10, R11, R12, R13, R14, R15
 
  
 +
; [[getForm]](index)
 +
: Returns the form at the specific index
  
 +
==== registerFormAddNotification ====
  
==== Debug related routines ====
+
; [[registerFormAddNotification]](function(form))<nowiki>:</nowiki> ''object''
 +
: Registers a function to be called when a form is attached to ce's form list. This is useful for extentions that add new functionality to certain existing forms.
 +
: It returns an object that you can use with [[unregisterFormAddNotification]].
  
 +
==== unregisterFormAddNotification ====
  
; function [[debugger_onBreakpoint]]()
+
; [[unregisterFormAddNotification]](object)  
: When a breaking breakpoint hits (that includes single stepping) and the lua function debugger_onBreakpoint() is defined it will be called and the global variables EAX, EBX, .... will be filled in
 
: Return 0 if you want the userinterface to be updated and anything else if not (e.g: You continued from the breakpoint in your script)
 
  
  
; [[createProcess]](path, parameters OPTIONAL, debug OPTIONAL, breakonentrypoint OPTIONAL)
+
==== getSettingsForm ====
: Creates a process. If debug is true it will be created using the windows debugger and if breakonentry is true it will cause a breakpoint to occur on entrypoint.
 
  
; [[debugProcess]](interface OPTIONAL)
+
; [[getSettingsForm]]()
: starts the debugger for the currently opened process (won't ask the user).
+
: Returns the main settings form
* '''interface''':
 
** 0=default
 
** 1=windows debug
 
** 2=VEHDebug
 
** 3=Kerneldebug
 
  
 +
==== getMemoryViewForm ====
  
; [[debug_isDebugging]]()
+
; [[getMemoryViewForm]]()
: Returns true if the debugger has been started
+
: Returns the main memoryview form class object which can be accessed using the Form_ class methods and the methods of the classes it inherits from. There can be multiple memory views, but this will only find the original/base
  
; [[debug_getCurrentDebuggerInterface]]()
+
==== getMainForm ====
: Returns the current debuggerinterface used (1=windows, 2=VEH 3=Kernel, nil=no debugging active)
 
  
; [[debug_canBreak]]()
+
; [[getMainForm]]()
: Returns true if there is a possibility the target can stop on a breakpoint. 6.4+
+
: Returns the main form class object which can be accessed using the Form_ class methods and the methods of the classes it inherits from
  
; [[debug_isBroken]]()
+
==== getLuaEngine ====
: Returns true if the debugger is currently halted on a thread
 
  
; [[debug_getBreakpointList]]()
+
; [[getLuaEngine]]()
: Returns a lua table containing all the breakpoint addresses
+
: Returns the lua engine form object (Creates it if needed)
  
 +
==== getApplication ====
  
; [[debug_addThreadToNoBreakList]](threadid)
+
; [[getApplication]]()
: This will cause breakpoints on the provided thread to be ignored
+
: Returns the application object. (the titlebar)
 +
 
 +
==== getAddressList ====
  
; [[debug_removeThreadFromNoBreakList]](threadid)
+
; [[getAddressList]]()
: removed the threadid from the list
+
: Returns the cheat table addresslist object
  
 +
==== getFreezeTimer ====
  
; [[debug_setBreakpoint]](address, size OPTIONAL, trigger OPTIONAL, breakpointmethod OPTIONAL, functiontocall() OPTIONAL)
+
; [[getFreezeTimer]]()
; debug_setBreakpoint(address, size OPTIONAL, trigger OPTIONAL, functiontocall() OPTIONAL)
+
: Returns the freeze timer object
; debug_setBreakpoint(address, functiontocall() OPTIONAL)
 
: sets a breakpoint of a specific size at the given address. if trigger is bptExecute then size is ignored. If trigger is ignored then it will be of type bptExecute, which obviously also ignores the size then as well.
 
  
; [[debug_removeBreakpoint]](address)
+
==== getUpdateTimer ====
: if the given address is a part of a breakpoint it will be removed
 
  
; [[debug_continueFromBreakpoint]](continueMethod)
+
; [[getUpdateTimer]]()
: if the debugger is currently waiting to continue you can continue with this. Valid parameters are :co_run (just continue), co_stepinto(when on top of a call, follow it), co_stepover (when on top of a call run till after the call).
+
: Returns the update timer object
  
; [[debug_getXMMPointer]](xmmregnr)
 
: Returns the address of the specified xmm register of the thread that is currently broken.
 
: This is a LOCAL Cheat Engine address. Use Local memory access functions to read and modify xmmregnr can be 0 to 15 (0 to 7 on 32-bit).
 
  
 +
==== setGlobalKeyPollInterval ====
  
 +
; [[setGlobalKeyPollInterval]](integer)
 +
: Sets the global keypoll interval. The interval determines the speed of how often CE checks if a key has been pressed or not.
 +
: Lower is more accurate, but eats more cpu power
  
 +
==== setGlobalDelayBetweenHotkeyActivation ====
  
The following routines describe last branch recording.
+
; [[setGlobalDelayBetweenHotkeyActivation]](integer)
These functions only work when kernelmode debugging is used and using windows XP (vista and later work less
+
: Sets the minimum delay between the activation of the same hotey in milliseconds. Affects all hotkeys that do not set their own minimum delay
effective or not at all because the operating system interferes.
 
Might also be intel specific. A dbvm upgrade in the future might make this work for windows vista and later)
 
  
  
  
; debug_setLastBranchRecording(boolean): When set the Kernel debugger will try to record the last branch(es) taken before a breakpoint happens
 
  
; [[debug_getMaxLastBranchRecord]]()
+
'''undefined property functions'''. Not all properties of all classes have been explicitly exposed to lua, but if you know the name of a property of a specific class you can still access them (assuming they are declared as published in the pascal class declaration)
: Returns the maximum branch record your cpu can store (-1 if none)
 
  
; [[debug_getLastBranchRecord]](index)
 
: Returns the value of the Last Branch Record at the given index (when handling a breakpoint)
 
  
 +
==== getPropertyList ====
  
; function [[debugger_onModuleLoad]](modulename, baseaddress)
+
; [[getPropertyList]](class)
: this routine is called when a module is loaded. Only works for the windows debugger.
+
: Returns a stringlist object containing all the published properties of the specified class: (free the list when done)
: Return 1 if you want to cause the debugger to break.
+
: Note: not all classed with properties have 'published' properties. E.g: stringlist)
  
 +
==== setProperty ====
  
 +
; [[setProperty]](class, propertyname, propertyvalue)
 +
: Sets the value of a published property of a class: (Won't work for method properties)
  
'''Changing registers''':
+
==== getProperty ====
  
When the debugger is waiting to continue you can change the register variables. When you continue those register values will be set in the thread's context.
+
; [[getProperty]](class, propertyname)
 +
: Gets the value of a published property of a class: (Won't work for method properties)
  
 +
==== setMethodProperty ====
  
If the target is currently stopped on a breakpoint, but not done through an onBreakpoint function. The context won't be set.
+
; [[setMethodProperty]](class, propertyname, function)
 +
: Sets the method property to the specific function
  
You can get and set the context back with these functions before execution continues"
+
==== getMethodProperty ====
  
 +
; [[getMethodProperty]](Class, propertyname)
 +
: Returns a function you can use to call the original function
  
  
; [[debug_getContext]](BOOL extraregs)
 
: Fills the global variables for the regular registers.
 
: If extraregs is true, it will also set FP0 to FP7 and XMM0 to XMM15.
 
  
; [[debug_updateGUI]]()
 
: Will refresh the userinterface to reflect the new context if the debugger was broken.
 
  
 +
==== registerSymbol ====
  
; [[detachIfPossible]]()
+
; [[registerSymbol]](symbolname, address, OPTIONAL donotsave)
: Detaches the debugger from the target process (if it was attached).
+
: Registers a userdefined symbol. If donotsave is true this symbol will not get saved when the table is saved
  
 +
==== unregisterSymbol ====
  
; [[getComment]](address)
+
; [[unregisterSymbol]](symbolname)
: Gets the userdefined comment at the specified address.
+
: Unregisters a userdefined symbol.
  
; [[setComment]](address, text)
 
: Sets a userdefined comment at the specifried address. %s is used to display the autoguess value if there is one.
 
  
; [[getHeader]](address)
+
==== getNameFromAddress ====
: Gets the userdefined header at the specified address.
 
  
; [[setHeader]](address)
+
; [[getNameFromAddress]](address)
: Sets the userdefined header at the specified address.
+
: Returns the given address as a string. Registered symbolname, modulename+offset, or just a hexadecimal string depending on what address
  
 +
==== inModule ====
  
; [[registerBinUtil]](config)
+
; [[inModule]](address)
: Registers a binutils toolset with CE (for assembling and disassembling in other cpu instruction sets)
+
: returns true if the given address is inside a module
: config is a table containing several fields that describe the tools, and lets you specify extra parameters
 
* '''Name''': The displayed name in the binutils menu in memview.
 
* '''Description''': The description for this toolset.
 
* '''Architecture''': used by the objdump -m&lt;architecture&gt;  (required).
 
* '''ASParam''': extra parameters to pass on to AS (optional).
 
* '''LDParam''': extra parameters to pass on to LD.
 
* '''OBJDUMPParam''': extra parameters to pass on to OBJDUMP.
 
* '''OnDisassemble''': a lua function that gets called each time an address is disassembled. The return value will be passed on to OBJDUMP.
 
* '''Path''': filepath to the binutils set.
 
* '''Prefix''': prefix  (e.g: "arm-linux-androideabi-").
 
* '''DisassemblerCommentChar''': Depending on which target you're disassembling, the comment character  can be different. (ARM=";"  x86='#' ).
 
  
 +
==== inSystemModule ====
  
 +
; [[inSystemModule]](address)
 +
: returns true if the given address is inside a system module
  
 +
==== getCommonModuleList ====
  
=== class helper functions ===
+
; [[getCommonModuleList]]
 +
: Returns the commonModuleList stringlist. (Do not free this one)
  
  
; [[inheritsFromObject]](object)
 
: Returns true if given any class.
 
  
; [[inheritsFromComponent]](object)
 
: Returns true if the given object inherits from the Component class.
 
  
; [[inheritsFromControl]](object)
+
=== debugging ===
: Returns true if the given object inherits from the Control class.
 
  
; [[inheritsFromWinControl]](object)
 
: Returns true if the given object inherits from the WinControl class.
 
  
  
; [[createClass]](classname)
+
==== debug variables ====
: Creates an object of the specified class: (Assuming it's a registered class and has a default constructor).
 
  
  
 +
; EFLAGS
 +
: '''32-bit''': EAX, EBX, ECX, EDX, EDI, ESP, EBP, ESP, EIP
 +
: '''64-bit''': RAX, EBX, RBX, RDX, RDI, RSP, RBP, RSP, RIP, R8, R9, R10, R11, R12, R13, R14, R15
  
==== Class definitions ====
 
  
  
'''[[Object]]class: (Inheritance: )'''
+
==== Debug related routines ====
  
Properties:
 
  ClassName: String - The name of class: (Read only)
 
Methods:
 
  getClassName(): Returns the classname
 
  destroy(): Destroys the object
 
  
 +
; function [[debugger_onBreakpoint]]()
 +
: When a breaking breakpoint hits (that includes single stepping) and the lua function debugger_onBreakpoint() is defined it will be called and the global variables EAX, EBX, .... will be filled in
 +
: Return 0 if you want the userinterface to be updated and anything else if not (e.g: You continued from the breakpoint in your script)
  
  
'''[[Component]]class: (Inheritance: [[Object]])'''
+
==== createProcess ====
  
Properties:
+
; [[createProcess]](path, parameters OPTIONAL, debug OPTIONAL, breakonentrypoint OPTIONAL)
  ComponentCount: Integer - Number of child components . Readonly
+
: Creates a process. If debug is true it will be created using the windows debugger and if breakonentry is true it will cause a breakpoint to occur on entrypoint.
  Component[int]: Component - Array containing the child components. Starts at 0. Readonly
 
  ComponentByName[string]: Component - Returns a component based on the name. Readonly
 
  Name: string - The name of the component
 
  Tag: integer - Free to use storage space. (Useful for id's)
 
  Owner: Component - Returns the owner of this object. Nil if it has none
 
Methods:
 
  getComponentCount() : Returns the number of components attached to his component
 
  getComponent(index) : Returns the specific component
 
  findComponentByName(name) : Returns the component with this name
 
  getName() : Return the name
 
  setName(newname) : Changes the name
 
  getTag() : Sets an integer value. You can use this for ID's
 
  setTag(tagvalue) : Get the tag value
 
  getOwner() : Returns the owner of this component
 
  
 +
==== debugProcess ====
  
 +
; [[debugProcess]](interface OPTIONAL)
 +
: starts the debugger for the currently opened process (won't ask the user).
 +
* '''interface''':
 +
** 0=default
 +
** 1=windows debug
 +
** 2=VEHDebug
 +
** 3=Kerneldebug
 +
 +
 +
==== debug_isDebugging ====
 +
 +
; [[debug_isDebugging]]()
 +
: Returns true if the debugger has been started
 +
 +
==== debug_getCurrentDebuggerInterface ====
 +
 +
; [[debug_getCurrentDebuggerInterface]]()
 +
: Returns the current debuggerinterface used (1=windows, 2=VEH 3=Kernel, nil=no debugging active)
  
'''[[Control]]class: (Inheritance: [[Component]]--&gt;[[Object]])'''
+
==== debug_canBreak ====
 +
 
 +
; [[debug_canBreak]]()
 +
: Returns true if there is a possibility the target can stop on a breakpoint. 6.4+
 +
 
 +
==== debug_isBroken ====
 +
 
 +
; [[debug_isBroken]]()
 +
: Returns true if the debugger is currently halted on a thread
 +
 
 +
==== debug_getBreakpointList ====
 +
 
 +
; [[debug_getBreakpointList]]()
 +
: Returns a lua table containing all the breakpoint addresses
 +
 
 +
 
 +
==== debug_addThreadToNoBreakList ====
 +
 
 +
; [[debug_addThreadToNoBreakList]](threadid)
 +
: This will cause breakpoints on the provided thread to be ignored
 +
 
 +
==== debug_removeThreadFromNoBreakList ====
 +
 
 +
; [[debug_removeThreadFromNoBreakList]](threadid)
 +
: removed the threadid from the list
  
Properties:
 
  Caption: string - The text of a control
 
  Top : integer - The x position
 
  Left : integer - The y position
 
  Width : integer - The width of the control
 
  Height : integer - The height of the control
 
  ClientWidth: integer - The usable width inside the control (minus the borders)
 
  ClientHeight: integer - The usable height the control (minus the borders)
 
  Align: AlignmentOption - Alignment of the control
 
  Enabled: boolean - Determines if the object is usable or greyed out
 
  Visible: boolean - Determines if the object is visible or not
 
  Color: ColorDefinition/RGBInteger - The color of the object. Does not affect the caption
 
  Parent: WinControl - The owner of this control
 
  PopupMenu: PopupMenu - The popup menu that shows when rightclicking the control
 
  Font: Font - The font class associated with the control
 
  OnClick: function - The function to call when a button is pressed
 
Methods:
 
  getLeft()
 
  setLeft(integer)
 
  getTop()
 
  setTop(integer)
 
  getWidth()
 
  setWidth(integer)
 
  getHeight()
 
  setHeight()
 
  setCaption(caption) : sets the text on a control. All the GUI objects fall in this category
 
  getCaption() : Returns the text of the control
 
  setPosition(x,y): sets the x and y position of the object base don the top left position (relative to the client array of the owner object)
 
  getPosition(): returns the x and y position of the object (relative to the client array of the owner object)
 
  setSize(width,height) : Sets the width and height of the control
 
  getSize() : Gets the size of the control
 
  setAlign(alignmentoption): sets the alignment of the control
 
  getAlign(alignmentoption): gets the alignment of the control
 
  getEnabled() : gets the enabled state of the control
 
  setEnabled(boolean) : Sets the enabled state of the control
 
  getVisible() : gets the visible state of the control
 
  setVisible(boolean) : sets the visible state of the control
 
  getColor() : gets the color
 
  setColor(rgb) : Sets the color
 
  getParent() : Returns nil or an object that inherits from the Wincontrol class
 
  setParent(wincontrol) : Sets the parent for this control
 
  getPopupMenu()
 
  setPopupMenu()
 
  getFont():  Returns the Font object of this object
 
  setFont():  Assigns a new font object. (Not recommended to use. Change the font object that's already there if you wish to change fonts)
 
  repaint(): Invalidates the graphical area of the control and forces and update
 
  update() : Only updates the invalidated areas
 
  setOnClick(functionnameorstring) : Sets the onclick routine
 
  getOnClick(): Gets the onclick function
 
  doClick():  Executes the current function under onClick
 
  
 +
==== debug_setBreakpoint ====
  
 +
; [[debug_setBreakpoint]](address, size OPTIONAL, trigger OPTIONAL, breakpointmethod OPTIONAL, functiontocall() OPTIONAL)
 +
; debug_setBreakpoint(address, size OPTIONAL, trigger OPTIONAL, functiontocall() OPTIONAL)
 +
; debug_setBreakpoint(address, functiontocall() OPTIONAL)
 +
: sets a breakpoint of a specific size at the given address. if trigger is bptExecute then size is ignored. If trigger is ignored then it will be of type bptExecute, which obviously also ignores the size then as well.
  
'''[[GraphicsObject]]class: (Inheritance: [[Object]])'''
+
==== debug_removeBreakpoint ====
  
 +
; [[debug_removeBreakpoint]](address)
 +
: if the given address is a part of a breakpoint it will be removed
  
 +
==== debug_continueFromBreakpoint ====
  
'''[[Region]]class: (Inheritance: [[GraphicsObject]]--&gt;[[Object]])'''
+
; [[debug_continueFromBreakpoint]](continueMethod)
  createRegion(): Created an empty region
+
: if the debugger is currently waiting to continue you can continue with this. Valid parameters are :co_run (just continue), co_stepinto(when on top of a call, follow it), co_stepover (when on top of a call run till after the call).
Methods:
 
  addRectangle(x1, y1, x2, y2): Adds a rectangle to the region
 
  addPolygon(tablewithcoordinates): Adds an array of 2D locations. (example : {{0,0},{100,100}, {0,100}} for a triangle )
 
  
 +
==== debug_getXMMPointer ====
  
 +
; [[debug_getXMMPointer]](xmmregnr)
 +
: Returns the address of the specified xmm register of the thread that is currently broken.
 +
: This is a LOCAL Cheat Engine address. Use Local memory access functions to read and modify xmmregnr can be 0 to 15 (0 to 7 on 32-bit).
  
'''[[WinControl]]class: (Inheritance: [[Control]]--&gt;[[Component]]--&gt;[[Object]])'''
 
  
Properties:
 
  DoubleBuffered: boolean - Graphical updates will go to a offscreen bitmap which will then be shown on the screen instead of directly to the screen.
 
                            May reduce flickering.
 
  ControlCount : integer - The number of child controls of this wincontrol
 
  Control[] : Control - Array to access a child control
 
  OnEnter : function - Function to be called when the WinControl gains focus
 
  OnExit : function - Function to be called when the WinControl loses focus
 
Methods:
 
  getControlCount()  Returns the number of Controls attached to this class
 
  getControl(index) : Returns a WinControl class object
 
  getControlAtPos(x,y):  Gets the control at the given x,y position relative to the wincontrol's position
 
  canFocus(): returns true if the object can be focused
 
  focused(): returns boolean true when focused
 
  setFocus(): tries to set keyboard focus the object
 
  setShape(Region): Sets the region object as the new shape for this wincontrol
 
  setShape(Bitmap):
 
  setOnEnter(function) : Sets an onEnter event. (Triggered on focus enter)
 
  getOnEnter()
 
  setOnExit(function) : Sets an onExit event. (Triggered on lost focus)
 
  getOnExit()
 
  
  
 +
The following routines describe last branch recording.
 +
These functions only work when kernelmode debugging is used and using windows XP (vista and later work less
 +
effective or not at all because the operating system interferes. 
 +
Might also be intel specific. A dbvm upgrade in the future might make this work for windows vista and later)
  
  
'''[[MenuItem]] class(Inheritance: [[Component]]--&gt;[[Object]])'''
+
==== debug_setLastBranchRecording ====
  createMenuItem(ownermenu) : Creates a menu item that gets added to the owner menu
 
Properties:
 
  Caption : String - Text of the menu item
 
  Shortcut : string - Shortcut in textform to trigger the menuitem
 
  Count : integer - Number of children attached to this menuitem
 
  Menu: Menu - The menu this item resides in
 
  Parent: MenuItem - The menuitem this item hangs under
 
  MenuIndex: integer - The position this menu item is in it's parent
 
  Item[] : Array to access each child menuitem
 
  [] : Item[]
 
  OnClick: Function to call when the menu item is activated
 
Methods:
 
  getCaption() : Gets the caption of the menu item
 
  setCaption(caption) : Sets the caption of the menu item
 
  getShortcut(): Returns the shortcut for this menu item
 
  setShortcut(shortcut): Sets the shortcut for this menuitem. A shortcut is a string in the form of ("ctrl+x")
 
  getCount()
 
  getItem(index) : Returns the menuitem object at the given index
 
  add(menuitem) : Adds a menuItem as a submenu item
 
  insert(index, menuitem): Adds a menuItem as a submenu item at the given index
 
  delete(index)
 
  setOnClick(function) : Sets an onClick event
 
  getOnClick()
 
  doClick(): Executes the onClick method if one is assigned
 
  
 +
; [[debug_setLastBranchRecording]](boolean)
 +
: When set the Kernel debugger will try to record the last branch(es) taken before a breakpoint happens
  
 +
==== debug_getMaxLastBranchRecord ====
  
'''[[Menu]] class: (Inheritance: [[Component]]--&gt;[[Object]])'''
+
; [[debug_getMaxLastBranchRecord]]()
 +
: Returns the maximum branch record your cpu can store (-1 if none)
 +
 
 +
==== debug_getLastBranchRecord ====
 +
 
 +
; [[debug_getLastBranchRecord]](index)
 +
: Returns the value of the Last Branch Record at the given index (when handling a breakpoint)
 +
 
 +
 
 +
; function [[debugger_onModuleLoad]](modulename, baseaddress)
 +
: this routine is called when a module is loaded. Only works for the windows debugger.
 +
: Return 1 if you want to cause the debugger to break.
  
Properties:
 
  Items : MenuItem - The base MenuItem class of this menu (readonly)
 
Methods:
 
  getItems() : Returns the main MenuItem of this Menu
 
  
  
 +
'''Changing registers''':
  
'''[[MainMenu]] class: (Inheritance: [[Menu]]--&gt;[[Component]]--&gt;[[Object]])'''
+
When the debugger is waiting to continue you can change the register variables. When you continue those register values will be set in the thread's context.
  createMainMenu(form)
 
<blockquote>
 
The mainmenu is the menu at the top of a window
 
</blockquote>
 
  
  
 +
If the target is currently stopped on a breakpoint, but not done through an onBreakpoint function. The context won't be set.
 +
 +
You can get and set the context back with these functions before execution continues"
  
'''[[PopupMenu]] class: (Inheritance: [[Menu]]--&gt;[[Component]]--&gt;[[Object]])'''
 
createPopupMenu(owner)
 
  The popup menu is the menu that pops up when showing the (rightclick) context of an control
 
  
  
 +
==== debug_getContext ====
  
'''[[Strings]] class: (Inheritance : [[Object]]) (Mostly an abstract class)'''
+
; [[debug_getContext]](BOOL extraregs)
 +
: Fills the global variables for the regular registers.
 +
: If extraregs is true, it will also set FP0 to FP7 and XMM0 to XMM15.
  
Properties:
+
==== debug_updateGUI ====
  Text : String - All the strings in one string
 
  Count: Integer - The number of strings in this list
 
  String[]: String - Array to access one specific string in the list
 
  [] = String[]
 
Methods:
 
  clear() : Deletes all strings in the list
 
  add(string) : adds a string to the list
 
  delete(index) : Deletes a string from the list
 
  getText() : Returns all the strings as one big string
 
  setText() : Sets the strings of the given strings object to the given text (can be multiline)
 
  indexOf(string): Returns the index of the specified string. Returns -1 if not found
 
  insert(index, string): Inserts a string at a specific spot moving the items after it
 
  getCount(): Returns the number is strings in the list
 
  remove(string); Removes the given string from the list
 
  loadFromFile(filename) : Load the strings from a textfile
 
  saveToFile(filename) : Save the strings to a textfile
 
  getString(index) : gets the string at the given index
 
  setString(index, string) : Replaces the string at the given index
 
  
 +
; [[debug_updateGUI]]()
 +
: Will refresh the userinterface to reflect the new context if the debugger was broken.
  
  
'''[[Stringlist]] class: (Inheritance : [[Strings]]--&gt;[[Object]])'''
+
==== detachIfPossible ====
  createStringlist() : Creates a stringlist class object (for whatever reason, lua strings are probably easier to use)
 
Properties:
 
  Duplicates : DuplicatesType - Determines how duplicates should be handled
 
  Sorted : boolean - Determines if the list should be sorted
 
  CaseSensitive: boolean - Determines if the list is case sensitive or not.
 
Methods:
 
  getDuplicates() : returns the duplicates property
 
  setDuplicates(Duplicates) : Sets the duplicates property (dupIgnore, dupAccept, dupError)
 
  getSorted() : returns true if the list has the sorted property
 
  setSorted(boolean) : Sets the sorted property
 
  getCaseSensitive() : Returns true if the case sensitive property is set
 
  setCaseSensitive(boolean): Sets the case sensitive property
 
  
 +
; [[detachIfPossible]]()
 +
: Detaches the debugger from the target process (if it was attached).
  
  
 +
==== getComment ====
  
'''[[Application]] class: (Inheritance: [[CustomApplication]]--&gt;[[Component]]--&gt;[[Object]])'''
+
; [[getComment]](address)
 +
: Gets the userdefined comment at the specified address.
  
Properties:
+
==== setComment ====
  Title: The title of cheat engine in the bar
+
 
Methods:
+
; [[setComment]](address, text)
  bringToFront(): Shows the cheat engine app
+
: Sets a userdefined comment at the specifried address. %s is used to display the autoguess value if there is one.
 +
 
 +
==== getHeader ====
 +
 
 +
; [[getHeader]](address)
 +
: Gets the userdefined header at the specified address.
  
 +
==== setHeader ====
  
 +
; [[setHeader]](address, text)
 +
: Sets the userdefined header at the specified address.
  
'''[[Form]] class: (Inheritance: [[ScrollingWinControl]]--&gt;[[CustomControl]]--&gt;[[WinControl]]--&gt;[[Control]]--&gt;[[Component]]--&gt;[[Object]])'''
+
==== registerBinUtil ====
 +
 
 +
; [[registerBinUtil]](config)
 +
: Registers a binutils toolset with CE (for assembling and disassembling in other cpu instruction sets)
 +
: config is a table containing several fields that describe the tools, and lets you specify extra parameters
 +
* '''Name''': The displayed name in the binutils menu in memview.
 +
* '''Description''': The description for this toolset.
 +
* '''Architecture''': used by the objdump -m&lt;architecture&gt; (required).
 +
* '''ASParam''': extra parameters to pass on to AS (optional).
 +
* '''LDParam''': extra parameters to pass on to LD.
 +
* '''OBJDUMPParam''': extra parameters to pass on to OBJDUMP.
 +
* '''OnDisassemble''': a lua function that gets called each time an address is disassembled. The return value will be passed on to OBJDUMP.
 +
* '''Path''': filepath to the binutils set.
 +
* '''Prefix''': prefix  (e.g: "arm-linux-androideabi-").
 +
* '''DisassemblerCommentChar''': Depending on which target you're disassembling, the comment character  can be different. (ARM=";"  x86='#' ).
  
Properties:
 
  AllowDropFiles: boolean - Allows files to be dragged into the form
 
  ModalResult: integer - The current ModalResult value of the form. Note: When this value gets set the modal form will close
 
  Menu: MainMenu - The main menu of the form
 
  OnClose: function(sender) - The function to call when the form gets closed
 
  OnDropFiles: function(sender, {filenames}) - Called when files are dragged on top of the form. Filenames is an arraytable with the files
 
Methods:
 
  centerScreen(); : Places the form at the center of the screen
 
  hide() : Hide the form
 
  show() : show the form
 
  close():  Closes the form. Without an onClose this will be the same as hide
 
  bringToFront(): Brings the form to the foreground
 
  showModal() : show the form and wait for it to close and get the close result
 
  isForegroundWindow(): returns true if the specified form has focus
 
  setOnClose(function)  : function (sender) : Return a CloseAction to determine how to close the window
 
  getOnClose() : Returns the function
 
  getMenu() : Returns the mainmenu object of this form
 
  setMenu(mainmenu)
 
  setBorderStyle( borderstyle):  Sets the borderstyle of the window
 
  getBorderStyle()
 
  printToRasterImage(rasterimage): Draws the contents of the form to a rasterimage class object
 
  dragNow():  Call this on mousedown on any object if you wish that the mousemove will drag the whole form arround.
 
              Useful for borderless windows (Dragging will stop when the mouse button is released)
 
  
  
  
'''[[CEForm]] class: (Inheritance: [[Form]]--&gt;[[ScrollingWinControl]]--&gt;[[CustomControl]]--&gt;[[WinControl]]--&gt;[[Control]]--&gt;[[Component]]--&gt;[[Object]])'''
 
  createForm(visible OPT): creates a CEForm class object(window) and returns the pointer for it. Visible is default true but can be changed
 
  createFormFromFile(filename): Returns the generated CEform
 
Properties:
 
  DoNotSaveInTable: boolean - Set this if you do not wish to save the forms in the table
 
Methods:
 
  saveToFile(filename): Saves a userdefined form
 
  getDoNotSaveInTable(): Returns the DoNotSaveInTable property
 
  setDoNotSaveInTable(boolean): Sets the DoNotSaveInTable property
 
  
 +
=== class helper functions ===
  
  
'''[[GraphicControl]] class: (Inheritance: [[Control]]--&gt;[[Component]]--&gt;[[Object]])'''
+
==== inheritsFromObject ====
  
Properties:
+
; [[inheritsFromObject]](object)
  Canvas: Canvas - The canvas for rendering this control
+
: Returns true if given any class.
Methods:
+
 
  getCanvas() : Returns the Canvas object for the given object that has inherited from customControl
+
==== inheritsFromComponent ====
 +
 
 +
; [[inheritsFromComponent]](object)
 +
: Returns true if the given object inherits from the Component class.
 +
 
 +
==== inheritsFromControl ====
 +
 
 +
; [[inheritsFromControl]](object)
 +
: Returns true if the given object inherits from the Control class.
 +
 
 +
==== inheritsFromWinControl ====
  
 +
; [[inheritsFromWinControl]](object)
 +
: Returns true if the given object inherits from the WinControl class.
  
  
'''[[PaintBox]] class: (Inheritance: [[GraphicControl]]--&gt;[[Control]]--&gt;[[Component]]--&gt;[[Object]])'''
+
==== createClass ====
  createPaintBox(owner): Creates a Paintbox class object
 
  
 +
; [[createClass]](classname)
 +
: Creates an object of the specified class: (Assuming it's a registered class and has a default constructor).
  
  
'''[[Label]] class: (Inheritance: [[GraphicControl]]--&gt;[[Control]]--&gt;[[Component]]--&gt;[[Object]])'''
 
  createLabel(owner): Creates a Label class object which belongs to the given owner. Owner can be any object inherited from WinControl
 
  
  
 +
=== Class definitions ===
  
'''[[Splitter]] class: (Inheritance: [[CustomControl]]--&gt;[[WinControl]]--&gt;[[Control]]--&gt;[[Component]]--&gt;[[Object]])'''
 
  createSplitter(owner): Creates a Splitter class object which belongs to the given owner. Owner can be any object inherited from WinControl
 
  
 +
==== Object ====
  
 +
'''[[Object]] class: (Inheritance: )'''
  
'''[[Panel]] class: (Inheritance: [[CustomControl]]--&gt;[[WinControl]]--&gt;[[Control]]--&gt;[[Component]]--&gt;[[Object]])'''
 
  createPanel(owner): Creates a Panel class object which belongs to the given owner. Owner can be any object inherited from WinControl
 
 
Properties:
 
Properties:
   Alignment: alignment
+
   ClassName: String - The name of class: (Read only)
  BevelInner: panelBevel
+
Methods:
  BevelOuter: panelBevel
+
   getClassName(): Returns the classname
  BevelWidth: Integer
+
   destroy(): Destroys the object
  FullRepaint: boolean
+
 
Methods:
+
 
   getAlignment() : gets the alignment property
 
   setAlignment(alignment) : sets the alignment property
 
  getBevelInner()
 
  setBevelInner(PanelBevel)
 
  getBevelOuter()
 
  setBevelOuter(PanelBevel)
 
  getBevelWidth()
 
  setBevelWidth(BevelWidth)
 
  getFullRepaint()
 
  setFullRepaint(boolean)
 
  
 +
==== Component ====
  
 +
'''[[Component]] class: (Inheritance: [[Object]])'''
  
'''[[Image]] class: (Inheritance: [[GraphicControl]]--&gt;[[Control]]--&gt;[[Component]]--&gt;[[Object]])'''
 
  createImage(owner): Creates an Image class object which belongs to the given owner. Owner can be any object inherited from WinControl
 
 
Properties:
 
Properties:
   Canvas: Canvas - The canvas object to access the picture of the image
+
   ComponentCount: Integer - Number of child components . Readonly
   Transparent: boolean - Determines if some parts of the picture are see through (usually based on the bottomleft corner)
+
  Component[int]: Component - Array containing the child components. Starts at 0. Readonly
   Stretch: boolean - Determines if the picture gets stretched when rendered in the image component
+
   ComponentByName[string]: Component - Returns a component based on the name. Readonly
   Picture: Picture - The picture to render
+
   Name: string - The name of the component
 +
   Tag: integer - Free to use storage space. (Useful for id's)
 +
  Owner: Component - Returns the owner of this object. Nil if it has none
 
Methods:
 
Methods:
   loadImageFromFile(filename)
+
   getComponentCount() : Returns the number of components attached to his component
   getStretch()
+
   getComponent(index) : Returns the specific component
   setStretch(boolean)
+
   findComponentByName(name) : Returns the component with this name
   getTransparent()
+
   getName() : Return the name
   setTransparent(boolean)
+
   setName(newname) : Changes the name
   getCanvas()
+
   getTag() : Sets an integer value. You can use this for ID's
   setPicture(picture)
+
   setTag(tagvalue) : Get the tag value
   getPicture() : Returns the Picture object of this image
+
   getOwner() : Returns the owner of this component
  
  
  
'''[[Edit]] class: (Inheritance: [[WinControl]]--&gt;[[Control]]--&gt;[[Component]]--&gt;[[Object]])'''
+
==== Control ====
  createEdit(owner): Creates an Edit class object which belongs to the given owner. Owner can be any object inherited from WinControl
 
Properties:
 
  Text: string - The current contents of the editfield
 
  OnChange: function - The function to call when the editfield is changed
 
Methods:
 
  clear()
 
  selectAll()
 
  clearSelection()
 
  copyToClipboard()
 
  cutToClipboard()
 
  pasteFromClipboard()
 
  onChange(function)
 
  
 +
'''[[Control]] class: (Inheritance: [[Component]]--&gt;[[Object]])'''
  
 
'''[[Memo]] class: (Inheritance: [[Edit]]--&gt;[[WinControl]]--&gt;[[Control]]--&gt;[[Component]]--&gt;[[Object]])'''
 
  createMemo(owner): Creates a Memo class object which belongs to the given owner. Owner can be any object inherited from WinControl
 
 
Properties:
 
Properties:
   Lines: Strings - Strings object for this memo
+
   Caption: string - The text of a control
   WordWrap: boolean - Set if words at the end of the control should go to the next line
+
  Top : integer - The x position
   WantTabs: Boolean - Set if tabs will add a tab to the memo. False if tab will go to the next control
+
  Left : integer - The y position
   WantReturns: Boolean - Set if returns will send a event or not
+
   Width : integer - The width of the control
   Scrollbars: Scrollstyle - Set the type of ascrollbars to show (ssNone, ssHorizontal, ssVertical, ssBoth, ssAutoHorizontal, ssAutoVertical, ssAutoBoth)
+
  Height : integer - The height of the control
 +
  ClientWidth: integer - The usable width inside the control (minus the borders)
 +
  ClientHeight: integer - The usable height the control (minus the borders)
 +
   Align: AlignmentOption - Alignment of the control
 +
  Enabled: boolean - Determines if the object is usable or greyed out
 +
   Visible: boolean - Determines if the object is visible or not
 +
   Color: ColorDefinition/RGBInteger - The color of the object. Does not affect the caption
 +
  Parent: WinControl - The owner of this control
 +
  PopupMenu: PopupMenu - The popup menu that shows when rightclicking the control
 +
  Font: Font - The font class associated with the control
 +
  OnClick: function - The function to call when a button is pressed
 
Methods:
 
Methods:
   append(string)
+
   getLeft()
   getLines() : returns a Strings class
+
   setLeft(integer)
   getWordWrap()
+
  getTop()
   setWordWrap(boolean)
+
  setTop(integer)
   getWantTabs()
+
  getWidth()
   setWantTabs(boolean)
+
  setWidth(integer)
   getWantReturns()
+
  getHeight()
   setWantReturns(boolean)
+
  setHeight()
   getScrollbars()
+
  setCaption(caption) : sets the text on a control. All the GUI objects fall in this category
   setScrollbars(scrollbarenumtype) :
+
   getCaption() : Returns the text of the control
   Sets the scrollbars. Horizontal only takes affect when wordwrap is disabled
+
   setPosition(x,y): sets the x and y position of the object base don the top left position (relative to the client array of the owner object)
   valid enum types:
+
   getPosition(): returns the x and y position of the object (relative to the client array of the owner object)
    ssNone : No scrollbars
+
   setSize(width,height) : Sets the width and height of the control
    ssHorizontal: Has a horizontal scrollbar
+
   getSize() : Gets the size of the control
    ssVertical: Has a vertical scrollbar
+
   setAlign(alignmentoption): sets the alignment of the control
    ssBoth: Has both scrollbars
+
   getAlign(alignmentoption): gets the alignment of the control
    ssAutoHorizontal: Same as above but only shows when there actually is something to scroll for
+
   getEnabled() : gets the enabled state of the control
    ssAutoVertical: " " " " ...
+
   setEnabled(boolean) : Sets the enabled state of the control
    ssAutoBoth: " " " " ...
+
   getVisible() : gets the visible state of the control
 
+
  setVisible(boolean) : sets the visible state of the control
 
+
  getColor() : gets the color
 +
  setColor(rgb) : Sets the color
 +
  getParent() : Returns nil or an object that inherits from the Wincontrol class
 +
  setParent(wincontrol) : Sets the parent for this control
 +
  getPopupMenu()
 +
  setPopupMenu()
 +
  getFont():  Returns the Font object of this object
 +
  setFont(): Assigns a new font object. (Not recommended to use. Change the font object that's already there if you wish to change fonts)
 +
  repaint(): Invalidates the graphical area of the control and forces and update
 +
  update() : Only updates the invalidated areas
 +
  setOnClick(functionnameorstring) : Sets the onclick routine
 +
  getOnClick(): Gets the onclick function
 +
  doClick(): Executes the current function under onClick
 +
 
 +
 
 +
 
 +
==== GraphicsObject ====
 +
 
 +
'''[[GraphicsObject]] class: (Inheritance: [[Object]])'''
  
'''[[ButtonControl]] class: (Inheritance: [[WinControl]]--&gt;[[Control]]--&gt;[[Component]]--&gt;[[Object]])'''
 
  
  
 +
==== Region ====
  
'''[[Button]] class: (Inheritance: [[ButtonControl]]--&gt;[[WinControl]]--&gt;[[Control]]--&gt;[[Component]]--&gt;[[Object]])'''
+
'''[[Region]] class: (Inheritance: [[GraphicsObject]]--&gt;[[Object]])'''
   createButton(owner): Creates a Button class object which belongs to the given owner. Owner can be any object inherited from WinControl
+
   createRegion(): Creates an empty region.
Properties:
 
  ModalResult: ModalResult - The result this button will give the modalform when clicked
 
 
Methods:
 
Methods:
   getModalResult(button)
+
   addRectangle(x1, y1, x2, y2): Adds a rectangle to the region
   setModalResult(button, mr)
+
   addPolygon(tablewithcoordinates): Adds an array of 2D locations. (example : {{0,0},{100,100}, {0,100}} for a triangle )
  
 +
==== WinControl ====
  
 +
'''[[WinControl]] class: (Inheritance: [[Control]]--&gt;[[Component]]--&gt;[[Object]])'''
  
'''[[CheckBox]] class: (Inheritance: [[ButtonControl]]--&gt;[[WinControl]]--&gt;[[Control]]--&gt;[[Component]]--&gt;[[Object]])'''
 
  createCheckBox(owner): Creates a CheckBox class object which belongs to the given owner. Owner can be any object inherited from WinControl
 
 
Properties:
 
Properties:
   Checked: boolean - True if checked
+
   DoubleBuffered: boolean - Graphical updates will go to a offscreen bitmap which will then be shown on the screen instead of directly to the screen.
   AllowGrayed: boolean - True if it can have 3 states. True/False/None
+
                            May reduce flickering.
   State: checkboxstate - The state. (cbUnchecked=0, cbChecked=1, cbGrayed=2)
+
  ControlCount : integer - The number of child controls of this wincontrol
   OnChange: function - Function to call when the state it changed
+
   Control[] : Control - Array to access a child control
 +
   OnEnter : function - Function to be called when the WinControl gains focus
 +
   OnExit : function - Function to be called when the WinControl loses focus
 
Methods:
 
Methods:
   getAllowGrayed()
+
   getControlCount() Returns the number of Controls attached to this class
   setAllowGrayed(boolean)
+
   getControl(index) : Returns a WinControl class object
   getState(): Returns a state for the checkbox. (cbUnchecked, cbChecked, cbGrayed)
+
   getControlAtPos(x,y): Gets the control at the given x,y position relative to the wincontrol's position
   setState(boolean): Sets the state of the checkbox
+
  canFocus(): returns true if the object can be focused
   onChange(function)
+
   focused(): returns boolean true when focused
 +
  setFocus(): tries to set keyboard focus the object
 +
  setShape(Region): Sets the region object as the new shape for this wincontrol
 +
  setShape(Bitmap):
 +
   setOnEnter(function) : Sets an onEnter event. (Triggered on focus enter)
 +
  getOnEnter()
 +
  setOnExit(function) : Sets an onExit event. (Triggered on lost focus)
 +
  getOnExit()
  
  
  
'''[[ToggleBox]] class: (Inheritance: [[CheckBox]]--&gt;[[ButtonControl]]--&gt;[[WinControl]]--&gt;[[Control]]--&gt;[[Component]]--&gt;[[Object]])'''
+
 
   createToggleBox(owner): Creates a ToggleBox class object which belongs to the given owner. Owner can be any object inherited from WinControl
+
==== MenuItem ====
 +
 
 +
'''[[MenuItem]] class: (Inheritance: [[Component]]--&gt;[[Object]])'''
 +
  createMenuItem(ownermenu) : Creates a menu item that gets added to the owner menu
 +
Properties:
 +
  Caption : String - Text of the menu item
 +
  Shortcut : string - Shortcut in textform to trigger the menuitem
 +
  Count : integer - Number of children attached to this menuitem
 +
  Menu: Menu - The menu this item resides in
 +
  Parent: MenuItem - The menuitem this item hangs under
 +
  MenuIndex: integer - The position this menu item is in it's parent
 +
  Item[] : Array to access each child menuitem
 +
  [] : Item[]
 +
  OnClick: Function to call when the menu item is activated
 +
Methods:
 +
  getCaption() : Gets the caption of the menu item
 +
  setCaption(caption) : Sets the caption of the menu item
 +
  getShortcut(): Returns the shortcut for this menu item
 +
   setShortcut(shortcut): Sets the shortcut for this menuitem. A shortcut is a string in the form of ("ctrl+x")
 +
  getCount()
 +
  getItem(index) : Returns the menuitem object at the given index
 +
  add(menuitem) : Adds a menuItem as a submenu item
 +
  insert(index, menuitem): Adds a menuItem as a submenu item at the given index
 +
  delete(index)
 +
  setOnClick(function) : Sets an onClick event
 +
  getOnClick()
 +
  doClick(): Executes the onClick method if one is assigned
  
  
  
'''[[GroupBox]] class: (Inheritance: [[WinControl]]--&gt;[[Control]]--&gt;[[Component]]--&gt;[[Object]])'''
+
==== Menu ====
  createGroupBox(owner): Creates a GroupBox class object which belongs to the given owner. Owner can be any object inherited from WinControl
 
 
 
  
 +
'''[[Menu]] class: (Inheritance: [[Component]]--&gt;[[Object]])'''
  
'''[[RadioGroup]] class: (Inheritance: [[GroupBox]]--&gt;[[WinControl]]--&gt;[[Control]]--&gt;[[Component]]--&gt;[[Object]])'''
 
  createRadioGroup(owner): Creates a RadioGroup class object which belongs to the given owner. Owner can be any object inherited from WinControl
 
 
Properties:
 
Properties:
   Items: Strings - Strings derived object containings all the items in the list
+
   Items : MenuItem - The base MenuItem class of this menu (readonly)
  Columns: Integer - The number of columns to split the items into
 
  ItemIndex: Integer - The currently selected item
 
  OnClick: Called when the control is clicked
 
 
Methods:
 
Methods:
  getRows(): Returns the number of rows
+
   getItems() : Returns the main MenuItem of this Menu
   getItems(): Returns a Strings object
+
 
  getColumns(): Returns the nuber of columns
 
  setColumns(integer)
 
  getItemIndex()
 
  setItemIndex(integer)
 
  setOnClick(function)
 
  getOnClick()
 
  
  
'''[[ListBox]] class: (Inheritance: [[WinControl]]--&gt;[[Control]]--&gt;[[Component]]--&gt;[[Object]])'''
+
==== MainMenu ====
  createListBox(owner): Creates a ListBox class object which belongs to the given owner. Owner can be any object inherited from WinControl
 
Properties:
 
  MultiSelect: boolean - When set to true you can select multiple items
 
  Items: Strings - Strings derived object containings all the items in the list
 
  Selected[] - Returns true if the given line is selected. Use Items.Count-1 to find out the max index
 
  ItemIndex: integer - Get selected index. -1 is nothing selected
 
  Canvas: Canvas - The canvas object used to render on the object
 
Methods:
 
  clear()
 
  clearSelection() : Deselects all items in the list
 
  selectAll(): Selects all items in the list
 
  getItems(): Returns a strings object
 
  setItems(Strings): sets a strings object to the listbox
 
  getItemIndex()
 
  setItemIndex(integer)
 
  getCanvas()
 
  
 +
'''[[MainMenu]] class: (Inheritance: [[Menu]]--&gt;[[Component]]--&gt;[[Object]])'''
 +
  createMainMenu(form)
 +
The main menu is the menu at the top of a window.
  
 +
==== PopupMenu ====
 +
 +
'''[[PopupMenu]] class: (Inheritance: [[Menu]]--&gt;[[Component]]--&gt;[[Object]])'''
 +
  createPopupMenu(owner)
 +
The popup menu is the menu that pops up when showing the (rightclick) context of an control
 +
 +
==== Strings ====
 +
 +
'''[[Strings]] class: (Inheritance : [[Object]]) (Mostly an abstract class)'''
  
'''[[Calendar]] class: (Inheritance: [[WinControl]]--&gt;[[Control]]--&gt;[[Component]]--&gt;[[Object]])'''
 
  createCalendar(owner): 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".
 
 
Properties:
 
Properties:
   Date: string - current date of the Calendar, format: yyyy-mm-dd
+
   Text : String - All the strings in one string
   DateTime: number - days since December 30, 1899
+
  Count: Integer - The number of strings in this list
 +
   String[]: String - Array to access one specific string in the list
 +
  [] = String[]
 
Methods:
 
Methods:
   getDateLocalFormat - returns current date of the Calendar, format: ShortDateFormat from OS local settings
+
   clear() : Deletes all strings in the list
 +
  add(string) : adds a string to the list
 +
  delete(index) : Deletes a string from the list
 +
  getText() : Returns all the strings as one big string
 +
  setText() : Sets the strings of the given strings object to the given text (can be multiline)
 +
  indexOf(string): Returns the index of the specified string. Returns -1 if not found
 +
  insert(index, string): Inserts a string at a specific spot moving the items after it
 +
  getCount(): Returns the number is strings in the list
 +
  remove(string); Removes the given string from the list
 +
  loadFromFile(filename) : Load the strings from a textfile
 +
  saveToFile(filename) : Save the strings to a textfile
 +
  getString(index) : gets the string at the given index
 +
  setString(index, string) : Replaces the string at the given index
 +
 
  
  
 +
==== Stringlist ====
  
'''[[ComboBox]] class: (Inheritance: [[WinControl]]--&gt;[[Control]]--&gt;[[Component]]--&gt;[[Object]])'''
+
'''[[Stringlist]] class: (Inheritance : [[Strings]]--&gt;[[Object]])'''
   createComboBox(owner): Creates a ComboBox class object which belongs to the given owner. Owner can be any object inherited from WinControl
+
   createStringlist() : Creates a stringlist class object (for whatever reason, lua strings are probably easier to use)
 
Properties:
 
Properties:
   Items: Strings - Strings derived object containings all the items in the list
+
   Duplicates : DuplicatesType - Determines how duplicates should be handled
   ItemIndex: integer - Get selected index. -1 is nothing selected
+
   Sorted : boolean - Determines if the list should be sorted
   Canvas: Canvas - The canvas object used to render on the object
+
   CaseSensitive: boolean - Determines if the list is case sensitive or not.
 
Methods:
 
Methods:
   clear()
+
   getDuplicates() : returns the duplicates property
   getItems()
+
   setDuplicates(Duplicates) : Sets the duplicates property (dupIgnore, dupAccept, dupError)
   setItems()
+
   getSorted() : returns true if the list has the sorted property
   getItemIndex()
+
   setSorted(boolean) : Sets the sorted property
   setItemIndex(integer)
+
   getCaseSensitive() : Returns true if the case sensitive property is set
   getCanvas()
+
   setCaseSensitive(boolean): Sets the case sensitive property
 +
 
 +
 
 +
 
  
 +
==== Application ====
  
 +
'''[[Application]] class: (Inheritance: [[CustomApplication]]--&gt;[[Component]]--&gt;[[Object]])'''
  
'''[[ProgressBar]] class: (Inheritance: [[WinControl]]--&gt;[[Control]]--&gt;[[Component]]--&gt;[[Object]])'''
 
  createProgressBar(owner): Creates a ProgressBar class object which belongs to the given owner. Owner can be any object inherited from WinControl
 
 
Properties:
 
Properties:
   Min: integer - The minimum positionvalue the progressbar can have (default 0)
+
   Title: The title of cheat engine in the bar
  Max: integer - The maximum positionvalue the progressbar can have (default 100
 
  Position: integer - The position of the progressbar
 
  Step: integer- The stepsize to step by when stepIt() is called
 
 
Methods:
 
Methods:
   stepIt() - Increase position with "Step" size
+
   bringToFront(): Shows the cheat engine app
  stepBy(integer) - increase the position by the given integer value
+
 
  getMax() - returns the Max property
+
 
  setMax(integer) - sets the max property
 
  getMin() - returns the min property
 
  setMin(integer)- sets the min property
 
  getPosition() - returns the current position
 
  setPosition(integer) - sets the current position
 
  
 +
==== Form ====
  
 +
'''[[Form]] class: (Inheritance: [[ScrollingWinControl]]--&gt;[[CustomControl]]--&gt;[[WinControl]]--&gt;[[Control]]--&gt;[[Component]]--&gt;[[Object]])'''
  
'''[[TrackBar]] class: (Inheritance: [[WinControl]]--&gt;[[Control]]--&gt;[[Component]]--&gt;[[Object]])'''
 
  createTrackBar(owner): Creates a TrackBar class object which belongs to the given owner. Owner can be any object inherited from WinControl
 
 
Properties:
 
Properties:
   Min: integer - Minimal value for the trackbar
+
   AllowDropFiles: boolean - Allows files to be dragged into the form
   Max: integer - Maximum value for the trackbar
+
   ModalResult: integer - The current ModalResult value of the form. Note: When this value gets set the modal form will close
   Position: integer - The current position
+
   Menu: MainMenu - The main menu of the form
   OnChange: function - Function to call when
+
   OnClose: function(sender) - The function to call when the form gets closed
 +
  OnDropFiles: function(sender, {filenames}) - Called when files are dragged on top of the form. Filenames is an arraytable with the files
 
Methods:
 
Methods:
   getMax()
+
   centerScreen(); : Places the form at the center of the screen
   setMax(integer)
+
   hide() : Hide the form
   getMin(trackbar)
+
   show() : show the form
   setMin(trackbar, integer)
+
   close():  Closes the form. Without an onClose this will be the same as hide
   getPosition(progressbar)
+
   bringToFront(): Brings the form to the foreground
   setPosition(progressbar, integer)
+
   showModal() : show the form and wait for it to close and get the close result
   getOnChange(function)
+
   isForegroundWindow(): returns true if the specified form has focus
   setOnChange()
+
  setOnClose(function)  : function (sender) : Return a CloseAction to determine how to close the window
 +
  getOnClose() : Returns the function
 +
  getMenu() : Returns the mainmenu object of this form
 +
   setMenu(mainmenu)
 +
  setBorderStyle( borderstyle):  Sets the borderstyle of the window
 +
  getBorderStyle()
 +
  printToRasterImage(rasterimage): Draws the contents of the form to a rasterimage class object
 +
  dragNow():  Call this on mousedown on any object if you wish that the mousemove will drag the whole form arround.
 +
              Useful for borderless windows (Dragging will stop when the mouse button is released)
  
  
  
 +
==== CEForm ====
  
'''[[CollectionItem]] class: (Inheritance: [[Object]])'''
+
'''[[CEForm]] class: (Inheritance: [[Form]]--&gt;[[ScrollingWinControl]]--&gt;[[CustomControl]]--&gt;[[WinControl]]--&gt;[[Control]]--&gt;[[Component]]--&gt;[[Object]])'''
 +
  createForm(visible OPT): creates a CEForm class object(window) and returns the pointer for it. Visible is default true but can be changed
 +
  createFormFromFile(filename): Returns the generated CEform
 +
Properties:
 +
  DoNotSaveInTable: boolean - Set this if you do not wish to save the forms in the table
 +
Methods:
 +
  saveToFile(filename): Saves a userdefined form
 +
  getDoNotSaveInTable(): Returns the DoNotSaveInTable property
 +
  setDoNotSaveInTable(boolean): Sets the DoNotSaveInTable property
 +
 
 +
 
 +
 
 +
==== GraphicControl ====
  
Base class for some higher level classes. Often used for columns
+
'''[[GraphicControl]] class: (Inheritance: [[Control]]--&gt;[[Component]]--&gt;[[Object]])'''
  
 
Properties:
 
Properties:
   ID: integer
+
   Canvas: Canvas - The canvas for rendering this control
  Index: integer - The index in the array this item belong to
+
Methods:
  DisplayName: string
+
   getCanvas() : Returns the Canvas object for the given object that has inherited from customControl
Methods:
 
   getID()
 
  getIndex()
 
  setIndex()
 
  getDisplayName()
 
  setDisplayName()
 
  
  
  
'''[[ListColumn]] class: (Inheritance: [[CollectionItem]]--&gt;[[Object]])'''
+
==== PaintBox ====
  
Properties:
+
'''[[PaintBox]] class: (Inheritance: [[GraphicControl]]--&gt;[[Control]]--&gt;[[Component]]--&gt;[[Object]])'''
  AutoSize: boolean
+
   createPaintBox(owner): Creates a Paintbox class object
  Caption: string
 
  MaxWidth: integer
 
  MinWidth: integer
 
  Width: integer
 
  Visible: boolean
 
Methods:
 
  getAutosize()
 
   setAutosize(boolean)
 
  getCaption()
 
  setCaption(caption)
 
  getMaxWidth()
 
  setMaxWidth(width)
 
  getMinWidth()
 
  setMinWidth(width)
 
  getWidth()
 
  setWidth(width)
 
  
  
  
'''[[Collection]] class: (Inheritance: [[TObject]])'''
+
==== Label ====
  
Properties:
+
'''[[Label]] class: (Inheritance: [[GraphicControl]]--&gt;[[Control]]--&gt;[[Component]]--&gt;[[Object]])'''
  Count: integer
+
   createLabel(owner): Creates a Label class object which belongs to the given owner. Owner can be any object inherited from WinControl
Methods:
 
  clear(collection)
 
   getCount(collection)
 
  delete(collection, index)
 
  
  
  
'''[[ListColumns]] class: (Inheritance: [[Collection]]--&gt;[[Object]])'''
+
==== Splitter ====
  
Properties:
+
'''[[Splitter]] class: (Inheritance: [[CustomControl]]--&gt;[[WinControl]]--&gt;[[Control]]--&gt;[[Component]]--&gt;[[Object]])'''
  Columns[]: Array to access a column
+
   createSplitter(owner): Creates a Splitter class object which belongs to the given owner. Owner can be any object inherited from WinControl
  [] = Columns[]
 
Methods:
 
  add(): Returns a new ListColumn object
 
   getColumn(index): Returns a ListColum object;
 
  setColumn(index, listcolumns): Sets a ListColum object (not recommended, use add instead)
 
  
  
  
'''[[ListItem]] class: (Inheritance: [[TObject]])'''
+
==== Panel ====
  
 +
'''[[Panel]] class: (Inheritance: [[CustomControl]]--&gt;[[WinControl]]--&gt;[[Control]]--&gt;[[Component]]--&gt;[[Object]])'''
 +
  createPanel(owner): Creates a Panel class object which belongs to the given owner. Owner can be any object inherited from WinControl
 
Properties:
 
Properties:
   Caption: boolean - The text of this listitem
+
   Alignment: alignment
   Checked: boolean - Determines if the checkbox is checked (if it has a checkbox)
+
   BevelInner: panelBevel
   SubItems: Strings - The Strings object that hold the subitems
+
   BevelOuter: panelBevel
   Selected: boolean - Returns true if selected
+
   BevelWidth: Integer
   Index: integer - The index in the Items object of the owner of this listitem (readonly)
+
   FullRepaint: boolean
  Owner: ListItems - The ListItems object that owns this ListItem (readonly)
 
 
Methods:
 
Methods:
   delete()
+
   getAlignment() : gets the alignment property
   getCaption() : Returns the first columns string of the listitem
+
   setAlignment(alignment) : sets the alignment property
   setCaption(string) : Sets the first column string of the listitem
+
  getBevelInner()
   getChecked() : Returns true if the listitem is checked
+
  setBevelInner(PanelBevel)
   setChecked(boolean): Sets the checkbox of the listbox to the given state
+
   getBevelOuter()
   getSubItems(): Returns a Strings object
+
   setBevelOuter(PanelBevel)
   makeVisible(partial): Scrolls the listview so this item becomes visible (Cheat Engine 6.4 and later)
+
   getBevelWidth()
 +
   setBevelWidth(BevelWidth)
 +
   getFullRepaint()
 +
  setFullRepaint(boolean)
  
  
  
'''[[ListItems]] class: (Inheritance: [[TObject]])'''
+
==== Image ====
  
 +
'''[[Image]] class: (Inheritance: [[GraphicControl]]--&gt;[[Control]]--&gt;[[Component]]--&gt;[[Object]])'''
 +
  createImage(owner): Creates an Image class object which belongs to the given owner. Owner can be any object inherited from WinControl
 
Properties:
 
Properties:
   Count : Integer - The number of ListItems this object holds (Normally read only, but writable if OwnerData is true in the listview)
+
   Canvas: Canvas - The canvas object to access the picture of the image
   Item[]: ListItem[] - Array to access each ListItem object
+
  Transparent: boolean - Determines if some parts of the picture are see through (usually based on the bottomleft corner)
  [] = Item[]
+
  Stretch: boolean - Determines if the picture gets stretched when rendered in the image component
 +
   Picture: Picture - The picture to render
 
Methods:
 
Methods:
   clear()
+
   loadImageFromFile(filename)
   getCount()
+
   getStretch()
   getItem(integer) : Return the listitem object at the given index
+
   setStretch(boolean)
   add(): Returns a new ListItem object
+
  getTransparent()
 +
  setTransparent(boolean)
 +
  getCanvas()
 +
  setPicture(picture)
 +
   getPicture() : Returns the Picture object of this image
 +
 
  
  
 +
==== Edit ====
  
'''[[Listview]] class: (Inheritance: [[WinControl]]--&gt;[[Control]]--&gt;[[Component]]--&gt;[[Object]])'''
+
'''[[Edit]] class: (Inheritance: [[WinControl]]--&gt;[[Control]]--&gt;[[Component]]--&gt;[[Object]])'''
   createListView(owner): Creates a ListView class object which belongs to the given owner. Owner can be any object inherited from WinControl
+
   createEdit(owner): Creates an Edit class object which belongs to the given owner. Owner can be any object inherited from WinControl
 
Properties:
 
Properties:
   Columns: ListColumns - The Listcolumns object of the listview (Readonly)
+
   Text: string - The current contents of the editfield
   Items: ListItems - The ListItems objects of the listview
+
   OnChange: function - The function to call when the editfield is changed
  ItemIndex: integer - The currently selected index in the Items object  (-1 if nothing is selected)
 
  Selected: ListItem - The currently selected listitem (nil if nothing is selected)
 
  Canvas: Canvas - The canvas object used to render the listview  (Readonly)
 
  AutoWidthLastColumn: Boolean - When set to true the last column will resize when the control resizes
 
  HideSelection: Boolean - When set to true the selection will not hide when the focus leaves the control
 
  RowSelect: Boolean - When set to true the whole row will be selected instead of just the first column
 
  OwnerData: Boolean - When set to true the listview will call the onData function for every line being displayed.
 
                        Use Items.Count to set the number of virtual lines.
 
  OnData: function(sender, ListItem) - Called when a listview with OwnerData true renders a line
 
 
Methods:
 
Methods:
 
   clear()
 
   clear()
   getColumns() : ListColumns - Returns a ListColumns object
+
   selectAll()
   getItems(): ListItems - Returns a ListItems object
+
   clearSelection()
   getItemIndex(): integer -  Returns the currently selected index in the Items object
+
   copyToClipboard()
   setItemIndex(index: integer)- Sets the current itemindex
+
   cutToClipboard()
   getCanvas() : Canvas - Returns the canvas object used to render the listview
+
   pasteFromClipboard()
 +
  onChange(function)
  
  
  
'''[[TreeNode]] class: (Inheritance: [[TObject]])'''
+
==== Memo ====
  
 +
'''[[Memo]] class: (Inheritance: [[Edit]]--&gt;[[WinControl]]--&gt;[[Control]]--&gt;[[Component]]--&gt;[[Object]])'''
 +
  createMemo(owner): Creates a Memo class object which belongs to the given owner. Owner can be any object inherited from WinControl
 
Properties:
 
Properties:
   Text: string - The text of the treenode
+
   Lines: Strings - Strings object for this memo
  Parent: Treenode - The treenode this object is a child of. (can be nil) (ReadOnly)
+
   WordWrap: boolean - Set if words at the end of the control should go to the next line
  Level: Integer - The level this node is at
+
   WantTabs: Boolean - Set if tabs will add a tab to the memo. False if tab will go to the next control
   HasChildren: boolean - Set to true if it has children, or you wish it to have an expand sign
+
   WantReturns: Boolean - Set if returns will send a event or not
  Expanded: boolean - Set to true if it has been expanded
+
   Scrollbars: Scrollstyle - Set the type of ascrollbars to show (ssNone, ssHorizontal, ssVertical, ssBoth, ssAutoHorizontal, ssAutoVertical, ssAutoBoth)
  Count : Integer - The number of children this node has
 
  Items[]: Treenode - Array to access the child nodes of this node
 
  [] = Items[]
 
  Index: Integer - The index based on the parent
 
  AbsoluteIndex: Integer - The index based on the TreeView's Treenodes object (Items)
 
   Selected: Boolean - Set to true if currently selected
 
   MultiSelected: Boolean - Set to true if selected as well, but not the main selected object
 
   Data: Pointer - Space to store 4 or 8 bytes depending on which version of CE is used
 
 
Methods:
 
Methods:
   delete()
+
   append(string)
   deleteChildren()
+
  getLines() : returns a Strings class
   makeVisible()
+
   getWordWrap()
   expand(recursive:boolean=TRUE OPTIONAL) : Expands the given node
+
   setWordWrap(boolean)
   collapse(recursive:boolean=TRUE OPTIONAL) : collapses the given node
+
   getWantTabs()
   getNextSibling(): Returns the treenode object that's behind this treenode on the same level
+
  setWantTabs(boolean)
   add(text:string): Returns a Treenode object that is a child of the treenode used to create it
+
   getWantReturns()
 +
  setWantReturns(boolean)
 +
   getScrollbars()
 +
  setScrollbars(scrollbarenumtype) :
 +
  Sets the scrollbars. Horizontal only takes affect when wordwrap is disabled
 +
   valid enum types:
 +
    ssNone : No scrollbars
 +
    ssHorizontal: Has a horizontal scrollbar
 +
    ssVertical: Has a vertical scrollbar
 +
    ssBoth: Has both scrollbars
 +
    ssAutoHorizontal: Same as above but only shows when there actually is something to scroll for
 +
    ssAutoVertical: " " " " ...
 +
    ssAutoBoth: " " " " ...
 +
 
 +
 
 +
 
 +
==== ButtonControl ====
 +
 
 +
'''[[ButtonControl]] class: (Inheritance: [[WinControl]]--&gt;[[Control]]--&gt;[[Component]]--&gt;[[Object]])'''
  
  
  
'''[[TreeNodes]] class: (Inheritance: [[TObject]])'''
+
==== Button ====
  
 +
'''[[Button]] class: (Inheritance: [[ButtonControl]]--&gt;[[WinControl]]--&gt;[[Control]]--&gt;[[Component]]--&gt;[[Object]])'''
 +
  createButton(owner): Creates a Button class object which belongs to the given owner. Owner can be any object inherited from WinControl
 
Properties:
 
Properties:
   Count : Integer - The total number of Treenodes this object has
+
   ModalResult: ModalResult - The result this button will give the modalform when clicked
  Item[]: TreeNode - Array to access each node
 
  [] = Item[]
 
 
Methods:
 
Methods:
   clear()
+
   getModalResult(button)
   getCount()
+
   setModalResult(button, mr)
  getItem(integer) : Return the TreeNode object at the given index (based on the TreeView's Treenodes)
+
 
  add(text:string): Returns a new root Treenode object
 
  insert(treenode, string): Returns a new treenode object that has been inserted before the given treenode
 
  insertBehind(treenode, string): Returns a new treenode object that has been inserted after the given treenode
 
  
  
 +
==== CheckBox ====
  
'''[[Treeview]] class: (Inheritance: [[CustomControl]]--&gt;[[WinControl]]--&gt;[[Control]]--&gt;[[Component]]--&gt;[[Object]])'''
+
'''[[CheckBox]] class: (Inheritance: [[ButtonControl]]--&gt;[[WinControl]]--&gt;[[Control]]--&gt;[[Component]]--&gt;[[Object]])'''
   createTreeView(owner)
+
   createCheckBox(owner): Creates a CheckBox class object which belongs to the given owner. Owner can be any object inherited from WinControl
 
Properties:
 
Properties:
   Items: TreeNodes - The Treenodes object of the treeview (ReadOnly)
+
   Checked: boolean - True if checked
   Selected: TreeNode - The currently selected treenode
+
  AllowGrayed: boolean - True if it can have 3 states. True/False/None
 +
  State: checkboxstate - The state. (cbUnchecked=0, cbChecked=1, cbGrayed=2)
 +
   OnChange: function - Function to call when the state it changed
 
Methods:
 
Methods:
   getItems()
+
   getAllowGrayed()
   getSelected()
+
   setAllowGrayed(boolean)
   setSelected()
+
   getState(): Returns a state for the checkbox. (cbUnchecked, cbChecked, cbGrayed)
  fullCollapse()  : Collapses all the nodes, including the children's nodes
+
   setState(boolean): Sets the state of the checkbox
   fullExpand() : Expands all the nodes and all their children
+
   onChange(function)
   saveToFile(filename): Saves the contents of the treeview to disk
 
  
  
  
 +
==== ToggleBox ====
  
'''[[Timer]] class: (Inheritance: [[Component]]--&gt;[[object]])'''
+
'''[[ToggleBox]] class: (Inheritance: [[CheckBox]]--&gt;[[ButtonControl]]--&gt;[[WinControl]]--&gt;[[Control]]--&gt;[[Component]]--&gt;[[Object]])'''
   createTimer(owner OPT, enabled OPT): Creates a timer object. If enabled is not given it will be enabled by default (will start as soon as an onTimer event has been assigned)
+
   createToggleBox(owner): Creates a ToggleBox class object which belongs to the given owner. Owner can be any object inherited from WinControl
                                        Owner may be nil, but you will be responsible for destroying it instead of being the responsibility of the owner object)
 
Properties:
 
  Interval: integer - The number of milliseconds (1000=1 second) between executions
 
  Enabled: boolean
 
  OnTimer: function(timer) - The function to call when the timer triggers
 
Methods:
 
  getInterval()
 
  setInterval(interval) : Sets the speed on how often the timer should trigger. In milliseconds (1000=1 second)
 
  getOnTimer()
 
  setOnTimer(function(timer))
 
  getEnabled()
 
  setEnabled(boolean)
 
  
  
  
 +
==== GroupBox ====
  
'''[[CustomControl]] class: ([[CustomControl]]--&gt;[[WinControl]]--&gt;[[Control]]--&gt;[[Component]]--&gt;[[Object]])'''
+
'''[[GroupBox]] class: (Inheritance: [[WinControl]]--&gt;[[Control]]--&gt;[[Component]]--&gt;[[Object]])'''
 +
  createGroupBox(owner): Creates a GroupBox class object which belongs to the given owner. Owner can be any object inherited from WinControl
  
Properties:
 
  Canvas : The canvas object for drawing on the control/. Readonly
 
Methods:
 
  getCanvas() : Returns the Canvas object for the given object that has inherited from customControl
 
  
  
 +
==== RadioGroup ====
  
'''[[Canvas]] class: (Inheritance: [[CustomCanvas]]--&gt;[[Object]])'''
+
'''[[RadioGroup]] class: (Inheritance: [[GroupBox]]--&gt;[[WinControl]]--&gt;[[Control]]--&gt;[[Component]]--&gt;[[Object]])'''
 
+
  createRadioGroup(owner): Creates a RadioGroup class object which belongs to the given owner. Owner can be any object inherited from WinControl
 
Properties:
 
Properties:
   Brush: Brush - The brush object
+
   Items: Strings - Strings derived object containings all the items in the list
   Pen: Pen - The pen object
+
   Columns: Integer - The number of columns to split the items into
   Font: Font - The font object
+
   ItemIndex: Integer - The currently selected item
   Width: integer - Width of the canvas
+
   OnClick: Called when the control is clicked
  Height: integer - Height of the canvas
 
 
Methods:
 
Methods:
   getBrush(): Returns the brush object of this canvas
+
   getRows(): Returns the number of rows
   getPen(): Returns the pen object of this canvas
+
   getItems(): Returns a Strings object
   getFont(): Returns the font object of this canvas
+
   getColumns(): Returns the nuber of columns
   getWidth()
+
   setColumns(integer)
   getHeight()
+
   getItemIndex()
   getPenPosition()
+
   setItemIndex(integer)
   setPenPosition(x,y)
+
   setOnClick(function)
   clear() - Clears the canvas
+
   getOnClick()
  line(sourcex, sourcey, destinationx, destinationy)
+
 
   lineTo(destinationx, destinationy)
+
 
   rect(x1,y1,x2,y2)
+
==== ListBox ====
   fillRect(x1,y1,x2,y2)
+
 
   textOut(x,y, text)
+
'''[[ListBox]] class: (Inheritance: [[WinControl]]--&gt;[[Control]]--&gt;[[Component]]--&gt;[[Object]])'''
   getTextWidth(text)
+
   createListBox(owner): Creates a ListBox class object which belongs to the given owner. Owner can be any object inherited from WinControl
   getTextHeight(text)
+
Properties:
   getPixel(x,y)
+
   MultiSelect: boolean - When set to true you can select multiple items
   setPixel(x,y,color)
+
   Items: Strings - Strings derived object containings all the items in the list
   floodFill(x,y)
+
   Selected[] - Returns true if the given line is selected. Use Items.Count-1 to find out the max index
   ellipse(x1,y1,x2,y2)
+
   ItemIndex: integer - Get selected index. -1 is nothing selected
   gradientFill(x1,y1,x2,y2, startcolor, stopcolor, direction) : Gradient fills a rectangle.
+
   Canvas: Canvas - The canvas object used to render on the object
                                                                Direction can be 0 or 1. 0=Vertical 1=Horizontal
+
Methods:
   copyRect(dest_x1,dest_y1,dest_x2,dest_y2, sourceCanvas, source_x1,source_y1,source_x2,source_y2) : Draws an image from one source to another. Useful in cases of doublebuffering.
+
   clear()
   draw(x,y, graphic) : Draw the image of a specific Graphic class
+
   clearSelection() : Deselects all items in the list
   getClipRect() : Returns a table containing the fields Left, Top, Right and Bottom, which define the invalidated region of the graphical object. Use this to only render what needs to be rendered in the onPaint event of objects.
+
   selectAll(): Selects all items in the list
 +
   getItems(): Returns a strings object
 +
   setItems(Strings): sets a strings object to the listbox
 +
   getItemIndex()
 +
   setItemIndex(integer)
 +
   getCanvas()
  
  
  
'''[[Pen]] class: (Inheritance: [[CustomPen]]--&gt;[[CanvasHelper]]--&gt;[[Object]])'''
+
==== Calendar ====
  
 +
'''[[Calendar]] class: (Inheritance: [[WinControl]]--&gt;[[Control]]--&gt;[[Component]]--&gt;[[Object]])'''
 +
  createCalendar(owner): 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".
 
Properties:
 
Properties:
   Color: Integer - The color of the pen
+
   Date: string - current date of the Calendar, format: yyyy-mm-dd
   Width: integer - Thickness of the pen
+
   DateTime: number - days since December 30, 1899
 
Methods:
 
Methods:
   getColor()
+
   getDateLocalFormat - returns current date of the Calendar, format: ShortDateFormat from OS local settings
  setColor(color)
 
  getWidth()
 
  setWidth(width)
 
  
  
  
'''[[Brush]] class: (Inheritance: [[CustomBrush]]--&gt;[[CanvasHelper]]--&gt;[[Object]])'''
+
==== ComboBox ====
  
 +
'''[[ComboBox]] class: (Inheritance: [[WinControl]]--&gt;[[Control]]--&gt;[[Component]]--&gt;[[Object]])'''
 +
  createComboBox(owner): Creates a ComboBox class object which belongs to the given owner. Owner can be any object inherited from WinControl
 
Properties:
 
Properties:
   Color : Integer
+
   Items: Strings - Strings derived object containings all the items in the list
 +
  ItemIndex: integer - Get selected index. -1 is nothing selected
 +
  Canvas: Canvas - The canvas object used to render on the object
 
Methods:
 
Methods:
   getColor()
+
   clear()
   setColor()
+
   getItems()
 +
  setItems()
 +
  getItemIndex()
 +
  setItemIndex(integer)
 +
  getCanvas()
  
  
  
'''[[Font]] class: (Inheritance: [[CustomFont]]--&gt;[[CanvasHelper]]--&gt;[[Object]])'''
+
==== ProgressBar ====
createFont(): Returns a font object (default initialized based on the main ce window)
 
  
 +
'''[[ProgressBar]] class: (Inheritance: [[WinControl]]--&gt;[[Control]]--&gt;[[Component]]--&gt;[[Object]])'''
 +
  createProgressBar(owner): Creates a ProgressBar class object which belongs to the given owner. Owner can be any object inherited from WinControl
 
Properties:
 
Properties:
   Name: string
+
   Min: integer - The minimum positionvalue the progressbar can have (default 0)
   Size: integer
+
  Max: integer - The maximum positionvalue the progressbar can have (default 100
   Color: integer
+
   Position: integer - The position of the progressbar
 +
   Step: integer- The stepsize to step by when stepIt() is called
 
Methods:
 
Methods:
   getName(): Gets the fontname of the font
+
   stepIt() - Increase position with "Step" size
   setName(string): Sets the fontname of the font
+
   stepBy(integer) - increase the position by the given integer value
   getSize(): Gets the size of the font
+
   getMax() - returns the Max property
   setSize(integer): Sets the size of the font
+
   setMax(integer) - sets the max property
   getColor(): Gets the color of the font
+
   getMin() - returns the min property
   setColor(integer): Sets the color of the font
+
   setMin(integer)- sets the min property
   assign(font): Copies the contents of the font given as parameter to this font
+
  getPosition() - returns the current position
 +
   setPosition(integer) - sets the current position
  
  
  
'''[[Graphic]] class: (Inheritance: [[Object]]) : Abstract class'''
+
==== TrackBar ====
  
 +
'''[[TrackBar]] class: (Inheritance: [[WinControl]]--&gt;[[Control]]--&gt;[[Component]]--&gt;[[Object]])'''
 +
  createTrackBar(owner): Creates a TrackBar class object which belongs to the given owner. Owner can be any object inherited from WinControl
 
Properties:
 
Properties:
   Width: integer
+
   Min: integer - Minimal value for the trackbar
   Height: integer
+
   Max: integer - Maximum value for the trackbar
   Transparent: boolean
+
   Position: integer - The current position
 +
  OnChange: function - Function to call when
 
Methods:
 
Methods:
   getWidth(graphic): Gets the current width in pixels of this graphics object
+
   getMax()
   setWidth(graphic, width): Sets thw width in pixels
+
  setMax(integer)
   getHeight(graphic)
+
  getMin(trackbar)
   setHeight(graphic, height)
+
  setMin(trackbar, integer)
 +
  getPosition(progressbar)
 +
  setPosition(progressbar, integer)
 +
  getOnChange(function)
 +
  setOnChange()
 +
 
 +
 
 +
 
 +
 
 +
==== CollectionItem ====
 +
 
 +
'''[[CollectionItem]] class: (Inheritance: [[Object]])'''
 +
 
 +
Base class for some higher level classes. Often used for columns
 +
 
 +
Properties:
 +
  ID: integer
 +
  Index: integer - The index in the array this item belong to
 +
   DisplayName: string
 +
Methods:
 +
  getID()
 +
  getIndex()
 +
  setIndex()
 +
   getDisplayName()
 +
   setDisplayName()
 +
 
 +
 
 +
 
 +
==== ListColumn ====
  
 +
'''[[ListColumn]] class: (Inheritance: [[CollectionItem]]--&gt;[[Object]])'''
 +
 +
Properties:
 +
  AutoSize: boolean
 +
  Caption: string
 +
  MaxWidth: integer
 +
  MinWidth: integer
 +
  Width: integer
 +
  Visible: boolean
 +
Methods:
 +
  getAutosize()
 +
  setAutosize(boolean)
 +
  getCaption()
 +
  setCaption(caption)
 +
  getMaxWidth()
 +
  setMaxWidth(width)
 +
  getMinWidth()
 +
  setMinWidth(width)
 +
  getWidth()
 +
  setWidth(width)
 +
 +
 +
 +
==== Collection ====
 +
 +
'''[[Collection]] class: (Inheritance: [[TObject]])'''
 +
 +
Properties:
 +
  Count: integer
 +
Methods:
 +
  clear(collection)
 +
  getCount(collection)
 +
  delete(collection, index)
 +
 +
 +
 +
==== ListColumns ====
 +
 +
'''[[ListColumns]] class: (Inheritance: [[Collection]]--&gt;[[Object]])'''
 +
 +
Properties:
 +
  Columns[]: Array to access a column
 +
  [] = Columns[]
 +
Methods:
 +
  add(): Returns a new ListColumn object
 +
  getColumn(index): Returns a ListColumn object;
 +
  setColumn(index, listcolumns): Sets a ListColumn object (not recommended, use add instead)
 +
 +
==== ListItem ====
 +
 +
'''[[ListItem]] class: (Inheritance: [[TObject]])'''
 +
 +
Properties:
 +
  Caption: boolean - The text of this listitem
 +
  Checked: boolean - Determines if the checkbox is checked (if it has a checkbox)
 +
  SubItems: Strings - The Strings object that hold the subitems
 +
  Selected: boolean - Returns true if selected
 +
  Index: integer - The index in the Items object of the owner of this listitem (readonly)
 +
  Owner: ListItems - The ListItems object that owns this ListItem (readonly)
 +
Methods:
 +
  delete()
 +
  getCaption() : Returns the first columns string of the listitem
 +
  setCaption(string) : Sets the first column string of the listitem
 +
  getChecked() : Returns true if the listitem is checked
 +
  setChecked(boolean): Sets the checkbox of the listbox to the given state
 +
  getSubItems(): Returns a Strings object
 +
  makeVisible(partial): Scrolls the listview so this item becomes visible (Cheat Engine 6.4 and later)
 +
 +
 +
 +
==== ListItems ====
 +
 +
'''[[ListItems]] class: (Inheritance: [[TObject]])'''
 +
 +
Properties:
 +
  Count : Integer - The number of ListItems this object holds (Normally read only, but writable if OwnerData is true in the listview)
 +
  Item[]: ListItem[] - Array to access each ListItem object
 +
  [] = Item[]
 +
Methods:
 +
  clear()
 +
  getCount()
 +
  getItem(integer) : Return the listitem object at the given index
 +
  add(): Returns a new ListItem object
 +
 +
 +
 +
==== Listview ====
 +
 +
'''[[Listview]] class: (Inheritance: [[WinControl]]--&gt;[[Control]]--&gt;[[Component]]--&gt;[[Object]])'''
 +
  createListView(owner): Creates a ListView class object which belongs to the given owner. Owner can be any object inherited from WinControl
 +
Properties:
 +
  Columns: ListColumns - The Listcolumns object of the listview (Readonly)
 +
  Items: ListItems - The ListItems objects of the listview
 +
  ItemIndex: integer - The currently selected index in the Items object  (-1 if nothing is selected)
 +
  Selected: ListItem - The currently selected listitem (nil if nothing is selected)
 +
  Canvas: Canvas - The canvas object used to render the listview  (Readonly)
 +
  AutoWidthLastColumn: Boolean - When set to true the last column will resize when the control resizes
 +
  HideSelection: Boolean - When set to true the selection will not hide when the focus leaves the control
 +
  RowSelect: Boolean - When set to true the whole row will be selected instead of just the first column
 +
  OwnerData: Boolean - When set to true the listview will call the onData function for every line being displayed.
 +
                        Use Items.Count to set the number of virtual lines.
 +
  OnData: function(sender, ListItem) - Called when a listview with OwnerData true renders a line
 +
Methods:
 +
  clear()
 +
  getColumns() : ListColumns - Returns a ListColumns object
 +
  getItems(): ListItems - Returns a ListItems object
 +
  getItemIndex(): integer -  Returns the currently selected index in the Items object
 +
  setItemIndex(index: integer)- Sets the current itemindex
 +
  getCanvas() : Canvas - Returns the canvas object used to render the listview
 +
 +
 +
 +
==== TreeNode ====
 +
 +
'''[[TreeNode]] class: (Inheritance: [[TObject]])'''
 +
 +
Properties:
 +
  Text: string - The text of the treenode
 +
  Parent: Treenode - The treenode this object is a child of. (can be nil) (ReadOnly)
 +
  Level: Integer - The level this node is at
 +
  HasChildren: boolean - Set to true if it has children, or you wish it to have an expand sign
 +
  Expanded: boolean - Set to true if it has been expanded
 +
  Count : Integer - The number of children this node has
 +
  Items[]: Treenode - Array to access the child nodes of this node
 +
  [] = Items[]
 +
  Index: Integer - The index based on the parent
 +
  AbsoluteIndex: Integer - The index based on the TreeView's Treenodes object (Items)
 +
  Selected: Boolean - Set to true if currently selected
 +
  MultiSelected: Boolean - Set to true if selected as well, but not the main selected object
 +
  Data: Pointer - Space to store 4 or 8 bytes depending on which version of CE is used
 +
Methods:
 +
  delete()
 +
  deleteChildren()
 +
  makeVisible()
 +
  expand(recursive:boolean=TRUE OPTIONAL) : Expands the given node
 +
  collapse(recursive:boolean=TRUE OPTIONAL)  : collapses the given node
 +
  getNextSibling(): Returns the treenode object that's behind this treenode on the same level
 +
  add(text:string): Returns a Treenode object that is a child of the treenode used to create it
 +
 +
 +
 +
==== TreeNodes ====
 +
 +
'''[[TreeNodes]] class: (Inheritance: [[TObject]])'''
 +
 +
Properties:
 +
  Count : Integer - The total number of Treenodes this object has
 +
  Item[]: TreeNode - Array to access each node
 +
  [] = Item[]
 +
Methods:
 +
  clear()
 +
  getCount()
 +
  getItem(integer) : Return the TreeNode object at the given index (based on the TreeView's Treenodes)
 +
  add(text:string): Returns a new root Treenode object
 +
  insert(treenode, string): Returns a new treenode object that has been inserted before the given treenode
 +
  insertBehind(treenode, string): Returns a new treenode object that has been inserted after the given treenode
 +
 +
 +
 +
==== Treeview ====
 +
 +
'''[[Treeview]] class: (Inheritance: [[CustomControl]]--&gt;[[WinControl]]--&gt;[[Control]]--&gt;[[Component]]--&gt;[[Object]])'''
 +
  createTreeView(owner)
 +
Properties:
 +
  Items: TreeNodes - The Treenodes object of the treeview (ReadOnly)
 +
  Selected: TreeNode - The currently selected treenode
 +
Methods:
 +
  getItems()
 +
  getSelected()
 +
  setSelected()
 +
  fullCollapse()  : Collapses all the nodes, including the children's nodes
 +
  fullExpand() : Expands all the nodes and all their children
 +
  saveToFile(filename): Saves the contents of the treeview to disk
 +
 +
 +
 +
 +
==== Timer ====
 +
 +
'''[[Timer]] class: (Inheritance: [[Component]]--&gt;[[Object]])'''
 +
  createTimer(owner OPT, enabled OPT): Creates a timer object. If enabled is not given it will be enabled by default (will start as soon as an onTimer event has been assigned)
 +
                                        Owner may be nil, but you will be responsible for destroying it instead of being the responsibility of the owner object)
 +
Properties:
 +
  Interval: integer - The number of milliseconds (1000=1 second) between executions
 +
  Enabled: boolean
 +
  OnTimer: function(timer) - The function to call when the timer triggers
 +
Methods:
 +
  getInterval()
 +
  setInterval(interval) : Sets the speed on how often the timer should trigger. In milliseconds (1000=1 second)
 +
  getOnTimer()
 +
  setOnTimer(function(timer))
 +
  getEnabled()
 +
  setEnabled(boolean)
 +
 +
 +
 +
 +
==== CustomControl ====
 +
 +
'''[[CustomControl]] class: ([[CustomControl]]--&gt;[[WinControl]]--&gt;[[Control]]--&gt;[[Component]]--&gt;[[Object]])'''
 +
 +
Properties:
 +
  Canvas : The canvas object for drawing on the control/. Readonly
 +
Methods:
 +
  getCanvas() : Returns the Canvas object for the given object that has inherited from customControl
 +
 +
 +
 +
==== Canvas ====
 +
 +
'''[[Canvas]] class: (Inheritance: [[CustomCanvas]]--&gt;[[Object]])'''
 +
 +
Properties:
 +
  Brush: Brush - The brush object
 +
  Pen: Pen - The pen object
 +
  Font: Font - The font object
 +
  Width: integer - Width of the canvas
 +
  Height: integer - Height of the canvas
 +
Methods:
 +
  getBrush(): Returns the brush object of this canvas
 +
  getPen(): Returns the pen object of this canvas
 +
  getFont(): Returns the font object of this canvas
 +
  getWidth()
 +
  getHeight()
 +
  getPenPosition()
 +
  setPenPosition(x,y)
 +
  clear() - Clears the canvas
 +
  line(sourcex, sourcey, destinationx, destinationy)
 +
  lineTo(destinationx, destinationy)
 +
  rect(x1,y1,x2,y2)
 +
  fillRect(x1,y1,x2,y2)
 +
  textOut(x,y, text)
 +
  getTextWidth(text)
 +
  getTextHeight(text)
 +
  getPixel(x,y)
 +
  setPixel(x,y,color)
 +
  floodFill(x,y)
 +
  ellipse(x1,y1,x2,y2)
 +
  gradientFill(x1,y1,x2,y2, startcolor, stopcolor, direction) : Gradient fills a rectangle.
 +
                                                                Direction can be 0 or 1. 0=Vertical 1=Horizontal
 +
  copyRect(dest_x1,dest_y1,dest_x2,dest_y2, sourceCanvas, source_x1,source_y1,source_x2,source_y2) : Draws an image from one source to another. Useful in cases of doublebuffering.
 +
  draw(x,y, graphic) : Draw the image of a specific Graphic class
 +
  getClipRect() : Returns a table containing the fields Left, Top, Right and Bottom, which define the invalidated region of the graphical object. Use this to only render what needs to be rendered in the onPaint event of objects.
 +
 +
 +
 +
==== Pen ====
 +
 +
'''[[Pen]] class: (Inheritance: [[CustomPen]]--&gt;[[CanvasHelper]]--&gt;[[Object]])'''
 +
 +
Properties:
 +
  Color: Integer - The color of the pen
 +
  Width: integer - Thickness of the pen
 +
Methods:
 +
  getColor()
 +
  setColor(color)
 +
  getWidth()
 +
  setWidth(width)
 +
 +
 +
 +
==== Brush ====
 +
 +
'''[[Brush]] class: (Inheritance: [[CustomBrush]]--&gt;[[CanvasHelper]]--&gt;[[Object]])'''
 +
 +
Properties:
 +
  Color : Integer
 +
Methods:
 +
  getColor()
 +
  setColor()
 +
 +
 +
 +
==== Font ====
 +
 +
'''[[Font]] class: (Inheritance: [[CustomFont]]--&gt;[[CanvasHelper]]--&gt;[[Object]])'''
 +
createFont(): Returns a font object (default initialized based on the main ce window)
 +
 +
Properties:
 +
  Name: string
 +
  Size: integer
 +
  Color: integer
 +
Methods:
 +
  getName(): Gets the fontname of the font
 +
  setName(string): Sets the fontname of the font
 +
  getSize(): Gets the size of the font
 +
  setSize(integer): Sets the size of the font
 +
  getColor(): Gets the color of the font
 +
  setColor(integer): Sets the color of the font
 +
  assign(font): Copies the contents of the font given as parameter to this font
 +
 +
 +
 +
==== Graphic ====
 +
 +
'''[[Graphic]] class: (Inheritance: [[Object]]) : Abstract class'''
 +
 +
Properties:
 +
  Width: integer
 +
  Height: integer
 +
  Transparent: boolean
 +
Methods:
 +
  getWidth(graphic): Gets the current width in pixels of this graphics object
 +
  setWidth(graphic, width): Sets thw width in pixels
 +
  getHeight(graphic)
 +
  setHeight(graphic, height)
 +
 +
 +
 +
==== RasterImage ====
 +
 +
'''[[RasterImage]] class: (Inheritance: [[Graphic]]--&gt;[[Object]]) : Base class for some graphical controls'''
 +
 +
Properties:
 +
  Canvas: Canvas
 +
  PixelFormat: PixelFormat - the pixelformat for this image. Will clear the current image if it had one. Supported pixelformats: pf1bit, pf4bit, pf8bit, pf15bit, pf16bit, pf24bit, pf32bit (recommended)
 +
  TransparentColor: integer
 +
Methods:
 +
  getCanvas(): Returns the Canvas object for this image
 +
  getPixelFormat():  Returns the current pixelformat
 +
  getPixelFormat(pixelformat):  Sets the pixelformat for this image. Will clear the current image if it had one. Supported pixelformats: pf1bit, pf4bit, pf8bit, pf15bit, pf16bit, pf24bit, pf32bit (recommended)
 +
  setTransparentColor(integer): Sets the color that will be rendered as transparent when drawn
 +
  getTransparentColor():  Returns the color set to be transparent
 +
 +
 +
 +
==== Bitmap ====
 +
 +
'''[[Bitmap]] class: (Inheritance: [[CustomBitmap]]--&gt;RasterImage--&gt;[[Graphic]]--&gt;[[Object]]) : Bitmap based Graphic object'''
 +
  createBitmap(width, height) - Returns a Bitmap object
 +
 +
 +
==== PortableNetworkGraphic ====
 +
 +
'''[[PortableNetworkGraphic]] Class: (Inheritence: [[CustomBitmap]]--&gt;RasterImage--&gt;[[Graphic]]--&gt;[[Object]])'''
 +
  createPNG(width, height) - Returns a PortableNetworkGraphic object
 +
 +
 +
==== JpegImage ====
 +
 +
'''[[JpegImage]] Class: (Inheritence: [[CustomBitmap]]--&gt;RasterImage--&gt;[[Graphic]]--&gt;[[Object]])'''
 +
  createJpeg(width, height) - Returns a Jpeg object
 +
 +
 +
 +
==== Picture ====
 +
 +
'''[[Picture]] class: (Inheritance: [[Object]]) : Container for the Graphic class'''
 +
  createPicture() : Returns a empty picture object
 +
Properties:
 +
  Graphic
 +
  PNG
 +
  Bitmap
 +
  Jpeg
 +
Methods:
 +
  loadFromFile(filename)
 +
  saveToFile(filename)
 +
  loadFromStream(stream, originalextension OPTIONAL) : Loads a picture from a stream. Note that the stream position must be set to the start of the picture
 +
  assign(sourcepicture)
 +
  getGraphic() : Gets the Graphic object of this picture
 +
  getPNG(): Returns a PortableNetworkGraphic Class object (Can be used from scratch)
 +
  getBitmap(): Returns a Bitmap Class object (Can be used from scratch)
 +
  getJpeg(): Returns a JpegImage Class object (Picture must be initialized with a jpeg file first)
 +
 +
 +
 +
 +
==== GenericHotkey ====
 +
 +
'''[[GenericHotkey]] class: (Inheritance:  [[Object]])'''
 +
  createHotkey(function, keys, ...) : returns an initialized GenericHotkey class object. Maximum of 5 keys
 +
  createHotkey(function, {keys, ...}) : ^
 +
Properties:
 +
  DelayBetweenActivate: integer - Interval in milliseconds that determines the minimum time between hotkey activations. If 0, the global delay is used
 +
  onHotkey: The function to call when the hotkey is pressed
 +
Methods:
 +
  getKeys()
 +
  setKeys(key, ....)
 +
  setOnHotkey(table)
 +
  getOnHotkey
 +
 +
 +
 +
==== CommonDialog ====
 +
 +
'''[[CommonDialog]] class: (Inheritance:  [[Object]])'''
 +
  Properties:
 +
    OnShow: function(sender)
 +
    OnClose: function(sender)
 +
    Title: string - The caption at top of the dialog
 +
  Methods:
 +
    Execute() : Shows the dialog and return true/false depending on the dialog
 +
 +
 +
 +
==== FindDialog ====
 +
 +
'''[[FindDialog]] class: (Inheritance: [[CommonDialog]]--&gt;[[Component]]--&gt;[[Object]])'''
 +
 +
Properties:
 +
  FindText: String - The text the user wishes to find
 +
  Options: Enum - Find Options
 +
                  { frDown, frFindNext, frHideMatchCase, frHideWholeWord,
 +
                    frHideUpDown, frMatchCase, frDisableMatchCase, frDisableUpDown,
 +
                    frDisableWholeWord, frReplace, frReplaceAll, frWholeWord, frShowHelp,
 +
                    frEntireScope, frHideEntireScope, frPromptOnReplace, frHidePromptOnReplace }
 +
  OnFind: function (sender) - Called when the find button has been clicked
 +
  OnHelp: function (sender) - Called when the help button is visible (see Options) and clicked
 +
Methods:
 +
  -
 +
 +
 +
 +
==== FileDialog ====
 +
 +
'''[[FileDialog]] class: (Inheritance: [[CommonDialog]]--&gt;[[Component]]--&gt;[[Object]])'''
 +
 +
Properties:
 +
  DefaultExt: string - When not using filters this will be the default extention used if no extension is given
 +
  Files: Strings - Stringlist containing all selected files if multiple files are selected
 +
  FileName: string - The filename that was selected
 +
  Filter: string - A filter formatted string
 +
  FilterIndex: integer - The index of which filter to use
 +
  InitialDir: string - Sets the folder the filedialog will show first
 +
Methods:
 +
  -
 +
 +
 +
 +
==== OpenDialog ====
 +
 +
'''[[OpenDialog]] class: (Inheritance: [[FileDialog]]--&gt;[[CommonDialog]]--&gt;[[Component]]--&gt;[[Object]])'''
 +
  createOpenDialog(owner) : Creates an opendialog object
 +
Properties:
 +
  Options: String
 +
    A string formatted as "[param1, param2, param3]" to set OpenDialogs options
 +
    Valid parameters are:
 +
      ofReadOnly,
 +
      ofOverwritePrompt  : if selected file exists shows a message, that file will be overwritten
 +
      ofHideReadOnly    : hide read only file
 +
      ofNoChangeDir      : do not change current directory
 +
      ofShowHelp        : show a help button
 +
      ofNoValidate
 +
      ofAllowMultiSelect : allow multiselection
 +
      ofExtensionDifferent
 +
      ofPathMustExist    : shows an error message if selected path does not exist
 +
      ofFileMustExist    : shows an error message if selected file does not exist
 +
      ofCreatePrompt
 +
      ofShareAware
 +
      ofNoReadOnlyReturn : do not return filenames that are readonly
 +
      ofNoTestFileCreate
 +
      ofNoNetworkButton
 +
      ofNoLongNames
 +
      ofOldStyleDialog
 +
      ofNoDereferenceLinks : do not expand filenames
 +
      ofEnableIncludeNotify
 +
      ofEnableSizing    : dialog can be resized, e.g. via the mouse
 +
      ofDontAddToRecent  : do not add the path to the history list
 +
      ofForceShowHidden  : show hidden files
 +
      ofViewDetail      : details are OS and interface dependent
 +
      ofAutoPreview      : details are OS and interface dependent
 +
Methods:
 +
  -
 +
 +
 +
 +
==== SaveDialog ====
 +
 +
'''[[SaveDialog]] class: (Inheritance: [[OpenDialog]]--&gt;[[FileDialog]]--&gt;[[CommonDialog]]--&gt;[[Component]]--&gt;[[Object]])'''
 +
  createSaveDialog(owner)
 +
 +
 +
 +
==== SelectDirectoryDialog ====
 +
 +
'''[[SelectDirectoryDialog]] class: (Inheritance: [[OpenDialog]]--&gt;[[FileDialog]]--&gt;[[CommonDialog]]--&gt;[[Component]]--&gt;[[Object]])'''
 +
  createSelectDirectoryDialog(owner)
 +
 +
 +
 +
==== Stream ====
 +
 +
'''[[Stream]] class: (Inheritance: [[Object]])'''
 +
 +
Properties:
 +
  Size: integer
 +
  Position: integer
 +
Methods:
 +
  copyFrom(stream, count) - Copies count bytes from the given stream to this stream
 +
  read(count): bytetable - Returns a bytetable containing the bytes of the stream. This increases the position
 +
  write(bytetable, count OPTIONAL)- Writes the given bytetable to the stream
 +
 +
==== MemoryStream ====
 +
 +
'''[[MemoryStream]] class: (Inheritance: [[Stream]]--&gt;[[Object]])'''
 +
  createMemoryStream()
 +
Properties:
 +
  Memory: Integer - The address in Cheat Engine's memory this stream is loaded (READONLY, tends to change)
 +
Methods:
 +
  loadFromFile(filename) : Replaces the contents in the memory stream with the contents of a file on disk
 +
  saveToFile(filename) : Writes the contents of the memory stream to the specified file
 +
 +
 +
 +
==== FileStream ====
 +
 +
'''[[FileStream]] class: (Inheritance: [[HandleStream]]--&gt;[[Stream]]--&gt;[[Object]])'''
 +
createFileStream(filename, mode)
 +
 +
==== StringStream ====
 +
 +
'''[[StringStream]] class: (Inheritance: [[Stream]]--&gt;[[Object]])'''
 +
createStringStream(string)
 +
Properties:
 +
DataString: The internal string
 +
 +
==== TableFile ====
 +
 +
'''[[TableFile]] class: (Inheritance: [[Object]])'''
 +
  findTableFile(filename): Returns the TableFile class object for the saved file
 +
Properties:
 +
  Name: string
 +
  Stream: MemoryStream
 +
Methods:
 +
  saveToFile(filename)
 +
  getData() : Gets a MemoryStream object
 +
 +
 +
 +
 +
==== xmplayer ====
 +
 +
'''[[xmplayer]] class: (Inheritance: [[Object]])'''
 +
  The xmplayer class has already been defined as xmplayer, no need to create it manually
 +
Properties:
 +
  IsPlaying: boolean - Indicator that the xmplayer is currently playing a xm file
 +
  Initialized: boolean - Indicator that the xmplayer is actually actively loaded in memory
 +
Methods:
 +
  setVolume(int)
 +
  playXM(filename, OPTIONAL noloop)
 +
  playXM(tablefile, OPTIONAL noloop)
 +
  playXM(Stream, OPTIONAL noloop)
 +
  pause()
 +
  resume()
 +
  stop()
 +
 +
 +
 +
 +
==== CheatComponent ====
 +
 +
'''[[CheatComponent]] class: (Inheritance: [[WinControl]]--&gt;[[Control]]--&gt;[[Component]]--&gt;[[Object]])'''
 +
  The cheatcomponent class is the component used in Cheat Engine 5.x trainers
 +
  Most people will probably want to design their own components but for those that don't know much coding and use the autogenerated trainer this will be used
 +
Properties:
 +
  Color: Integer - background color
 +
  Textcolor: integer - text color
 +
  Activationcolor: integer - The textcolor to show when activated is true
 +
  Activated: boolean - Toggles between the ActivationColor and the TextColor
 +
  Editleft:integer - The x position of the optional edit field
 +
  Editwidth: integer - the width of the optional edit field
 +
  Editvalue:string - The string of the optional edit field
 +
  Hotkey:string read - The hotkeypart of the cheat line
 +
  Description:string - Description part of the cheat line
 +
  Hotkeyleft: integer - The x position of the hotkey line
 +
  Descriptionleft:integer - The x position of the Description line
 +
  ShowHotkey: boolean - Decides if the hotkey label should be shown
 +
  HasEditBox: boolean - Decides if the editbox should be shown
 +
  HasCheckbox: boolean - Decides if the checkbox should be shown
 +
  Font: Font - The font to use to render the text
 +
Methods:
 +
  -
 +
 +
 +
 +
==== MemoryRecordHotkey ====
 +
 +
'''[[MemoryRecordHotkey]] class: (Inheritance: [[Object]])'''
 +
  The memoryrecord hotkey class is mainly readonly with the exception of the event properties to be used to automatically create trainers
 +
  Use the genreric hotkey class if you wish to create your own hotkeys
 +
Properties:
 +
  Owner: MemoryRecord - The memoryrecord this hotkey belongs to (ReadOnly)
 +
  ID: integer - Unique id of this hotkey (ReadOnly)
 +
  Description: string - The description of this hotkey (ReadOnly)
 +
  HotkeyString: string - The hotkey formatted as a string (ReadOnly)
 +
  OnHotkey: function(sender) - Function to be called when a hotkey has just been pressed
 +
  OnPostHotkey: function(sender) - Function to be called when a hotkey has been pressed and the action has been performed
 +
Methods:
 +
  doHotkey: Executes the hotkey as if it got triggered by the keyboard
 +
 +
 +
 +
==== MemoryRecord ====
 +
 +
'''[[MemoryRecord]] class: (Inheritance: [[Object]])'''
 +
  The memoryrecord objects are the entries you see in the addresslist
 +
Properties:
 +
  ID: Integer - Unique ID
 +
  Index: Integer - The index ID for this record. 0 is top. (ReadOnly)
 +
  Description: string- The description of the memory record
 +
  Address: string - Get/set the interpretable address string. Useful for simple address settings.
 +
  OffsetCount: integer - The number of offsets. Set to 0 for a normal address
 +
  Offset[]: integer - Array to access each offset
 +
  CurrentAddress: integer - The address the memoryrecord points to
 +
  Type: ValueType - The variable type of this record. See vtByte to vtCustom
 +
    If the type is vtString then the following properties are available:
 +
    String.Size: Number of characters in the string
 +
    String.Unicode: boolean
 +
    If the type is vtBinary then the following properties are available
 +
      Binary.Startbit: First bit to start reading from
 +
      Binary.Size: Number of bits
 +
    If the type is vtByteArray then the following properties are available
 +
      Aob.Size: Number of bytes
 +
  CustomTypeName: String - If the type is vtCustomType this will contain the name of the CustomType
 +
  Script: String - If the type is vtAutoAssembler this will contain the auto assembler script
 +
  Value: string - The value in stringform.
 +
  Selected: boolean - Set to true if selected (ReadOnly)
 +
  Active: boolean - Set to true to activate/freeze, false to deactivate/unfreeze
 +
  Color: integer
 +
  ShowAsHex: boolean - Self explanatory
 +
  ShowAsSigned: boolean - Self explanatory
 +
  AllowIncrease: boolean - Allow value increasing, unfreeze will reset it to false
 +
  AllowDecrease: boolean - Allow value decreasing, unfreeze will reset it to false
 +
  Count: Number of children
 +
  Child[index]: Array to access the child records
 +
  [index] = Child[index]
 +
  HotkeyCount: integer - Number of hotkeys attached to this memory record
 +
  Hotkey[]: Array to index the hotkeys
 +
  OnActivate: function(memoryrecord,before,currentstate):boolean - The function to call when the memoryrecord will change (or changed) Active to true.
 +
                If before is true, not returning true will cause the activation to stop.
 +
  OnDeactivate: function(memoryrecord,before,currentstate):boolean - The function to call when the memoryrecord will change (or changed) Active to false.
 +
                  If before is true, not returning true will cause the deactivation to stop.
 +
  OnDestroy: function() - Called when the memoryrecord is destroyed.
 +
  DontSave: boolean - Don't save this memoryrecord and it's children
 +
Methods:
 +
  getDescription()
 +
  setDescription()
 +
  getAddress(): Returns the interpretable addressstring of this record. If it is a pointer, it returns a second result as a table filled with the offsets
 +
  setAddress(string): Sets the interpretable address string, and if offsets are provided make it a pointer
 +
  getOffsetCount(): Returns the number of offsets for this memoryrecord
 +
  setOffsetCount(integer): Lets you set the number of offsets
 +
  getOffset(index): Gets the offset at the given index
 +
  setOffset(index, value): Sets the offset at the given index
 +
  getCurrentAddress(): Returns the current address as an integer (the final result of the interpretable address and pointer offsets)
 +
  appendToEntry(memrec): Appends the current memory record to the given memory record
 +
  getHotkey(index): Returns the hotkey from the hotkey array
 +
  getHotkeyByID(integer): Returns the hotkey with the given id
 +
 +
 +
 +
==== Addresslist ====
 +
 +
'''[[Addresslist]] class: (Inheritance: [[Panel]]--&gt;[[WinControl]]--&gt;[[Control]]--&gt;[[Component]]--&gt;[[Object]])'''
 +
 +
Properties:
 +
  Count: Integer - The number of records in the table
 +
  SelCount: integer- The number of records that are selected
 +
  SelectedRecord: MemoryRecord - The main selected record
 +
  MemoryRecord[]: MemoryRecord - Array to access the individial memory records
 +
  [] = MemoryRecord - Default accessor
 +
Methods:
 +
  getCount()
 +
  getMemoryRecord(index)
 +
  getMemoryRecordByDescription(description): returns a MemoryRecord object
 +
  getMemoryRecordByID(ID)
 +
  createMemoryRecord(): creates an generic cheat table entry and add it to the list
 +
  getSelectedRecords():  Returns a table containing all the selected records
 +
  doDescriptionChange(): Will show the GUI window to change the description of the selected entry
 +
  doAddressChange(): Will show the GUI window to change the address of the selected entry
 +
  doTypeChange(): Will show the GUI window to change the type of the selected entries
 +
  doValueChange(): Will show the GUI window to change the value of the selected entries
 +
  getSelectedRecord(): Gets the main selected memoryrecord
 +
  setSelectedRecord(memrec): Sets the currently selected memoryrecord. This will unselect all other entries
 +
 +
 +
 +
 +
==== MemScan ====
 +
 +
'''[[MemScan]] class: (Inheritance: [[Object]])'''
 +
  getCurrentMemscan(): Returns the current memory scan object. If tabs are used the current tab's memscan object
 +
  createMemScan(progressbar OPTIONAL): Returns a new MemScan class object
 +
Properties:
 +
  OnScanDone: function(memscan) - Set a function to be called when the scan has finished
 +
  FoundList: FoundList - The foundlist currently attached to this memscan object
 +
  OnlyOneResult: boolean - If this is set to true memscan will stop scanning after having found the first result, and written the address to "Result"
 +
  Result: Integer - If OnlyOneResult is used this will contain the address after a scan has finished
 +
Methods:
 +
  firstScan(scanoption, vartype, roundingtype, input1, input2 ,startAddress ,stopAddress ,protectionflags ,alignmenttype, "alignmentparam", isHexadecimalInput, isNotABinaryString, isunicodescan, iscasesensitive);
 +
    Does an initial scan.
 +
    memscan: The MemScan object created with createMemScan
 +
    scanOption: Defines what type of scan is done. Valid values for firstscan are:
 +
      soUnknownValue: Unknown initial value scan
 +
      soExactValue: Exact Value scan
 +
      soValueBetween: Value between scan
 +
      soBiggerThan: Bigger than ... scan
 +
      soSmallerThan: smaller than ... scan
 +
    vartype: Defines the variable type. Valid variable types are:
 +
      vtByte
 +
      vtWord  2 bytes
 +
      vtDword 4 bytes
 +
      vtQword 8 bytes
 +
      vtSingle float
 +
      vtDouble
 +
      vtString
 +
      vtByteArray
 +
      vtGrouped
 +
      vtBinary
 +
      vtAll
 +
    roundingtype: Defined the way scans for exact value floating points are handled
 +
      rtRounded: Normal rounded scans. If exact value = "3" then it includes 3.0 to 3.49999999. If exact value is "3.0" it includes 3.00 to 3.0499999999
 +
      rtTruncated: Truncated algorithm. If exact value = "3" then it includes 3.0 to 3.99999999. If exact value is "3.0" it includes 3.00 to 3.099999999
 +
      rtExtremerounded: Rounded Extreme. If exact value = "3" then it includes 2.0000001 to 3.99999999. If exact value is "3.0" it includes 2.900000001 to 3.099999999
 +
    input1: If required by the scanoption this is a string of the given variable type
 +
    input2: If requires by the scanoption this is the secondary input
 +
    startAddress: The start address to scan from. You want to set this to 0
 +
    stopAddress : The address the scan should stop at. (You want to set this to 0xffffffffffffffff)
 +
    protectionflags: See aobscan about protectionflags
 +
    alignmenttype: Scan alignment type. Valid options are:
 +
      fsmNotAligned: No alignment check
 +
      fsmAligned  : The address must be dividable by the value in alignmentparam
 +
      fsmLastDigits: The last digits of the address must end with the digits provided by alignmentparam
 +
    alignmentparam: String that holds the alignment parameter.
 +
    isHexadecimalInput: When true this will handle the input field as a hexadecimal string else decimal
 +
    isNotABinaryString: When true and the varType is vtBinary this will handle the input field as a decimal instead of a binary string
 +
    isunicodescan: When true and the vartype is vtString this will do a unicode (utf16) string scan else normal utf8 string
 +
    iscasesensitive: When true and the vartype is vtString this check if the case matches
 +
  nextScan(scanoption, roundingtype, input1,input2, isHexadecimalInput, isNotABinaryString, isunicodescan, iscasesensitive, ispercentagescan, savedresultname OPTIONAL);
 +
    Does a next scan based on the current addresslist and values of the previous scan or values of a saved scan
 +
    memscan: The MemScan object that has previously done a first scan
 +
    scanoption:
 +
      soExactValue: Exact Value scan
 +
      soValueBetween: Value between scan
 +
      soBiggerThan: Bigger than ... scan
 +
      soSmallerThan: smaller than ... scan
 +
      soIncreasedValue: Increased value scan
 +
      soIncreasedValueBy: Increased value by scan
 +
      soDecreasedValue: Decreased value scan
 +
      soDecreasedValueBy: Decreased value by scan
 +
      soChanged: Changed value scan
 +
      soUnchanged: Unchanged value scan
 +
    roundingtype: Defined the way scans for exact value floating points are handled
 +
      rtRounded: Normal rounded scans. If exact value = "3" then it includes 3.0 to 3.49999999. If exact value is "3.0" it includes 3.00 to 3.0499999999
 +
      rtTruncated: Truncated algoritm. If exact value = "3" then it includes 3.0 to 3.99999999. If exact value is "3.0" it includes 3.00 to 3.099999999
 +
      rtExtremerounded: Rounded Extreme. If exact value = "3" then it includes 2.0000001 to 3.99999999. If exact value is "3.0" it includes 2.900000001 to 3.099999999
 +
    input1: If required by the scanoption this is a string of the given variable type
 +
    input2: If requires by the scanoption this is the secondary input
 +
    isHexadecimalInput: When true this will handle the input field as a hexadecimal string else decimal
 +
    isNotABinaryString: When true and the varType is vtBinary this will handle the input field as a decimal instead of a binary string
 +
    isunicodescan: When true and the vartype is vtString this will do a unicode (utf16) string scan else normal utf8 string
 +
    iscasesensitive: When true and the vartype is vtString this check if the case matches
 +
    ispercentage: When true and the scanoption is of type soValueBetween, soIncreasedValueBy or soDecreasedValueBy will cause CE to do a precentage scan instead of a normal value scan
 +
    savedResultName: String that holds the name of a saved result list that should be compared against. First scan is called "FIRST"
 +
  newScan(): Clears the current results
 +
  waitTillDone(): Waits for the memscan thread(s) to finish scanning. Always use this
 +
  saveCurrentResults(name): Save the current scanresults to a unique name for this memscan. This save can be used to compare against in a subsequent next scan
 +
  getAttachedFoundlist(): Returns a FoundList object if one is attached to this scanresults. Returns nil otherwise
 +
  setOnlyOneResult(state): If set to true before you start a scan, this will cause the scanner to only return one result. Note that it does not work with a foundlist
 +
  getOnlyResult(): Only works if returnOnlyOneResult is true. Returns nil if not found, else returns the address that was found (integer)
 +
 +
 +
 +
 +
; FoundList
 +
: The foundlist is an object that opens the current memscan's result file and provides an interface for reading out the addresses.
 +
 +
==== createFoundList ====
 +
 +
; [[createFoundList]](memscan)
 +
:
 +
 +
Properties:
 +
  Count: integer
 +
  Address[index]:
 +
  Value[index]:
 +
Methods:
 +
  initialize(): Call this when a memscan has finished scanning. This will open the results for reading
 +
  deinitialize(): Release the results
 +
  getCount()
 +
  getAddress(index): Returns the address as a string
 +
  getValue(index): Returs the value as a string
 +
 +
 +
 +
 +
==== Memoryview ====
 +
 +
'''[[Memoryview]] class: (Inheritance: [[Form]]--&gt;[[ScrollingWinControl]]--&gt;[[CustomControl]]--&gt;[[WinControl]]--&gt;[[Control]]--&gt;[[Component]]--&gt;[[Object]])'''
 +
  createMemoryView() - Creates a new memoryview window. This window will not receive debug events. Use getMemoryViewForm() function to get the main memoryview window
 +
Properties:
 +
  DisassemblerView: The disassemblerview class of this memoryview object
 +
  HexadecimalView: The hexadecimalview class of this memoryview object
 +
Methods:
 +
  -
 +
 +
 +
 +
==== DisassemblerviewLine ====
 +
 +
'''[[DisassemblerviewLine]] class: (Inheritance: [[Object]])'''
 +
 +
Properties:
 +
  Address: The current address of this line
 +
  Owner: The Disassemblerview that owns this line
 +
Methods:
 +
  -
 +
 +
 +
 +
==== Disassemblerview ====
 +
 +
'''[[Disassemblerview]] class: (Inheritance: [[Panel]]--&gt;[[CustomControl]]--&gt;[[WinControl]]--&gt;[[Control]]--&gt;[[Component]]--&gt;[[Object]])'''
 +
  The visual disassembler used on the memory view window
 +
Properties:
 +
  SelectedAddress: integer - The currently selected address in the disassemblerview
 +
  SelectedAddress2: integer - The secondary selected address in the disassemblerview
 +
  TopAddress: Integer - The first address to show
 +
  ShowJumplines: boolean - Determines if the jumplines should be shown
 +
  OnSelectionChange: function(sender, address, address2) - Function to call when the selection has changed
 +
  OnExtraLineRender: function(sender, Address, AboveInstruction, Selected): RasterImage OPTIONAL, x OPTIONAL, y OPTIONAL
 +
    Function to call when you wish to provide the disassembler view with an extra image containing data you wish to show.
 +
    This function is called once to get an image to show above the instruction, and once to get an image to show under the instruction and optional comments.
 +
    The image for both calls must be different objects as rendering will only be done when both calls have been completed
 +
    Sender is a DisassemblerviewLine object.
 +
    If no coordinates are given the image will be centered above/below the instruction.
 +
Methods:
 +
  -
 +
 +
 +
 +
==== Hexadecimal ====
 +
 +
'''[[Hexadecimal]] class: (Inheritance: [[Panel]]--&gt;[[CustomControl]]--&gt;[[WinControl]]--&gt;[[Control]]--&gt;[[Component]]--&gt;[[Object]])'''
 +
  The visual hexadecimal object used on the memory view window
 +
Properties:
 +
  OnAddressChange(hexadecimalview, function): function(hexadecimalview, address)
 +
  OnByteSelect(hexadecimalview, function): function(hexadecimalview, address, address2)
 +
Methods:
 +
  -
 +
 +
 +
 +
 +
==== Thread ====
 +
 +
'''[[Thread]] class: (Inheritance: [[Object]])'''
 +
  createNativeThread(function(Thread,...), ...):
 +
    Executes the given function in another thread using the systems thread mechanism
 +
    The function returns the Thread class object
 +
    function declaration: function (Thread, ...)
 +
Properties:
 +
  name: string - This name will be shown when the thread terminated abnormally
 +
Methods:
 +
  freeOnTerminate(state):
 +
    When set to true the thread object will free itself when the function ends (default=true)
 +
    Note: Use this only from inside the thread function as the thread might have already terminated and freed itself when called
 +
  synchronize(function(thread, ...), ...):
 +
    Called from inside the thread. This wil cause the tread to get the main thread to execute the given function and wait for it to finish.
 +
    Usually for GUI access
 +
    Returns the return value of the given function
 +
  waitfor():
 +
    Waits for the given thread to finish (Not recommended to call this from inside the thread itself)
 +
 +
 +
 +
 +
==== StructureFrm ====
 +
 +
'''[[StructureFrm]] class: (Inheritance: [[Object]])'''
 +
  createStructureForm(address)
 +
Properties:
 +
  Column[index]: structColumn - Fetches a structColumn object from the structure form
 +
  Group[index]: structGroup - Fetches a structGroup object from the structure form
 +
  Methods:
 +
  structChange(): Forces a refresh
 +
  addColumn(): Adds a new column in the currently focuses group and returns it's structColumn object
 +
  addGroup(): Adds a new group and returns the structGroup object
 +
 +
 +
 +
==== structColumn ====
 +
 +
'''[[structColumn]] class: (Inheritance: [[Object]])'''
 +
 +
Properties:
 +
  Address: integer - The current address
 +
  AddressText: string - Gets/sets the visual address
 +
  Focused: boolean - Gets/sets the focused state
 +
Methods:
 +
  focus(): focuses the current column
 +
 +
 +
 +
==== structGroup ====
 +
 +
'''[[structGroup]] class: (Inheritance: [[Object]])'''
 +
Properties:
 +
  name: string - gets the current name
 +
  box: Groupbox - Gets the groupbox object
 +
  columnCount: integer- Gets the number of columns in the group
 +
  columns[index]: structColumn - Returns the specific structColumn object
 +
Methods:
 +
  addColumns(): Adds a new columns to the specific group and returns it's structColumn objecy
 +
 +
 +
 +
 +
==== structure ====
 +
 +
'''[[structure]] class: (Inheritance: [[Object]])'''
 +
  getStructureCount(): Returns the number of Global structures. (Global structures are the visible structures)
 +
  getStructure(index): Returns the Structure object at the given index
 +
  createStructure(name): Returns an empty structure object (Not yet added to the Global list. Call structure.addToGlobalStructureList manually)
 +
Properties:
 +
  Name: String - The name of the structure
 +
  Size: Integer - The number of bytes between the last element and the start. ReadOnly
 +
  Count: Integer - Number of elements in the structure. ReadOnly
 +
  Element[]: structureElement - Returns the structure element at the given index. Readonly
 +
Methods:
 +
  getName(): Returns the name
 +
  setName(name): Sets the name
 +
  getElement(index): Returns a structureElement object (Changing offsets can change the index)
 +
  getElementByOffset(offset): Returns a structureElement object where the specified offset is at least the requested offset
 +
  addElement(): Adds a new blank structureElement and returns it
 +
  autoGuess(baseaddresstoguessfrom, offset, size)
 +
  fillFromDotNetAddress(address, changeName): Fills the structure with the layout gathered from querying .NET.  If changeName is true, the structure will take the name of the .NET class.  (6.4+)
 +
  beginUpdate(): Call this when you want to make multiple updates to a structure. It will speed up the update process
 +
  endUpdate(): Call this when done
 +
  addToGlobalStructureList(): Add this to the list of structures for the user to select from. (Global structures will get saved to the table)
 +
  removeFromGlobalStructureList(): Remove from the list of structures.
 +
 +
 +
 +
==== StructureElement ====
 +
 +
'''[[StructureElement]] class: (Inheritance: [[Object]])'''
 +
 +
Properties:
 +
  Owner: structure - The structure this element belongs to. Readonly
 +
  Offset: integer - The offset of this element
 +
  Name: string - The name of this element
 +
  Vartype: integer - The variable type of this element
 +
  ChildStruct: structure - If not nil this element is a pointer to the structure defined here
 +
  ChildStructStart: integer - The number of bytes inside the provided childstruct. (E.g: It might point to offset 10 of a certain structure)
 +
  Bytesize: integer - The number of bytes of this element. Readonly for basic types, writable for types that require a defined length like strings and array of bytes
 +
Methods:
 +
  getOwnerStructure(): Returns the structure this element belongs to
 +
  getOffset(): Returns the offset of this element
 +
  setOffset(offset): Sets the offset of this element
 +
  getName(): Returns the name of this element
 +
  setName(name): Sets the name of this element (tip: Leave blank if you only want to set the name of the variable)
 +
  getVartype(): Returns the variable type of this element (check Variable types in defines.lua)
 +
  setVartype(vartype)
 +
  getChildStruct()
 +
  setChildStruct(structure)
 +
  getChildStructStart()
 +
  setChildStructStart(offset)
 +
  getBytesize(): Gets the bytesize of the element. Usually returns the size of the type, except for string and aob
 +
  setBytesize(size): sets the bytesize for types that are affected (string, aob)
 +
 +
 +
 +
 +
 +
==== supportCheatEngine ====
 +
 +
; [[supportCheatEngine]](attachwindow, hasclosebutton, width, height, position ,yoururl OPTIONAL, extraparameters OPTIONAL, percentageshown OPTIONAL)
 +
: Will show an advertising window which will help keep the development of Cheat Engine going.
 +
: If you provide your own url it will be shown Up to 75% of the time.
 +
:* '''attachwindow''': form : The form that the ad is attached to
 +
:* '''hasclosebutton''': boolean : If true the window will have a border an a close button at top
 +
:** '''width, height''': integer : The client width and height of the window.
 +
:*** '''Prefered formats''': 120x600, 160x600, 300x250, 468x60, 728x90, But you are free to use different formats.
 +
:* '''Position''': integer/enum: The place of the window
 +
:** 0=Top
 +
:** 1=Right
 +
:** 2=Bottom
 +
:** 3=left
 +
:* '''Yoururl''': string: The url you want to show. When given instead of showing CE's ads 100% it will show your url up to 75%.
 +
:::You can use it for your own income, or for updating users about new versions of your trainer or whatever you feel like
 +
:* '''Extraparameters''': string:  are url request parameters you can add to the default parameters (e.g trainername=mytrainer for tracking purposes).
 +
:* '''PercentageShown''': You can change the default of 75% to a smaller value like 50%.
 +
 +
 +
==== fuckCheatEngine ====
 +
 +
; [[fuckCheatEngine]]()
 +
: Removes the ad window if it was showing
 +
 +
 +
 +
 +
===== Following are some more internal functions for Cheat Engine =====
 +
 +
 +
==== dbk_initialize ====
 +
 +
; [[dbk_initialize]]()
 +
: Returns true if the dbk driver is loaded in memory. False if it failed for whatever reason (e.g 64-bit and not booted with unsigned driver support)
 +
 +
==== dbk_useKernelmodeOpenProcess ====
 +
 +
; [[dbk_useKernelmodeOpenProcess]]()
 +
: Switches the internal pointer of the OpenProcess api to dbk_OpenProcess
 +
 +
==== dbk_useKernelmodeProcessMemoryAccess ====
 +
 +
; [[dbk_useKernelmodeProcessMemoryAccess]]()
 +
: Switches the internal pointer to the ReadProcessMemory and WriteProcessMemory apis to dbk_ReadProcessMemory and
 +
 +
==== dbk_WriteProcessMemory ====
 +
 +
; [[dbk_WriteProcessMemory]]
 +
: -
 +
 +
==== dbk_useKernelmodeQueryMemoryRegions ====
 +
 +
; [[dbk_useKernelmodeQueryMemoryRegions]]()
 +
: Switches the internal pointer to the QueryVirtualMemory api to dbk_QueryVirtualMemory
 +
 +
==== dbk_getPEProcess ====
 +
 +
; [[dbk_getPEProcess]](processid)
 +
: Returns the pointer of the EProcess structure of the selected processid
 +
 +
==== dbk_getPEThread ====
 +
 +
; [[dbk_getPEThread]](threadid)
 +
: Gets the pointer to the EThread  structure
 +
 +
 +
==== dbk_readMSR ====
 +
 +
; [[dbk_readMSR]](msr)
 +
: Reads the msr
 +
 +
==== dbk_writeMSR ====
 +
 +
; [[dbk_writeMSR]](msr, msrvalue)
 +
: Writes the msr
 +
 +
==== dbk_executeKernelMemory ====
 +
 +
; [[dbk_executeKernelMemory]](address, parameter)
 +
: Executes a routine from kernelmode (e.g a routine written there with auto assembler) parameter can be a value or an address. It's up to your code how it's handled
 +
 +
 +
 +
==== dbvm_initialize ====
 +
 +
; [[dbvm_initialize]](offloados OPTIONAL)
 +
: Initializes the dbvm functions (dbk_initialize also calls this) offloados is a boolean that when set will offload the system onto dbvm if it's not yet running (and only IF the dbk driver is loaded)
 +
 +
==== dbvm_readMSR ====
 +
 +
; [[dbvm_readMSR]](msr)
 +
: See dbk_readMSR
 +
 +
==== dbvm_writeMSR ====
 +
 +
; [[dbvm_writeMSR]](msr, value)
 +
: See dbk_writeMSR
 +
 +
 +
 +
==== dbk_getCR0 ====
 +
 +
; [[dbk_getCR0]]()
 +
: Returns Control Register 0
 +
 +
==== dbk_getCR3 ====
 +
 +
; [[dbk_getCR3]]()
 +
: Returns Control Register 3 of the currently opened process
 +
 +
==== dbk_getCR4 ====
 +
 +
; [[dbk_getCR4]]()
 +
: Returns Control Register 4
 +
 +
==== dbk_getPhysicalAddress ====
 +
 +
; [[dbk_getPhysicalAddress]](address)
 +
: Returns the physical address of the given address
 +
 +
==== dbk_writesIgnoreWriteProtection ====
 +
 +
; [[dbk_writesIgnoreWriteProtection]](state)
 +
: Set to true if you do not wish to initiate copy-on-write behaviour
 +
 +
 +
==== dbvm_getCR4 ====
 +
 +
; [[dbvm_getCR4]]()
 +
: Returns the real Control Register 4 state
 +
 +
 +
 +
==== onAPIPointerChange ====
 +
 +
; [[onAPIPointerChange]](function)
 +
: Registers a callback when an api pointer is changed (can happen when the user clicks ok in settings, or when dbk_use*** is used. Does
 +
NOT happen when setAPIPointer is called)
 +
 +
 +
 +
==== setAPIPointer ====
 +
 +
; [[setAPIPointer]](functionid, address)
 +
: Sets the pointer of the given api to the given address. The address can be a predefined address set at initialization by Cheat Engine, or an address you got from an autoassembler script or injected dll (When Cheat Engine itself was targeted)
 +
  functionid:
 +
    0: OpenProcess
 +
      Known compatible address defines:
 +
        windows_OpenProcess
 +
        dbk_OpenProcess
 +
    1: ReadProcessMemory
 +
      Known compatible address defines:
 +
        windows_ReadProcessMemory
 +
        dbk_ReadProcessMemory
 +
        dbk_ReadPhysicalMemory
 +
        dbvm_ReadPhysicalMemory
 +
    2: WriteProcessMemory
 +
      Known compatible address defines:
 +
        windows_WriteProcessMemory
 +
        dbk_WriteProcessMemory
 +
        dbk_WritePhysicalMemory
 +
        dbvm_WritePhysicalMemory
 +
    3: VirtualQueryEx
 +
      Known compatible address defines:
 +
        windows_VirtualQueryEx
 +
        dbk_VirtualQueryEx
 +
        VirtualQueryExPhysical
 +
 +
 +
 +
'''Extra variables defined''':
 +
 +
==== dbk_NtOpenProcess ====
 +
 +
; [[dbk_NtOpenProcess]]
 +
: Address of the NtOpenProcess implementation in DBK32
 +
 +
 +
'''The dbvm_ addresses should only be used with auto assembler scripts injected into Cheat Engine'''
 +
 +
==== dbvm_block_interrupts ====
 +
 +
; [[dbvm_block_interrupts]]
 +
: Address of function dbvm_block_interrupts: DWORD; stdcall;
 +
 +
==== dbvm_raise_privilege ====
 +
 +
; [[dbvm_raise_privilege]]
 +
: Address of function dbvm_raise_privilege: DWORD; stdcall;
 +
 +
==== dbvm_restore_interrupts ====
 +
 +
; [[dbvm_restore_interrupts]]
 +
: Address of function dbvm_restore_interrupts: DWORD; stdcall;
 +
 +
==== dbvm_changeselectors ====
 +
 +
; [[dbvm_changeselectors]]
 +
: Address of function dbvm_changeselectors(cs,ss,ds,es,fs,gs: dword): DWORD; stdcall;
 +
 +
 +
 +
 +
 +
==== D3DHOOK ====
 +
 +
'''[[D3DHOOK]] class: (Inheritance: [[Object]])'''
 +
 +
The d3dhook functions provide a method to render graphics and text inside the game, as long as it is running in directx9, 10 or 11
 +
  createD3DHook(textureandcommandlistsize OPTIONAL, hookmessages OPTIONAL): Hooks direct3d and allocates a buffer with given size for storage of for the rendercommand list
 +
    hookmessages defines if you want to hook the windows message handler for the direct3d window. The d3dhook_onClick function makes use of that
 +
    If no size is provided 16MB is used and hookmessages is true
 +
    Note: You can call this only once for a process
 +
    It returns a d3dhook object
 +
Properties:
 +
  Width: Integer: The width of the screen (readonly)
 +
  Height: integer: The height of the screen (readonly)
 +
  DisabledZBuffer: boolean: Set this to true if you don't want previously rendered walls to overlap a newly rendered object (e.g map is rendered first, then the players are rendered)
 +
  WireframeMode: boolean: Set this to true if you don't want the faces of 3d objects to be filled
 +
  MouseClip: boolean: Set this if to true if you have one of those games where your mouse can go outside of the gamewindow and you don't want that.
 +
  OnClick: function(d3dhook_sprite, x, y)
 +
    A function to be called when clicked on an sprite (excluding the mouse)
 +
    x and y are coordinates in the sprite object. If sprites overlap the highest zorder sprite will be given. It does NOT care if a transparent part is clicked or not
 +
    Note: If you set this it can cause a slowdown in the game if there are a lot of sprites and you press the left button a lot
 +
  OnKeyDown: function(virtualkey, char)
 +
    function(vkey, char): boolean
 +
      A function to be called when a key is pressed in the game window (Not compatible with DirectInput8)
 +
      Return false if you do not wish this key event to pass down to the game
 +
Methods:
 +
  beginUpdate(): Use this function when you intent to update multiple sprites,textcontainers or textures. Otherwise artifacts may occur (sprite 1 might be drawn at the new location while sprite 2 might still be at the old location when a frame is rendered)
 +
  endUpdate(): When done updating, call this function to apply the changes
 +
  enableConsole(virtualkey): Adds a (lua)console to the specific game. The given key will bring it up (0xc0=tilde)
 +
  createTexture(filename): Returns a d3dhook_texture object
 +
  createTexture(picture, transparentColor OPTIONAL): Returns a d3dhook_texture object
 +
    if the picture is not a transparent image the transparentcolor parameter can be used to make one of it's colors transparent
 +
  createFontmap(font): Returns a d3dhook_fontmap object created from the given font
 +
  createSprite(d3dhook_texture): returns a d3dhook_sprite object that uses the given texture for rendering
 +
  createTextContainer(d3dhook_fontmap, x, y, text): Returns a d3dhook_textContainer object
 +
 +
 +
 +
==== D3DHook_Texture ====
 +
 +
'''[[D3DHook_Texture]] class: (Inheritance: [[Object]])'''
 +
 +
This class controls the texture in memory. Without a sprite to use it, it won't show
 +
 +
Properties:
 +
  Height: integer (ReadOnly)
 +
  Width: integer (ReadOnly)
 +
Methods:
 +
  loadTextureByPicture(picture)
 +
 +
 +
 +
==== D3DHook_FontMap ====
 +
 +
'''[[D3DHook_FontMap]] class: (Inheritance: [[D3DHook_Texture]]--&gt;[[Object]])'''
 +
 +
A fontmap is a texture that contains extra data regarding the characters. This class is used by the textcontainer
 +
Current implementation only supports 96 characters (character 32 to 127)
 +
 +
Properties:
 +
  -
 +
Methods:
 +
  changeFont(font): Changes the fontmap to the selected font
 +
  getTextWidth(string): Returns the width of the given string in pixels
 +
 +
 +
==== D3DHook_RenderObject ====
 +
 +
'''[[D3DHook_RenderObject]] class: (Inheritance: [[Object]])'''
 +
The renderobject is the abstract class used to control in what manner objects are rendered.
 +
The sprite and TextContainer classed inherit from this
 +
 +
Properties:
 +
  X: Float - The x-coordinate of the object on the screen
 +
  Y: Float - The y-coordinate of the object on the screen
 +
  CenterX: Float - X coordinate inside the object. It defines the rotation spot and affects the X position
 +
  CenterY: Float - Y " "
 +
  Rotation: Float - Rotation value in degrees (0 and 360 are the same)
 +
  Alphablend: Float - Alphablend value. 1.0 is fully visible, 0.0=invisible
 +
  Visible: boolean - Set to false to hide the object
 +
  ZOrder: integer - Determines if the object will be shown in front or behind another object
 +
Methods:
 +
  -
 +
 +
 +
 +
==== D3DHook_Sprite ====
 +
 +
'''[[D3DHook_Sprite]] class: (Inheritance: [[D3DHook_RenderObject]]--&gt;[[Object]])'''
 +
A d3dhook_sprite class is a visible texture on the screen.
 +
 +
 +
Properties:
 +
  Width: Integer - The width of the sprite in pixels. Default is the initial texture width
 +
  Height: Integer - The height of the sprite in pixels. Default is the initial texture height
 +
  Texture: d3dhook_texture - The texture to show on the screen
 +
Methods:
 +
  -
 +
 +
 +
==== D3Dhook_TextContainer ====
 +
 +
'''[[D3Dhook_TextContainer]] class: (Inheritance: [[D3DHook_RenderObject]]--&gt;[[Object]])'''
 +
A d3dhook_sprite class draws a piece of text on the screen based on the used fontmap.
 +
While you could use a texture with the text, updating a texture in memory is slow. So if you wish to do a lot of text updates, use a textcontainer
 +
 +
Properties:
 +
  FontMap: The D3DHook_FontMap object to use for rendering text
 +
  Text: The text to render
 +
Methods:
 +
  -
 +
 +
 +
 +
 +
 +
==== Disassembler ====
 +
 +
'''[[Disassembler]] class: (Inheritance: [[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
 +
  getVisibleDisassembler() - Returns the disassembler used by the disassemblerview. Special codes are: {H}=Hex value {R}=Register {S}=Symbol {N}=Nothing special
 +
  registerGlobalDisassembleOverride(function(sender: Disassembler, address: integer, LastDisassembleData: Table): opcode, description): Same as
 +
  Disassembler.OnDisassembleOverride, but does it for all disassemblers, including newly created ones.  Tip: Check the sender to see if you should use syntax
 +
  highlighting codes or not
 +
    This function returns an ID you can pass on to unregisterGlobalDisassembleOverride()  6.4+
 +
  unregisterGlobalDisassembleOverride(id)
 +
Properties:
 +
  LastDisassembleData: Table
 +
  OnDisassembleOverride: function(sender: Disassembler, address: integer, LastDisassembleData: Table): opcode, description
 +
  syntaxhighlighting: boolean: This property is set if the syntax highlighting codes are accepted or not
 +
Methods:
 +
  disassemble(address): Disassembles the given instruction and returns the opcode. It also fills in a LastDisassembleData record
 +
  decodeLastParametersToString(): Returns the unedited "Comments" information. Does not display userdefined comments
 +
  getLastDisassembleData(): Returns the LastDisassembleData table.
 +
    The table is build-up as follow:
 +
      address: integer - The address that was disassembled
 +
      opcode: string - The opcode without parameters
 +
      parameters: string - The parameters
 +
      description: string - The description of this opcode
 +
      bytes: table - A table containing the bytes this instruction consists of (1.. )
 +
      modrmValueType: DisAssemblerValueType  - Defines the type of the modrmValue field (dvtNone=0, dvtAddress=1, dvtValue=2)
 +
      modrmValue: Integer - The value that the modrm specified. modrmValueType defines what kind of value
 +
      parameterValueType: DisAssemblerValueType
 +
      parameterValue: Integer - The value that the parameter part specified
 +
      isJump: boolean - Set to true if the disassembled instruction can change the EIP/RIP (not ret)
 +
      isCall: boolean - Set to true if it's a Call
 +
      isRet: boolean - Set to true if it's a Ret
 +
      isConditionalJump: boolean - Set to true if it's a conditional jump
 +
 +
 +
 +
==== DissectCode ====
 +
 +
'''[[DissectCode]] class: (Inheritance: [[Object]])'''
 +
  getDissectCode(): Creates or returns the current code DissectCode object
 +
Properties:
 +
  -
 +
Methods:
 +
  clear(): Clears all data
 +
  dissect(modulename): Dissects the memory of a module
 +
  dissect(base,size): Dissect the specified memory region
 +
  addReference(fromAddress, ToAddress, type, OPTIONAL isstring):
 +
    Adds a reference. Type can be jtCall, jtUnconditional, jtConditional, jtMemory
 +
    In case of jtMemory setting isstring to true will add it to the referenced strings list
 +
  deleteReference(fromAddress, ToAddress)
 +
  getReferences(address): Returns a table containing the addresses that reference this address and the type
 +
  getReferencedStrings(): Returns a table of addresses and their strings that have been referenced. Use getReferences to find out which addresses that are
 +
  getReferencedFunctions(): Returns a table of functions that have been referenced. Use getReferences to find out which callers that are
 +
  saveToFile(filename)
 +
  loadFromFile(filename)
 +
 +
 +
 +
 +
==== RIPRelativeScanner ====
 +
 +
'''[[RIPRelativeScanner]] class: (Inheritance: [[Object]])'''
 +
  createRipRelativeScanner(modulename): Creates a RIP relative scanner. This will scan the provided module for RIP relative instructions which you can use for whatever you like
 +
Properties:
 +
  Count: integer - The number of instructions found that have a RIP relative address
 +
  Address[]: integer - An array to access the results. The address is the address of the RIP relative offset in the instruction
 +
Methods:
 +
  -
 +
 +
 +
 +
 +
==== LuaPipe ====
 +
 +
'''[[LuaPipe]] class: (Inheritance: [[Object]])'''
 +
  Abstract class that LuaPipeServer and LuaPipeclient inherit from. It implements the data transmission methods
 +
Properties:
 +
  Connected: boolean: True if the pipe is connected
 +
Methods:
 +
  lock(): Acquire a lick on this pipe till unlock is called. If lock can not be acquired, wait. Recursive calls are allowed
 +
  unlock()
 +
  writeBytes(ByteTable, size OPTIONAL): Writes the provided byte table to the pipe. if size is not provided, the whole table is sent. Returns the number of bytes sent, or nil on failure
 +
  readBytes(size: integer): returns a byte table from the pipe, or nil on failure
 +
  readDouble(): Read a double from the pipe, nil on failure
 +
  readFloat(): Read a float from the pipe, nil on failure
 +
  readQword(): Read an 8 byte value from the pipe, nil on failure
 +
  readDword(): Read a 4 byte value from the pipe, nil on failure
 +
  readWord(): Read a 2 byte value from the pipe, nil on failure
 +
  readByte(): Read a byte from the pipe, nil on failure
 +
  readString(size: integer): Reads a string from the pipe, nil on failure.  (Can support 0-byte chars)
 +
  readWideString(size: integer): Reads a widestring from the pipe, nil on failure
 +
  writeDouble(v: double): Writes a double to the pipe. Returns the number of bytes sent, nil on failure
 +
  writeFloat(v: single): writes a float to the pipe. Returns the number of bytes sent, nil on failure
 +
  writeQword(v: qword): writes an 8 byte value to the pipe. Returns the number of bytes sent, nil on failure
 +
  writeDword(v: dword): writes a 4 byte value to the pipe. Returns the number of bytes sent, nil on failure
 +
  writeWord(v: word): writes a word to the pipe. Returns the number of bytes sent, nil on failure
 +
  writeByte(v: byte): writes a byte to the pipe. Returns the number of bytes sent, nil on failure
 +
  writeString(str: string; include0terminator: boolean OPTIONAL); Writes a string to the pipe. If include0terminator is false or not provided it will not write the 0 terminator byte.  Returns the number of bytes written, or nil on failure
 +
  writeWideString(str: widestring; include0terminator: boolean OPTIONAL); Writes a widestring to the pipe. If include0terminator is false or not provided it will not write the 0 terminator bytes. Returns the number of bytes written, or nil on failure
 +
 +
 +
 +
==== LuaPipeClient ====
 +
 +
'''[[LuaPipeClient]] class: (Inheritance: [[LuaPipe]]--&gt;[[Object]])'''
 +
 +
Class implementing a client that connects to a pipe
 +
 +
  connectToPipe(pipename): Returns a LuaPipeClient connected to the given pipename. Nil if the connection fails
 +
Properties:
 +
  -
 +
Methods:
 +
  -
 +
 +
 +
 +
==== LuaPipeServer ====
 +
 +
'''[[LuaPipeServer]] class: (Inheritance: [[LuaPipe]]--&gt;[[Object]])'''
 +
 +
Class launching the server side of a pipe
 +
 +
  createPipe(pipename, inputsize OPTIONAL, outputsize OPTIONAL): 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.  Default input and output size is 4096 for both
 +
Properties:
 +
  valid: boolean - Returns true if the pipe has been created properly. False on failure (e.g wrong pipename)
 +
Methods:
 +
  acceptConnection() - Waits for a client to connect to this pipe (Warning: Freezes the thread this is executed in)
 +
 +
 +
 +
==== openLuaServer ====
 +
 +
; [[openLuaServer]](Name)
 +
: Opens a pipe with the given name. The LuaClient dll needs this name to connect to ce
 +
 +
 +
 +
LuaClient.dll functions:
 +
; BOOL [[CELUA_Initialize]](char *name)
 +
: Initializes
 +
 +
; UINT_PTR [[CELUA_ExecuteFunction]](char *luacode, UINT_PTR parameter)
 +
: This function executes a lua function with parameters (parameter) and with the luacode as body Parameter will be treated as an integer
 +
  In short:
 +
    function(parameter)
 +
      &lt;luacode&gt;
 +
    end
 +
  The return value of this function is the return value of the lua function (integer)
 +
 +
 +
 +
 +
 +
==== [[Settings]] class ====
 +
This class can be used to read out and set settings of cheat engine and of plugins, and store your own data
 +
 +
===== global functions =====
 +
 +
==== getSettings ====
 +
 +
; [[getSettings]](path Optional)
 +
: Returns a settings object. If path is nil it will points to the Cheat Engine main settings (Registry) . If name is provides the settings currently accessed will be the one at the subkey provided
 +
: Note: Keep in mind that it returns a new object each call, even if he same name is used multiple times
 +
::'''Properties''':
 +
:::'''Path''': string - Gets/Sets the current subkey (nil if main)
 +
:::'''Value'''[]: A table access into the settings. e.g: Value["Count"]=12
 +
::'''Methods''':
 +
:::-
 +
 +
 +
 +
 +
 +
==== [[SymbolList]] class ====
 +
This class can be used to look up an address to a symbolname, and a symbolname to an address
 +
It can also be registered with the internal symbol handler of cheat engine
 +
 +
 +
This class makes use of a special "Symbol" table construction that contains size and optionally other data
 +
 +
* Symbol Table:
 +
** modulename: string
 +
** searchkey: string
 +
** address: integer
 +
** symbolsize: integer
 +
 +
 +
'''Global functions'''
 +
 
 +
==== createSymbolList ====
  
 +
; [[createSymbolList]]()
 +
: Creates an empty symbollist.
 +
::'''Properties''':
 +
:::-
 +
::'''Methods''':
 +
:::'''clear()''':
 +
:::'''getSymbolFromAddress(address)''': Searches the list for the given address. The address does not have to match the exact address. As long as it falls withing the range
 +
:::'''getSymbolFromString(searchkey)''':
 +
:::'''addSymbol(modulename, searchkey, address, symbolsize, skipAddressToSymbolLookup OPTIONAL, extradata OPTIONAL)''': Adds a symbol to the symbollist
 +
::::extradata is a table which can be used to fill in a return type and parameters for function calls. It has the following fields:
 +
::::::'''returntype''': string
 +
::::::'''parameters''': string
  
'''[[RasterImage]] class: (Inheritance: [[Graphic]]--&gt;[[Object]]) : Base class for some graphical controls'''
+
==== deleteSymbol ====
 
 
Properties:
 
  Canvas: Canvas
 
  PixelFormat: PixelFormat - the pixelformat for this image. Will clear the current image if it had one. Supported pixelformats: pf1bit, pf4bit, pf8bit, pf15bit, pf16bit, pf24bit, pf32bit (recommended)
 
  TransparentColor: integer
 
Methods:
 
  getCanvas(): Returns the Canvas object for this image
 
  getPixelFormat():  Returns the current pixelformat
 
  getPixelFormat(pixelformat):  Sets the pixelformat for this image. Will clear the current image if it had one. Supported pixelformats: pf1bit, pf4bit, pf8bit, pf15bit, pf16bit, pf24bit, pf32bit (recommended)
 
  setTransparentColor(integer): Sets the color that will be rendered as transparent when drawn
 
  getTransparentColor():  Returns the color set to be transparent
 
 
 
 
 
  
'''[[Bitmap]] class: (Inheritance: [[CustomBitmap]]--&gt;RasterImage--&gt;[[Graphic]]--&gt;[[Object]]) : Bitmap based Graphic object'''
+
; [[deleteSymbol]](searchkey)
  createBitmap(width, height) - Returns a Bitmap object
+
: -
 
+
==== deleteSymbol ====
 
 
'''[[PortableNetworkGraphic]] Class: (Inheritence: [[CustomBitmap]]--&gt;RasterImage--&gt;[[Graphic]]--&gt;[[Object]])'''
 
  createPNG(width, height) - Returns a PortableNetworkGraphic object
 
 
 
 
 
'''[[JpegImage]] Class: (Inheritence: [[CustomBitmap]]--&gt;RasterImage--&gt;[[Graphic]]--&gt;[[Object]])'''
 
  createJpeg(width, height) - Returns a Jpeg object
 
 
 
 
 
 
 
'''[[Picture]] class: (Inheritance: [[Object]]) : Container for the Graphic class'''
 
  createPicture() : Returns a empty picture object
 
Properties:
 
  Graphic
 
  PNG
 
  Bitmap
 
  Jpeg
 
Methods:
 
  loadFromFile(filename)
 
  saveToFile(filename)
 
  loadFromStream(stream, originalextension OPTIONAL) : Loads a picture from a stream. Note that the stream position must be set to the start of the picture
 
  assign(sourcepicture)
 
  getGraphic() : Gets the Graphic object of this picture
 
  getPNG(): Returns a PortableNetworkGraphic Class object (Can be used from scratch)
 
  getBitmap(): Returns a Bitmap Class object (Can be used from scratch)
 
  getJpeg(): Returns a JpegImage Class object (Picture must be initialized with a jpeg file first)
 
  
 +
; [[deleteSymbol]](address)
 +
: -
 +
==== register ====
  
 +
; [[register]]()
 +
: Registers the current symbol list with the symbol handler
 +
==== unregister ====
  
 +
; [[unregister]]()
 +
: Unregisters the current symbol list from the symbol handler
  
'''[[GenericHotkey]] class: (Inheritance:  [[Object]])'''
 
  createHotkey(function, keys, ...) : returns an initialized GenericHotkey class object. Maximum of 5 keys
 
  createHotkey(function, {keys, ...}) : ^
 
Properties:
 
  DelayBetweenActivate: integer - Interval in milliseconds that determines the minimum time between hotkey activations. If 0, the global delay is used
 
  onHotkey: The function to call when the hotkey is pressed
 
Methods:
 
  getKeys()
 
  setKeys(key, ....)
 
  setOnHotkey(table)
 
  getOnHotkey
 
  
  
  
'''[[CommonDialog]] class: (Inheritance:  [[Object]])'''
+
==== Pagecontrol ====
  Properties:
 
    OnShow: function(sender)
 
    OnClose: function(sender)
 
    Title: string - The caption at top of the dialog
 
  Methods:
 
    Execute() : Shows the dialog and return true/false depending on the dialog
 
  
 +
'''[[Pagecontrol]] class: ([[WinControl]]--&gt;[[Control]]--&gt;[[Component]]--&gt;[[Object]])'''
  
 +
This is an object that can hold multiple pages
  
'''[[FindDialog]] class: (Inheritance: [[CommonDialog]]--&gt;[[Component]]--&gt;[[Object]])'''
+
'''Global functions'''
  
Properties:
+
; createPageControl(owner)
  FindText: String - The text the user wishes to find
+
:
  Options: Enum - Find Options
+
::'''Properties''':
                  { frDown, frFindNext, frHideMatchCase, frHideWholeWord,
+
:::'''ShowTabs''': boolean - Shows the tabs
                    frHideUpDown, frMatchCase, frDisableMatchCase, frDisableUpDown,
+
:::'''TabIndex''': integer - Gets and sets the current tab
                    frDisableWholeWord, frReplace, frReplaceAll, frWholeWord, frShowHelp,
+
:::'''ActivePage''': TabSheet - Returns the current tabsheet.
                    frEntireScope, frHideEntireScope, frPromptOnReplace, frHidePromptOnReplace }
+
:::'''PageCount''': integer - Gets the number of pages
  OnFind: function (sender) - Called when the find button has been clicked
+
:::'''Page[]''': TabSheet - Get a specific page (TabSheet)
  OnHelp: function (sender) - Called when the help button is visible (see Options) and clicked
+
::'''Methods''':
Methods:
+
:::'''addTab()''': TabSheet - Creates a new TabSheet
  -
 
  
  
  
'''[[FileDialog]] class: (Inheritance: [[CommonDialog]]--&gt;[[Component]]--&gt;[[Object]])'''
 
  
Properties:
+
==== TabSheet ====
  DefaultExt: string - When not using filters this will be the default extention used if no extension is given
 
  Files: Strings - Stringlist containing all selected files if multiple files are selected
 
  FileName: string - The filename that was selected
 
  Filter: string - A filter formatted string
 
  FilterIndex: integer - The index of which filter to use
 
  InitialDir: string - Sets the folder the filedialog will show first
 
Methods:
 
  -
 
  
 +
'''[[TabSheet]] class: ([[WinControl]]--&gt;[[Control]]--&gt;[[Component]]--&gt;[[Object]])'''
  
 +
Part of a page control. This object can contain other objects
  
'''[[OpenDialog]] class: (Inheritance: [[FileDialog]]--&gt;[[CommonDialog]]--&gt;[[Component]]--&gt;[[Object]])'''
 
  createOpenDialog(owner) : Creates an opendialog object
 
 
Properties:
 
Properties:
   Options: String
+
   TabIndex: integer - the current index in the pagelist of the owning pagecontrol
    A string formatted as "[param1, param2, param3]" to set OpenDialogs options
 
    Valid parameters are:
 
      ofReadOnly,
 
      ofOverwritePrompt  : if selected file exists shows a message, that file will be overwritten
 
      ofHideReadOnly    : hide read only file
 
      ofNoChangeDir      : do not change current directory
 
      ofShowHelp        : show a help button
 
      ofNoValidate
 
      ofAllowMultiSelect : allow multiselection
 
      ofExtensionDifferent
 
      ofPathMustExist    : shows an error message if selected path does not exist
 
      ofFileMustExist    : shows an error message if selected file does not exist
 
      ofCreatePrompt
 
      ofShareAware
 
      ofNoReadOnlyReturn : do not return filenames that are readonly
 
      ofNoTestFileCreate
 
      ofNoNetworkButton
 
      ofNoLongNames
 
      ofOldStyleDialog
 
      ofNoDereferenceLinks : do not expand filenames
 
      ofEnableIncludeNotify
 
      ofEnableSizing    : dialog can be resized, e.g. via the mouse
 
      ofDontAddToRecent  : do not add the path to the history list
 
      ofForceShowHidden  : show hidden files
 
      ofViewDetail      : details are OS and interface dependent
 
      ofAutoPreview      : details are OS and interface dependent
 
 
Methods:
 
Methods:
 
   -
 
   -
  
 +
== Links ==
 +
* [[Cheat Engine:Help File|Help File]]
  
 +
* [[Help_File:Auto_Assembler_help|Back]]
  
'''[[SaveDialog]] class: (Inheritance: [[OpenDialog]]--&gt;[[FileDialog]]--&gt;[[CommonDialog]]--&gt;[[Component]]--&gt;[[Object]])'''
+
* [[Help_File:Debugging|Next]]
  createSaveDialog(owner)
 
 
 
 
 
 
 
'''[[SelectDirectoryDialog]] class: (Inheritance: [[OpenDialog]]--&gt;[[FileDialog]]--&gt;[[CommonDialog]]--&gt;[[Component]]--&gt;[[Object]])'''
 
  createSelectDirectoryDialog(owner)
 
 
 
 
 
 
 
'''[[Stream]] class: (Inheritance: [[Stream]]--&gt;[[Object]])'''
 
 
 
Properties:
 
  Size: integer
 
  Position: integer
 
Methods:
 
  copyFrom(stream, count) - Copies count bytes from the given stream to this stream
 
  read(count): bytetable - Returns a bytetable containing the bytes of the stream. This increases the position
 
  write(bytetable, count OPTIONAL)- Writes the given bytetable to the stream
 
 
 
 
 
 
 
'''[[MemoryStream]] class: (Inheritance: [[Stream]]--&gt;[[Object]])'''
 
  createMemoryStream()
 
Properties:
 
  Memory: Integer - The address in Cheat Engine's memory this stream is loaded (READONLY, tends to change)
 
Methods:
 
  loadFromFile(filename) : Replaces the contents in the memory stream with the contents of a file on disk
 
  saveToFile(filename) : Writes the contents of the memory stream to the specified file
 
 
 
 
 
 
 
'''[[FileStream]] class: (Inheritance: [[HandleStream]]--&gt;[[Stream]]--&gt;[[Object]])'''
 
  createFileStream(filename, mode)
 
 
 
 
 
 
 
'''[[TableFile]] class: (Inheritance: [[Object]])'''
 
  findTableFile(filename): Returns the TableFile class object for the saved file
 
Properties:
 
  Name: string
 
  Stream: MemoryStream
 
Methods:
 
  saveToFile(filename)
 
  getData() : Gets a MemoryStream object
 

Latest revision as of 10:27, 8 May 2024

List of CE specific functions and variables:

Contents

TrainerOrigin[edit]

TrainerOrigin
A variable that contains the path of the trainer that launched cheat engine (Only set when launched as a trainer)

process[edit]

process
A variable that contains the main modulename of the currently opened process

getCEVersion[edit]

getCEVersion()
Returns a floating point value specifying the version of cheat engine


activateProtection[edit]

activateProtection()
Prevents basic memory scanners from opening the cheat engine process

fullAccess[edit]

fullAccess(address,size)
Changes the protection of a block of memory to writable and executable


loadTable[edit]

loadTable(filename, merge OPTIONAL)
Loads a .ct or .cetrainer. If merge is provided and set to true it will not clear the old table

saveTable[edit]

saveTable(filename, protect OPTIONAL)
Saves the current table. If protect is provided and set to true and the filename has the '.CETRAINER' extension, it will protect it from reading normally


Note: Addresses can be strings, if a string they will get interpreted by ce's symbolhandler.


readBytes[edit]

readBytes(address,bytecount, ReturnAsTable )
returns the bytes at the given address. If ReturnAsTable is true it will return a table instead of multiple bytes Reads the bytes at the given address and returns a table containing the read out bytes


writeBytes[edit]

writeBytes(address, x,x,x,x,...)
writeBytes(address, table)
Write the given bytes to the given address.

readSmallInteger[edit]

readSmallInteger(address)
Reads a 16-bit integer from the specified address

readInteger[edit]

readInteger(address)
Reads a 32-bit integer from the specified address

readQword[edit]

readQword(address)
Reads a 64-bit integer from the specified address

readPointer[edit]

readPointer(address)
In a 64-bit target this equals readQword, in a 32-bit target readInteger()

readFloat[edit]

readFloat(address)
Reads a single precision floating point value from the specified address

readDouble[edit]

readDouble(address)
Reads a double precision floating point value from the specified address

readString[edit]

readString(address, maxlength, widechar OPTIONAL)
Reads a string till it encounters a 0-terminator. Maxlength is just so you won't freeze for too long, set to 6000 if you don't care too much. Set WideChar to true if it is encoded using a widechar formatting.

writeSmallInteger[edit]

writeSmallInteger(address,value)
Writes a 16-bit integer to the specified address. Returns true on success.

writeInteger[edit]

writeInteger(address,value)
Writes a 32-bit integer to the specified address. Returns true on success.

writeQword[edit]

writeQword(address, value)
Write a 64-bit integer to the specified address

writeFloat[edit]

writeFloat(address,value)
Writes a single precision floating point to the specified address. Returns true on success

writeDouble[edit]

writeDouble(address,value)
Writes a double precision floating point to the specified address. Returns true on success

writeString[edit]

writeString(address,text, widechar OPTIONAL)
Write a string to the specified address. Returns true on success. Set WideChar to true if it is encoded using a widechar formatting.

readBytesLocal[edit]

readBytesLocal(address,bytecount, ReturnAsTable)
See readBytes but then it's for Cheat engine's memory

readIntegerLocal[edit]

readIntegerLocal(address)
Reads an integer from the specified address in CE's memory

readQwordLocal[edit]

readQwordLocal(address)
Reads a 64-bit integer from the specified address in CE's memory

readPointerLocal[edit]

readPointerLocal(address)
ReadQwordLocal/ReadIntegerLocal depending on the cheat engine build

readFloatLocal[edit]

readFloatLocal(address)
Reads a single precision floating point value from the specified address in CE's memory

readDoubleLocal[edit]

readDoubleLocal(address)
Reads a double precision floating point value from the specified address in CE's memory

readStringLocal[edit]

readStringLocal(address, maxlength, widechar OPTIONAL)
Reads a string from CE's memory till it encounters a 0-terminator. Maxlength is just so you won't freeze for too long, set to 6000 if you don't care too much. Set WideChar to true if it is encoded using a widechar formatting

writeIntegerLocal[edit]

writeIntegerLocal(address,value)
Writes an integer to the specified address in CE's memory. Returns true on success

writeQwordLocal[edit]

writeQwordLocal(address,value)
Writes a 64-bit integer to the specified address in CE's memory. Returns true on success

writeFloatLocal[edit]

writeFloatLocal(address,value)
Writes a single precision floating point to the specified address in CE's memory. Returns true on success

writeDoubleLocal[edit]

writeDoubleLocal(address,value)
Writes a double precision floating point to the specified address in CE's memory. Returns true on success

writeStringLocal[edit]

writeStringLocal(address,string, widechar OPTIONAL)
Write a string to CE's memory at the specified address. Returns true on success. Set WideChar to true if it is encoded using a widechar formatting.

writeBytesLocal[edit]

writeBytesLocal(address, x,x,x,x,...)
writeBytesLocal(address, table, , count)
See writeBytes but then it's for Cheat Engine's memory.

wordToByteTable[edit]

wordToByteTable(number)
Converts a word to a bytetable

dwordToByteTable[edit]

dwordToByteTable(number)
Converts a dword to a bytetable

qwordToByteTable[edit]

qwordToByteTable(number)
Converts a qword to a bytetable

floatToByteTable[edit]

floatToByteTable(number)
Converts a float to a bytetable

doubleToByteTable[edit]

doubleToByteTable(number)
Converts a double to a bytetable

stringToByteTable[edit]

stringToByteTable(string)
Converts a string to a bytetable

wideStringToByteTable[edit]

wideStringToByteTable(string)
Converts a string to a widestring and converts that to a bytetable


byteTableToWord[edit]

byteTableToWord(table)
Converts a bytetable to a word

byteTableToDword[edit]

byteTableToDword(table)
Converts a bytetable to a dword

byteTableToQword[edit]

byteTableToQword(table)
Converts a bytetable to a qword

byteTableToFloat[edit]

byteTableToFloat(table)
Converts a bytetable to a float

byteTableToDouble[edit]

byteTableToDouble(table)
Converts a bytetable to a double

byteTableToString[edit]

byteTableToString(table)
Converts a bytetable to a string

byteTableToWideString[edit]

byteTableToWideString(table)
Converts a bytetable to a widestring and converts that to a string

bOr[edit]

bOr(int1, int2)
Binary Or

bXor[edit]

bXor(int1, int2)
Binary Xor

bAnd[edit]

bAnd(int1, int2)
Binary And

bShl[edit]

bShl(int, int2)
Binary shift leftP

bShr[edit]

bShr(int, int2)
Binary shift right

bNot[edit]

bNot(int)
Binary not


writeRegionToFile[edit]

writeRegionToFile(filename, sourceaddress,size)
Writes the given region to a file. Returns the number of bytes written

readRegionFromFile[edit]

readRegionFromFile(filename, destinationaddress)
Reads a file from memory and writes the contents of that file to the specified address


resetLuaState[edit]

resetLuaState()
This will create a new lua state that will be used. (Does not destroy the old one, so memory leak)


createRef[edit]

createRef(...)
Returns an integer reference that you can use with getRef. Useful for objects that can only store integers and need to reference lua objects. (Component.Tag...)

getRef[edit]

getRef(integer)
Returns whatever the reference points out

destroyRef[edit]

destroyRef(integer)
Removes the reference.

reloadSettingsFromRegistry[edit]

reloadSettingsFromRegistry()
This will cause cheat engine to reload the settings from the registry and apply them


getTranslationFolder[edit]

getTranslationFolder()
Returns the path of the current translation files. Empty if there is no translation going on

loadPOFile[edit]

loadPOFile(path)
Loads a '.PO' file used for translation

translate[edit]

translate(string)
Returns a translation of the string. Returns the same string if it can't be found

translateID[edit]

translateID(translationid - string, originalstring - string OPTIONAL)
Returns a translation of the string id


ansiToUtf8[edit]

ansiToUtf8(string)
Converts a string in Ansi encoding to UTF8

utf8ToAnsi[edit]

utf8ToAnsi(string)
Converts a string in UTF8 encoding to Ansi


Note: GUI components mainly show in UTF8, some other functions use Ansi, try to find out which ones...


enumModules[edit]

enumModules(processid OPTIONAL)
Returns a table containing information about each module in the current process, or the specified processid Each entry is a table with fields
  • Name: String containing the modulename
  • Address: Integer representing the address the module is loaded
  • Is64Bit: Boolean set to true if it's a 64-bit module
  • PathToFile: String to the location this module is loaded


getAddress[edit]

getAddress(string, local OPTIONAL)
returns the address of a symbol. Can be a modulename or an export. set Local to true if you wish to querry the symboltable of the ce process

getSymbolInfo[edit]

getSymbolInfo(symbolname)
Returns a table as defined by the SymbolList class object (modulename, searchkey, address, size)

getModuleSize[edit]

getModuleSize(modulename)
Returns the size of a given module (Use getAddress to get the base address)

reinitializeSymbolhandler[edit]

reinitializeSymbolhandler(waittilldone : BOOLEAN OPTIONAL, default=TRUE)
reinitializes the symbolhandler. E.g when new modules have been loaded

reinitializeDotNetSymbolhandler[edit]

reinitializeDotNetSymbolhandler(modulename OPTIONAL)
Reinitializes only the DotNet part of the symbol list. (E.g After an ILCode has been JITed) (6.4+)


errorOnLookupFailure[edit]

errorOnLookupFailure(state)
If set to true (default) address lookups in stringform will raise an error if it can not be looked up. This includes symbolnames that are not defined and pointers that are bad. If set to false it will return 0 in those cases (Useful for pointers that don't work 100% of the time) 6.4+:Returns the original state


generateAPIHookScript[edit]

generateAPIHookScript(address, addresstojumpto, addresstogetnewcalladdress OPT)
Generates an auto assembler script which will hook the given address when executed

autoAssemble[edit]

autoAssemble(text, targetself OPTIONAL)
runs the auto assembler with the given text. Returns true on success (if targetself is set it will assemble into Cheat Engine itself)


registerAutoAssemblerCommand[edit]

registerAutoAssemblerCommand(command, function(parameters, syntaxcheckonly))
Registers an auto assembler command to call the specified function. The command will be replaced by the string this function returns when executed. The function can be called twice. Once for syntax check and symbol lookup(1), and the second time for actual execution by the assembler(2) if it has not been removed in phase1.

Note: The callback function can return multiple values. If the function returns nil, and as secondary parameter a string, this will make the auto assembler fail with that error.

  • Nil, String: Will raise an error with the given string
  • MultilineString: Replaces the line in the script with the given strings.

unregisterAutoAssemblerCommand[edit]

unregisterAutoAssemblerCommand(command)
Removes the callback.


registerSymbolLookupCallback[edit]

registerSymbolLookupCallback(function(string) : integer, location) : ID 6.4+
Registers a function to be called when a a symbol is parsed Location determines at what part of the symbol lookup the function is called.
The function should return an Integer with the corresponding address if the callback found it. Nil or 0 if you didn't.
  • slStart: The very start of a symbol lookup. Before tokenization
  • slNotInt: Called when it has been determined it's not a hexadecimal only string. Before tokenization
  • The following locations can be called multiple times for one string as they are called for each token and appended token
    • slNotModule: Called when it has been determined the current token is not a modulename
    • slNotUserdefinedSymbol: Called when it has been determined it's not a userdefined symbol
    • slNotSymbol: Called when it has been determined it's not a symbol in the symbollist
    • slFailure: Called when it has no clue what the given string is

Note: slNotSymbol and slFailure are similar, but failure comes only if there's no token after the current token that can be concatenated. Else slNotSymbol will loop several times till all tokens make up the full string

unregisterSymbolLookupCallback[edit]

unregisterSymbolLookupCallback(ID)
Removes the callback.


registerAddressLookupCallback[edit]

registerAddressLookupCallback(function(integer) : string) : ID
Registers a function to be called when the name of an address is requested

unregisterAddressLookupCallback[edit]

unregisterAddressLookupCallback(ID)
Removes the callback.


registerStructureDissectOverride[edit]

registerStructureDissectOverride(function(structure, baseaddress) : table)
Registers a function to be called whenever the structure dissect window when the user chooses to let cheat engine guess the structure for them.
Use the structure object to fill it in
Return true if you have filled it in, or false or nil if you did not

Tip: Use inputQuery to ask the user the size if your function doesn't do that automatically

unregisterStructureDissectOverride[edit]

unregisterStructureDissectOverride(ID)
Removes the callback.


registerStructureNameLookup[edit]

registerStructureNameLookup(function(address) : name, address OPTIONAL)
Registers a function to be called when dissect data asks the user for the name of a new structure define. If you have code that can look up the name of a structure, and perhaps also the real starting point, you can use this to improve the data dissection.

unregisterStructureNameLookup[edit]

unregisterStructureNameLookup(ID)
Removes the callback.


registerAssembler[edit]

registerAssembler(function(address, instruction) : bytetable)
Registers a function to be called when the single line assembler is invoked to convert an instruction to a list of bytes
Return a bytetable with the specific bytes, or nil if you wish to let another function, or the original x86 assembler to assemble it

unregisterAssembler[edit]

unregisterAssembler(ID)
Unregisters the registered assembler


registerAutoAssemblerPrologue[edit]

registerAutoAssemblerPrologue(function(script, syntaxcheck))
Registers a function to be called when the auto assembler is about to parse an auto assembler script. The script you get is after the [ENABLE] and [DISABLE] tags have been used to strip the script to the according one, but before comment stripping and trimming has occured.
Script is a Strings object which when changed has direct effect to the script.

unregisterAutoAssemblerPrologue[edit]

unregisterAutoAssemblerPrologue(ID)
Removes the callback.


showMessage[edit]

showMessage(text)
shows a messagebox with the given text

inputQuery[edit]

inputQuery(caption, prompt, initialstring)
Shows a dialog where the user can input a string. This function returns the given string, or nil on cancel CE6.4+

messageDialog[edit]

messageDialog(text, type, buttons...)
pops up a messagebox with a specific icon/sound with the specified buttons (mbok, mbyes, ....)

sleep[edit]

sleep(milliseconds)
pauses for the number of specified milliseconds (1000= 1 sec...)


getProcesslist[edit]

getProcesslist()
getProcesslist(Strings)
Returns a table with the process list (pid - name ), if 'Strings' is not set.
If 'Strings' is set fills a Strings inherited object with the process list of the system.
Format: %x-pidname

getWindowlist[edit]

getWindowlist()
getWindowlist(Strings)
Returns a table with the window list (pid - window caption), if 'Strings' is not set.
If 'Strings' is set fills a Strings inherited object with the top-window list of the system.
Format: %x-windowcaption

getThreadlist[edit]

getThreadlist(List)
fills a List object with the threadlist of the currently opened process.
Format: %x


onOpenProcess[edit]

function onOpenProcess(processid)
If this function is defined it will be called whenever cheat engine opens a process.

Note: The the same process might be opened multiple times in a row internally
Note 2: This function is called before attachment is fully done. You can call reinitializeSymbolhandler() to force the open to complete, but it will slow down process opens. Alternatively, you could launch a timer which will run when the opening has finished.

getOpenedProcessID[edit]

getOpenedProcessID()
Returns the currently opened process. If none is open, returns 0

getProcessIDFromProcessName[edit]

getProcessIDFromProcessName(name)
returns a processid

openProcess[edit]

openProcess(processid)
causes cheat engine to open the given processid
openProcess(processname)
causes cheat engine to find and open the given process

setPointerSize[edit]

setPointerSize(size)
Sets the size cheat engine will deal with pointers in bytes. (Some 64-bit processes can only use 32-bit addresses)

pause[edit]

pause()
pauses the current opened process

unpause[edit]

unpause()
resumes the current opened process


getPixel[edit]

getPixel(x, y)
returns the rgb value of the pixel at the specific screen coordinate

getMousePos[edit]

getMousePos
returns the x,y coordinates of the mouse

setMousePos[edit]

setMousePos(x,y)
sets the mouse position


isKeyPressed[edit]

isKeyPressed(key)
returns true if the specified key is currently pressed

keyDown[edit]

keyDown(key)
causes the key to go into down state

keyUp[edit]

keyUp(key)
causes the key to go up

doKeyPress[edit]

doKeyPress(key)
simulates a key press


shortCutToText[edit]

shortCutToText(shortcut)
Returns the textual representation of the given shortut value (integer) (6.4+)

textToShortCut[edit]

textToShortCut(shortcutstring)
Returns an shortcut integer that the given string represents. (6.4+)


convertKeyComboToString[edit]

convertKeyComboToString(key1,...)
convertKeyComboToString({key1,...})
Returns a string representation of the given keys like the hotkey handler does


outputDebugString[edit]

outputDebugString(text)
Outputs a message using the windows OutputDebugString message. You can use tools like dbgview to read this. Useful for testing situations where the GUI freezes

shellExecute[edit]

shellExecute(command, parameters OPTIONAL, folder OPTIONAL, showcommand OPTIONAL)
Executes a given command


getTickCount[edit]

getTickCount()
Returns the current tickcount since windows was started. Each tick is one millisecond

processMessages[edit]

processMessages()
Lets the main eventhandler process the new messages (allows for new button clicks)

inMainThread[edit]

inMainThread()
Returns true if the current code is running inside the main thread (6.4+)

integerToUserData[edit]

integerToUserData(int)
Converts a given integer to a userdata variable

userDataToInteger[edit]

userDataToInteger(UserDataVar)
Converts a given userdata variable to an integer


synchronize[edit]

synchronize(function(...), ...)
Calls the given function from the main thread. Returns the return value of the given function

checkSynchronize[edit]

checkSynchronize()
Calls this from an infinite loop in the main thread when using threading and synchronize calls. This will execute any queued synchronize calls


writeToClipboard[edit]

writeToClipboard(text)
Writes the given text to the clipboard

readFromClipboard[edit]

readFromClipboard()
Reads the text from the clipboard


speedhack_setSpeed[edit]

speedhack_setSpeed(speed)
Enables the speedhack if needed and sets the specific speed

speedhack_getSpeed[edit]

speedhack_getSpeed()
Returns the last set speed


injectDLL[edit]

injectDLL(filename)
Injects a dll, and returns true on success


loadPlugin[edit]

loadPlugin(dllnameorpath)
Loads the given plugin. Returns nil on failure. On success returns a value of 0 or greater


registerCustomTypeLua[edit]

registerCustomTypeLua(typename, bytecount, bytestovaluefunction, valuetobytesfunction, isFloat)
Registers a Custom type based on lua functions.
The bytes to value function should be defined as "function bytestovalue (b1,b2,b3,b4)" and return an integer as result.
The value to bytes function should be defined as "function valuetobytes (integer)" and return the bytes it should write.


registerCustomTypeAutoAssembler[edit]

registerCustomTypeAutoAssembler(script)
Registers a custom type based on an auto assembler script. The script must allocate an "ConvertRoutine" and "ConvertBackRoutine".


onAutoGuess[edit]

onAutoGuess(function)
Registers an function to be called whenever autoguess is used to predict a variable type.
function override (address, ceguess): Return the variable type you want it to be. If no change, just return ceguess.


closeCE[edit]

closeCE()
just closes ce

hideAllCEWindows[edit]

hideAllCEWindows()
makes all normal ce windows invisible (e.g trainer table)

unhideMainCEwindow[edit]

unhideMainCEwindow()
shows the main cheat engine window


getAutoAttachList[edit]

getAutoAttachList()
returns the AutoAttach StringList object. It can be controlled with the stringlist_ routines (it's not recommended to destroy this list object)


AOBScan[edit]

AOBScan(x, x, x, x, ...)
AOBScan(aobstring, protectionflags OPTIONAL, alignmenttype OPTIONAL, alignmentparam HALFOPTIONAL)
scans the currently opened process and returns a StringList object containing all the results. don't forget to free this list when done.
Bytevalue of higher than 255 or anything not an integer will be seen as a wildcard.
  • protectionflags is a string:
    • Add a + to indicate that flag MUST be set and a - to indicate that that flag MUST NOT be set. (* sets it to don't care)
    • X = Executable
    • W = Writable memory
    • C = Copy On Write.

Examples:

 +W-C = Writable memory exluding copy on write and doesn't care about the Executable flag
 +X-C-W = Find readonly executable memory
 +W = Finds all writable memory and don't care about copy on write or execute
 "" = Find everything (is the same as "*X*C*W" )
  • alignmenttype is an integer:
    • 0 = No alignment check
    • 1 = Address must be dividable by alignmentparam
    • 2 = Address must end with alignmentparam
  • alignmentparam is a string which either holds the value the addresses must be dividable by or what the last digits of the address must be.



Regarding eventhandlers. You can initialize them using both a string of a functionname or the function itself.
If initialized using a function itself it won't be able to get saved in the table.

allocateSharedMemory[edit]

allocateSharedMemory(name, size)
Creates a shared memory object of the given size if it doesn't exist yet. If size is not given and there is no shared region with this name then the default size of 4096 is used.
It then maps this shared memory block into the currently targeted process. It returns the address of mapped region in the target process.


getForegroundProcess[edit]

getForegroundProcess()
Returns the processID of the process that is currently on top.

findWindow[edit]

findWindow(classname OPTIONAL, caption OPTIONAL): windowhandle
Finds a window with the given classname and/or windowname.

getWindow[edit]

getWindow(windowhandle, command) : windowhandle
Gets a specific window based on the given window (Check MSDN getWindow for the command description).

getWindowCaption[edit]

getWindowCaption(windowhandle) : string
Returns the caption of the window.

getWindowClassName[edit]

getWindowClassName(windowhandle) : string
Returns the classname of the window.


getWindowProcessID[edit]

getWindowProcessID(windowhandle) : processid
Returns the processid of the process this window belongs to.

getForegroundWindow[edit]

getForegroundWindow() : windowhandle
Returns the windowhandle of the topmost window.

sendMessage[edit]

sendMessage(hwnd, msg, wparam, lparam) : result
Sends a message to a window. Those that wish to use it, should know how to use it (and fill in the msg id's yourself).

hookWndProc[edit]

hookWndProc(hwnd, function(hwnd, msg, wparam, lparam), async) : result
Hooks a window's wndproc procedure. The given function will receive all functions.
Return 0 to say you handled it. 1 to let the default windows handler deal with it.
Or anything else, to let the original handler deal with it.
Besides the return value, you can also return hWnd, Msg, lParam and wParam, modified, or nil for the original value.
Set ASYNC to true if you don't want to run this in the CE GUI. (faster, but you can't touch GUI objects).

unhookWndProc[edit]

unhookWndProc(hwnd)
Call this when done with the hook.
Not calling this function will result in the process window behaving badly when you exit CE.

cheatEngineIs64Bit[edit]

cheatEngineIs64Bit()
Returns true if CE is 64-bit, false if 32-bit

targetIs64Bit[edit]

targetIs64Bit()
Returns true if the target process is 64-bit, false if 32-bit


getCheatEngineDir[edit]

getCheatEngineDir()
Returns the folder Cheat Engine is located at


disassemble[edit]

disassemble(address)
Disassembles the given address and returns a string in the format of "address - bytes - opcode : extra"

splitDisassembledString[edit]

splitDisassembledString(disassembledstring)
Returns 4 strings. The address, bytes, opcode and extra field


getInstructionSize[edit]

getInstructionSize(address)
Returns the size of an instruction (basically it disassembles the instruction and returns the number of bytes for you)

getPreviousOpcode[edit]

getPreviousOpcode(address)
Returns the address of the previous opcode (this is just an estimated guess)


beep[edit]

beep()
Plays the fabulous beep/ping sound!

playSound[edit]

playSound(stream, waittilldone OPTIONAL)
Plays the given memorystream containing a .WAV formatted memory object. If waittilldone is true the script will stop executing till the sound has stopped
playSound(tablefile, waittilldone OPTIONAL)
Takes the memorystream from the tablefile and plays it.
There are two tablefiles predeclared inside cheat engine "Activate" and "Deactivate" . You are free to use or override them

speak[edit]

speak(text, waittilldone OPTIONAL)
Speaks a given text.
If waitTillDone is true the thread it's in will be frozen till it is done
speak(text, flags)
Speaks a given text using the given flags.

speakEnglish[edit]

speakEnglish(text, waittilldone OPTIONAL)
Will try the English voice by wrapping the given text into an XML statement specifying the English voice.
It'll not say anything, if no English language is present on your computer.

getUserRegistryEnvironmentVariable[edit]

getUserRegistryEnvironmentVariable(name)
Returns the environment variable stored in the user registry environment

setUserRegistryEnvironmentVariable[edit]

setUserRegistryEnvironmentVariable(name, string)
Sets the environment variable stored in the user registry environment

broadcastEnvironmentUpdate[edit]

broadcastEnvironmentUpdate()
Call this when you've changed the environment variables in the registry. This will cause at least the shell to update so you don't have to reboot. (It's always recommended to reboot though)


stringToMD5String[edit]

stringToMD5String(string)
Returns an md5 hash string from the provided string


getFormCount[edit]

getFormCount()
Returns the total number of forms assigned to the main CE application

getForm[edit]

getForm(index)
Returns the form at the specific index

registerFormAddNotification[edit]

registerFormAddNotification(function(form)): object
Registers a function to be called when a form is attached to ce's form list. This is useful for extentions that add new functionality to certain existing forms.
It returns an object that you can use with unregisterFormAddNotification.

unregisterFormAddNotification[edit]

unregisterFormAddNotification(object)


getSettingsForm[edit]

getSettingsForm()
Returns the main settings form

getMemoryViewForm[edit]

getMemoryViewForm()
Returns the main memoryview form class object which can be accessed using the Form_ class methods and the methods of the classes it inherits from. There can be multiple memory views, but this will only find the original/base

getMainForm[edit]

getMainForm()
Returns the main form class object which can be accessed using the Form_ class methods and the methods of the classes it inherits from

getLuaEngine[edit]

getLuaEngine()
Returns the lua engine form object (Creates it if needed)

getApplication[edit]

getApplication()
Returns the application object. (the titlebar)

getAddressList[edit]

getAddressList()
Returns the cheat table addresslist object

getFreezeTimer[edit]

getFreezeTimer()
Returns the freeze timer object

getUpdateTimer[edit]

getUpdateTimer()
Returns the update timer object


setGlobalKeyPollInterval[edit]

setGlobalKeyPollInterval(integer)
Sets the global keypoll interval. The interval determines the speed of how often CE checks if a key has been pressed or not.
Lower is more accurate, but eats more cpu power

setGlobalDelayBetweenHotkeyActivation[edit]

setGlobalDelayBetweenHotkeyActivation(integer)
Sets the minimum delay between the activation of the same hotey in milliseconds. Affects all hotkeys that do not set their own minimum delay



undefined property functions. Not all properties of all classes have been explicitly exposed to lua, but if you know the name of a property of a specific class you can still access them (assuming they are declared as published in the pascal class declaration)


getPropertyList[edit]

getPropertyList(class)
Returns a stringlist object containing all the published properties of the specified class: (free the list when done)
Note: not all classed with properties have 'published' properties. E.g: stringlist)

setProperty[edit]

setProperty(class, propertyname, propertyvalue)
Sets the value of a published property of a class: (Won't work for method properties)

getProperty[edit]

getProperty(class, propertyname)
Gets the value of a published property of a class: (Won't work for method properties)

setMethodProperty[edit]

setMethodProperty(class, propertyname, function)
Sets the method property to the specific function

getMethodProperty[edit]

getMethodProperty(Class, propertyname)
Returns a function you can use to call the original function



registerSymbol[edit]

registerSymbol(symbolname, address, OPTIONAL donotsave)
Registers a userdefined symbol. If donotsave is true this symbol will not get saved when the table is saved

unregisterSymbol[edit]

unregisterSymbol(symbolname)
Unregisters a userdefined symbol.


getNameFromAddress[edit]

getNameFromAddress(address)
Returns the given address as a string. Registered symbolname, modulename+offset, or just a hexadecimal string depending on what address

inModule[edit]

inModule(address)
returns true if the given address is inside a module

inSystemModule[edit]

inSystemModule(address)
returns true if the given address is inside a system module

getCommonModuleList[edit]

getCommonModuleList
Returns the commonModuleList stringlist. (Do not free this one)



debugging[edit]

debug variables[edit]

EFLAGS
32-bit: EAX, EBX, ECX, EDX, EDI, ESP, EBP, ESP, EIP
64-bit: RAX, EBX, RBX, RDX, RDI, RSP, RBP, RSP, RIP, R8, R9, R10, R11, R12, R13, R14, R15


Debug related routines[edit]

function debugger_onBreakpoint()
When a breaking breakpoint hits (that includes single stepping) and the lua function debugger_onBreakpoint() is defined it will be called and the global variables EAX, EBX, .... will be filled in
Return 0 if you want the userinterface to be updated and anything else if not (e.g: You continued from the breakpoint in your script)


createProcess[edit]

createProcess(path, parameters OPTIONAL, debug OPTIONAL, breakonentrypoint OPTIONAL)
Creates a process. If debug is true it will be created using the windows debugger and if breakonentry is true it will cause a breakpoint to occur on entrypoint.

debugProcess[edit]

debugProcess(interface OPTIONAL)
starts the debugger for the currently opened process (won't ask the user).
  • interface:
    • 0=default
    • 1=windows debug
    • 2=VEHDebug
    • 3=Kerneldebug


debug_isDebugging[edit]

debug_isDebugging()
Returns true if the debugger has been started

debug_getCurrentDebuggerInterface[edit]

debug_getCurrentDebuggerInterface()
Returns the current debuggerinterface used (1=windows, 2=VEH 3=Kernel, nil=no debugging active)

debug_canBreak[edit]

debug_canBreak()
Returns true if there is a possibility the target can stop on a breakpoint. 6.4+

debug_isBroken[edit]

debug_isBroken()
Returns true if the debugger is currently halted on a thread

debug_getBreakpointList[edit]

debug_getBreakpointList()
Returns a lua table containing all the breakpoint addresses


debug_addThreadToNoBreakList[edit]

debug_addThreadToNoBreakList(threadid)
This will cause breakpoints on the provided thread to be ignored

debug_removeThreadFromNoBreakList[edit]

debug_removeThreadFromNoBreakList(threadid)
removed the threadid from the list


debug_setBreakpoint[edit]

debug_setBreakpoint(address, size OPTIONAL, trigger OPTIONAL, breakpointmethod OPTIONAL, functiontocall() OPTIONAL)
debug_setBreakpoint(address, size OPTIONAL, trigger OPTIONAL, functiontocall() OPTIONAL)
debug_setBreakpoint(address, functiontocall() OPTIONAL)
sets a breakpoint of a specific size at the given address. if trigger is bptExecute then size is ignored. If trigger is ignored then it will be of type bptExecute, which obviously also ignores the size then as well.

debug_removeBreakpoint[edit]

debug_removeBreakpoint(address)
if the given address is a part of a breakpoint it will be removed

debug_continueFromBreakpoint[edit]

debug_continueFromBreakpoint(continueMethod)
if the debugger is currently waiting to continue you can continue with this. Valid parameters are :co_run (just continue), co_stepinto(when on top of a call, follow it), co_stepover (when on top of a call run till after the call).

debug_getXMMPointer[edit]

debug_getXMMPointer(xmmregnr)
Returns the address of the specified xmm register of the thread that is currently broken.
This is a LOCAL Cheat Engine address. Use Local memory access functions to read and modify xmmregnr can be 0 to 15 (0 to 7 on 32-bit).



The following routines describe last branch recording. These functions only work when kernelmode debugging is used and using windows XP (vista and later work less effective or not at all because the operating system interferes. Might also be intel specific. A dbvm upgrade in the future might make this work for windows vista and later)


debug_setLastBranchRecording[edit]

debug_setLastBranchRecording(boolean)
When set the Kernel debugger will try to record the last branch(es) taken before a breakpoint happens

debug_getMaxLastBranchRecord[edit]

debug_getMaxLastBranchRecord()
Returns the maximum branch record your cpu can store (-1 if none)

debug_getLastBranchRecord[edit]

debug_getLastBranchRecord(index)
Returns the value of the Last Branch Record at the given index (when handling a breakpoint)


function debugger_onModuleLoad(modulename, baseaddress)
this routine is called when a module is loaded. Only works for the windows debugger.
Return 1 if you want to cause the debugger to break.


Changing registers:

When the debugger is waiting to continue you can change the register variables. When you continue those register values will be set in the thread's context.


If the target is currently stopped on a breakpoint, but not done through an onBreakpoint function. The context won't be set.

You can get and set the context back with these functions before execution continues"


debug_getContext[edit]

debug_getContext(BOOL extraregs)
Fills the global variables for the regular registers.
If extraregs is true, it will also set FP0 to FP7 and XMM0 to XMM15.

debug_updateGUI[edit]

debug_updateGUI()
Will refresh the userinterface to reflect the new context if the debugger was broken.


detachIfPossible[edit]

detachIfPossible()
Detaches the debugger from the target process (if it was attached).


getComment[edit]

getComment(address)
Gets the userdefined comment at the specified address.

setComment[edit]

setComment(address, text)
Sets a userdefined comment at the specifried address. %s is used to display the autoguess value if there is one.

getHeader[edit]

getHeader(address)
Gets the userdefined header at the specified address.

setHeader[edit]

setHeader(address, text)
Sets the userdefined header at the specified address.

registerBinUtil[edit]

registerBinUtil(config)
Registers a binutils toolset with CE (for assembling and disassembling in other cpu instruction sets)
config is a table containing several fields that describe the tools, and lets you specify extra parameters
  • Name: The displayed name in the binutils menu in memview.
  • Description: The description for this toolset.
  • Architecture: used by the objdump -m<architecture> (required).
  • ASParam: extra parameters to pass on to AS (optional).
  • LDParam: extra parameters to pass on to LD.
  • OBJDUMPParam: extra parameters to pass on to OBJDUMP.
  • OnDisassemble: a lua function that gets called each time an address is disassembled. The return value will be passed on to OBJDUMP.
  • Path: filepath to the binutils set.
  • Prefix: prefix (e.g: "arm-linux-androideabi-").
  • DisassemblerCommentChar: Depending on which target you're disassembling, the comment character can be different. (ARM=";" x86='#' ).



class helper functions[edit]

inheritsFromObject[edit]

inheritsFromObject(object)
Returns true if given any class.

inheritsFromComponent[edit]

inheritsFromComponent(object)
Returns true if the given object inherits from the Component class.

inheritsFromControl[edit]

inheritsFromControl(object)
Returns true if the given object inherits from the Control class.

inheritsFromWinControl[edit]

inheritsFromWinControl(object)
Returns true if the given object inherits from the WinControl class.


createClass[edit]

createClass(classname)
Creates an object of the specified class: (Assuming it's a registered class and has a default constructor).



Class definitions[edit]

Object[edit]

Object class: (Inheritance: )

Properties:

 ClassName: String - The name of class: (Read only)

Methods:

 getClassName(): Returns the classname
 destroy(): Destroys the object


Component[edit]

Component class: (Inheritance: Object)

Properties:

 ComponentCount: Integer - Number of child components . Readonly
 Component[int]: Component - Array containing the child components. Starts at 0. Readonly
 ComponentByName[string]: Component - Returns a component based on the name. Readonly
 Name: string - The name of the component
 Tag: integer - Free to use storage space. (Useful for id's)
 Owner: Component - Returns the owner of this object. Nil if it has none

Methods:

 getComponentCount() : Returns the number of components attached to his component
 getComponent(index) : Returns the specific component
 findComponentByName(name) : Returns the component with this name
 getName() : Return the name
 setName(newname) : Changes the name
 getTag() : Sets an integer value. You can use this for ID's
 setTag(tagvalue) : Get the tag value
 getOwner() : Returns the owner of this component


Control[edit]

Control class: (Inheritance: Component-->Object)

Properties:

 Caption: string - The text of a control
 Top : integer - The x position
 Left : integer - The y position
 Width : integer - The width of the control
 Height : integer - The height of the control
 ClientWidth: integer - The usable width inside the control (minus the borders)
 ClientHeight: integer - The usable height the control (minus the borders)
 Align: AlignmentOption - Alignment of the control
 Enabled: boolean - Determines if the object is usable or greyed out
 Visible: boolean - Determines if the object is visible or not
 Color: ColorDefinition/RGBInteger - The color of the object. Does not affect the caption
 Parent: WinControl - The owner of this control
 PopupMenu: PopupMenu - The popup menu that shows when rightclicking the control
 Font: Font - The font class associated with the control
 OnClick: function - The function to call when a button is pressed

Methods:

 getLeft()
 setLeft(integer)
 getTop()
 setTop(integer)
 getWidth()
 setWidth(integer)
 getHeight()
 setHeight()
 setCaption(caption) : sets the text on a control. All the GUI objects fall in this category
 getCaption() : Returns the text of the control
 setPosition(x,y): sets the x and y position of the object base don the top left position (relative to the client array of the owner object)
 getPosition(): returns the x and y position of the object (relative to the client array of the owner object)
 setSize(width,height) : Sets the width and height of the control
 getSize() : Gets the size of the control
 setAlign(alignmentoption): sets the alignment of the control
 getAlign(alignmentoption): gets the alignment of the control
 getEnabled() : gets the enabled state of the control
 setEnabled(boolean) : Sets the enabled state of the control
 getVisible() : gets the visible state of the control
 setVisible(boolean) : sets the visible state of the control
 getColor() : gets the color
 setColor(rgb) : Sets the color
 getParent() : Returns nil or an object that inherits from the Wincontrol class
 setParent(wincontrol) : Sets the parent for this control
 getPopupMenu()
 setPopupMenu()
 getFont():  Returns the Font object of this object
 setFont():  Assigns a new font object. (Not recommended to use. Change the font object that's already there if you wish to change fonts)
 repaint(): Invalidates the graphical area of the control and forces and update
 update() : Only updates the invalidated areas
 setOnClick(functionnameorstring) : Sets the onclick routine
 getOnClick(): Gets the onclick function
 doClick():  Executes the current function under onClick


GraphicsObject[edit]

GraphicsObject class: (Inheritance: Object)


Region[edit]

Region class: (Inheritance: GraphicsObject-->Object)

 createRegion(): Creates an empty region.

Methods:

 addRectangle(x1, y1, x2, y2): Adds a rectangle to the region
 addPolygon(tablewithcoordinates): Adds an array of 2D locations. (example : {{0,0},{100,100}, {0,100}} for a triangle )

WinControl[edit]

WinControl class: (Inheritance: Control-->Component-->Object)

Properties:

 DoubleBuffered: boolean - Graphical updates will go to a offscreen bitmap which will then be shown on the screen instead of directly to the screen. 
                           May reduce flickering.
 ControlCount : integer - The number of child controls of this wincontrol
 Control[] : Control - Array to access a child control
 OnEnter : function - Function to be called when the WinControl gains focus
 OnExit : function - Function to be called when the WinControl loses focus

Methods:

 getControlCount()  Returns the number of Controls attached to this class
 getControl(index) : Returns a WinControl class object
 getControlAtPos(x,y):  Gets the control at the given x,y position relative to the wincontrol's position
 canFocus(): returns true if the object can be focused
 focused(): returns boolean true when focused
 setFocus(): tries to set keyboard focus the object
 setShape(Region): Sets the region object as the new shape for this wincontrol
 setShape(Bitmap):
 setOnEnter(function) : Sets an onEnter event. (Triggered on focus enter)
 getOnEnter()
 setOnExit(function) : Sets an onExit event. (Triggered on lost focus)
 getOnExit()



MenuItem[edit]

MenuItem class: (Inheritance: Component-->Object)

 createMenuItem(ownermenu) : Creates a menu item that gets added to the owner menu

Properties:

 Caption : String - Text of the menu item
 Shortcut : string - Shortcut in textform to trigger the menuitem
 Count : integer - Number of children attached to this menuitem
 Menu: Menu - The menu this item resides in
 Parent: MenuItem - The menuitem this item hangs under
 MenuIndex: integer - The position this menu item is in it's parent
 Item[] : Array to access each child menuitem
 [] : Item[]
 OnClick: Function to call when the menu item is activated

Methods:

 getCaption() : Gets the caption of the menu item
 setCaption(caption) : Sets the caption of the menu item
 getShortcut(): Returns the shortcut for this menu item
 setShortcut(shortcut): Sets the shortcut for this menuitem. A shortcut is a string in the form of ("ctrl+x")
 getCount()
 getItem(index) : Returns the menuitem object at the given index
 add(menuitem) : Adds a menuItem as a submenu item
 insert(index, menuitem): Adds a menuItem as a submenu item at the given index
 delete(index)
 setOnClick(function) : Sets an onClick event
 getOnClick()
 doClick(): Executes the onClick method if one is assigned


Menu[edit]

Menu class: (Inheritance: Component-->Object)

Properties:

 Items : MenuItem - The base MenuItem class of this menu (readonly)

Methods:

 getItems() : Returns the main MenuItem of this Menu


MainMenu[edit]

MainMenu class: (Inheritance: Menu-->Component-->Object)

 createMainMenu(form)

The main menu is the menu at the top of a window.

PopupMenu[edit]

PopupMenu class: (Inheritance: Menu-->Component-->Object)

 createPopupMenu(owner)

The popup menu is the menu that pops up when showing the (rightclick) context of an control

Strings[edit]

Strings class: (Inheritance : Object) (Mostly an abstract class)

Properties:

 Text : String - All the strings in one string
 Count: Integer - The number of strings in this list
 String[]: String - Array to access one specific string in the list
 [] = String[]

Methods:

 clear() : Deletes all strings in the list
 add(string) : adds a string to the list
 delete(index) : Deletes a string from the list
 getText() : Returns all the strings as one big string
 setText() : Sets the strings of the given strings object to the given text (can be multiline)
 indexOf(string): Returns the index of the specified string. Returns -1 if not found
 insert(index, string): Inserts a string at a specific spot moving the items after it
 getCount(): Returns the number is strings in the list
 remove(string); Removes the given string from the list
 loadFromFile(filename) : Load the strings from a textfile
 saveToFile(filename) : Save the strings to a textfile
 getString(index) : gets the string at the given index
 setString(index, string) : Replaces the string at the given index


Stringlist[edit]

Stringlist class: (Inheritance : Strings-->Object)

 createStringlist() : Creates a stringlist class object (for whatever reason, lua strings are probably easier to use)

Properties:

 Duplicates : DuplicatesType - Determines how duplicates should be handled
 Sorted : boolean - Determines if the list should be sorted
 CaseSensitive: boolean - Determines if the list is case sensitive or not.

Methods:

 getDuplicates() : returns the duplicates property
 setDuplicates(Duplicates) : Sets the duplicates property (dupIgnore, dupAccept, dupError)
 getSorted() : returns true if the list has the sorted property
 setSorted(boolean) : Sets the sorted property
 getCaseSensitive() : Returns true if the case sensitive property is set
 setCaseSensitive(boolean): Sets the case sensitive property



Application[edit]

Application class: (Inheritance: CustomApplication-->Component-->Object)

Properties:

 Title: The title of cheat engine in the bar

Methods:

 bringToFront(): Shows the cheat engine app


Form[edit]

Form class: (Inheritance: ScrollingWinControl-->CustomControl-->WinControl-->Control-->Component-->Object)

Properties:

 AllowDropFiles: boolean - Allows files to be dragged into the form
 ModalResult: integer - The current ModalResult value of the form. Note: When this value gets set the modal form will close
 Menu: MainMenu - The main menu of the form
 OnClose: function(sender) - The function to call when the form gets closed
 OnDropFiles: function(sender, {filenames}) - Called when files are dragged on top of the form. Filenames is an arraytable with the files

Methods:

 centerScreen(); : Places the form at the center of the screen
 hide() : Hide the form
 show() : show the form
 close():  Closes the form. Without an onClose this will be the same as hide
 bringToFront(): Brings the form to the foreground
 showModal() : show the form and wait for it to close and get the close result
 isForegroundWindow(): returns true if the specified form has focus
 setOnClose(function)  : function (sender) : Return a CloseAction to determine how to close the window
 getOnClose() : Returns the function
 getMenu() : Returns the mainmenu object of this form
 setMenu(mainmenu)
 setBorderStyle( borderstyle):  Sets the borderstyle of the window
 getBorderStyle()
 printToRasterImage(rasterimage): Draws the contents of the form to a rasterimage class object
 dragNow():  Call this on mousedown on any object if you wish that the mousemove will drag the whole form arround. 
             Useful for borderless windows (Dragging will stop when the mouse button is released)


CEForm[edit]

CEForm class: (Inheritance: Form-->ScrollingWinControl-->CustomControl-->WinControl-->Control-->Component-->Object)

 createForm(visible OPT): creates a CEForm class object(window) and returns the pointer for it. Visible is default true but can be changed
 createFormFromFile(filename): Returns the generated CEform

Properties:

 DoNotSaveInTable: boolean - Set this if you do not wish to save the forms in the table

Methods:

 saveToFile(filename): Saves a userdefined form
 getDoNotSaveInTable(): Returns the DoNotSaveInTable property
 setDoNotSaveInTable(boolean): Sets the DoNotSaveInTable property


GraphicControl[edit]

GraphicControl class: (Inheritance: Control-->Component-->Object)

Properties:

 Canvas: Canvas - The canvas for rendering this control

Methods:

 getCanvas() : Returns the Canvas object for the given object that has inherited from customControl


PaintBox[edit]

PaintBox class: (Inheritance: GraphicControl-->Control-->Component-->Object)

 createPaintBox(owner): Creates a Paintbox class object


Label[edit]

Label class: (Inheritance: GraphicControl-->Control-->Component-->Object)

 createLabel(owner): Creates a Label class object which belongs to the given owner. Owner can be any object inherited from WinControl


Splitter[edit]

Splitter class: (Inheritance: CustomControl-->WinControl-->Control-->Component-->Object)

 createSplitter(owner): Creates a Splitter class object which belongs to the given owner. Owner can be any object inherited from WinControl


Panel[edit]

Panel class: (Inheritance: CustomControl-->WinControl-->Control-->Component-->Object)

 createPanel(owner): Creates a Panel class object which belongs to the given owner. Owner can be any object inherited from WinControl

Properties:

 Alignment: alignment
 BevelInner: panelBevel
 BevelOuter: panelBevel
 BevelWidth: Integer
 FullRepaint: boolean

Methods:

 getAlignment() : gets the alignment property
 setAlignment(alignment) : sets the alignment property
 getBevelInner()
 setBevelInner(PanelBevel)
 getBevelOuter()
 setBevelOuter(PanelBevel)
 getBevelWidth()
 setBevelWidth(BevelWidth)
 getFullRepaint()
 setFullRepaint(boolean)


Image[edit]

Image class: (Inheritance: GraphicControl-->Control-->Component-->Object)

 createImage(owner): Creates an Image class object which belongs to the given owner. Owner can be any object inherited from WinControl

Properties:

 Canvas: Canvas - The canvas object to access the picture of the image
 Transparent: boolean - Determines if some parts of the picture are see through (usually based on the bottomleft corner)
 Stretch: boolean - Determines if the picture gets stretched when rendered in the image component
 Picture: Picture - The picture to render

Methods:

 loadImageFromFile(filename)
 getStretch()
 setStretch(boolean)
 getTransparent()
 setTransparent(boolean)
 getCanvas()
 setPicture(picture)
 getPicture() : Returns the Picture object of this image


Edit[edit]

Edit class: (Inheritance: WinControl-->Control-->Component-->Object)

 createEdit(owner): Creates an Edit class object which belongs to the given owner. Owner can be any object inherited from WinControl

Properties:

 Text: string - The current contents of the editfield
 OnChange: function - The function to call when the editfield is changed

Methods:

 clear()
 selectAll()
 clearSelection()
 copyToClipboard()
 cutToClipboard()
 pasteFromClipboard()
 onChange(function)


Memo[edit]

Memo class: (Inheritance: Edit-->WinControl-->Control-->Component-->Object)

 createMemo(owner): Creates a Memo class object which belongs to the given owner. Owner can be any object inherited from WinControl

Properties:

 Lines: Strings - Strings object for this memo
 WordWrap: boolean - Set if words at the end of the control should go to the next line
 WantTabs: Boolean - Set if tabs will add a tab to the memo. False if tab will go to the next control
 WantReturns: Boolean - Set if returns will send a event or not
 Scrollbars: Scrollstyle - Set the type of ascrollbars to show (ssNone, ssHorizontal, ssVertical, ssBoth, ssAutoHorizontal, ssAutoVertical, ssAutoBoth)

Methods:

 append(string)
 getLines() : returns a Strings class
 getWordWrap()
 setWordWrap(boolean)
 getWantTabs()
 setWantTabs(boolean)
 getWantReturns()
 setWantReturns(boolean)
 getScrollbars()
 setScrollbars(scrollbarenumtype) :
 Sets the scrollbars. Horizontal only takes affect when wordwrap is disabled
 valid enum types:
   ssNone : No scrollbars
   ssHorizontal: Has a horizontal scrollbar
   ssVertical: Has a vertical scrollbar
   ssBoth: Has both scrollbars
   ssAutoHorizontal: Same as above but only shows when there actually is something to scroll for
   ssAutoVertical: " " " " ...
   ssAutoBoth: " " " " ...


ButtonControl[edit]

ButtonControl class: (Inheritance: WinControl-->Control-->Component-->Object)


Button[edit]

Button class: (Inheritance: ButtonControl-->WinControl-->Control-->Component-->Object)

 createButton(owner): Creates a Button class object which belongs to the given owner. Owner can be any object inherited from WinControl

Properties:

 ModalResult: ModalResult - The result this button will give the modalform when clicked

Methods:

 getModalResult(button)
 setModalResult(button, mr)


CheckBox[edit]

CheckBox class: (Inheritance: ButtonControl-->WinControl-->Control-->Component-->Object)

 createCheckBox(owner): Creates a CheckBox class object which belongs to the given owner. Owner can be any object inherited from WinControl

Properties:

 Checked: boolean - True if checked
 AllowGrayed: boolean - True if it can have 3 states. True/False/None
 State: checkboxstate - The state. (cbUnchecked=0, cbChecked=1, cbGrayed=2)
 OnChange: function - Function to call when the state it changed

Methods:

 getAllowGrayed()
 setAllowGrayed(boolean)
 getState(): Returns a state for the checkbox. (cbUnchecked, cbChecked, cbGrayed)
 setState(boolean): Sets the state of the checkbox
 onChange(function)


ToggleBox[edit]

ToggleBox class: (Inheritance: CheckBox-->ButtonControl-->WinControl-->Control-->Component-->Object)

 createToggleBox(owner): Creates a ToggleBox class object which belongs to the given owner. Owner can be any object inherited from WinControl


GroupBox[edit]

GroupBox class: (Inheritance: WinControl-->Control-->Component-->Object)

 createGroupBox(owner): Creates a GroupBox class object which belongs to the given owner. Owner can be any object inherited from WinControl


RadioGroup[edit]

RadioGroup class: (Inheritance: GroupBox-->WinControl-->Control-->Component-->Object)

 createRadioGroup(owner): Creates a RadioGroup class object which belongs to the given owner. Owner can be any object inherited from WinControl

Properties:

 Items: Strings - Strings derived object containings all the items in the list
 Columns: Integer - The number of columns to split the items into
 ItemIndex: Integer - The currently selected item
 OnClick: Called when the control is clicked

Methods:

 getRows(): Returns the number of rows
 getItems(): Returns a Strings object
 getColumns(): Returns the nuber of columns
 setColumns(integer)
 getItemIndex()
 setItemIndex(integer)
 setOnClick(function)
 getOnClick()


ListBox[edit]

ListBox class: (Inheritance: WinControl-->Control-->Component-->Object)

 createListBox(owner): Creates a ListBox class object which belongs to the given owner. Owner can be any object inherited from WinControl

Properties:

 MultiSelect: boolean - When set to true you can select multiple items
 Items: Strings - Strings derived object containings all the items in the list
 Selected[] - Returns true if the given line is selected. Use Items.Count-1 to find out the max index
 ItemIndex: integer - Get selected index. -1 is nothing selected
 Canvas: Canvas - The canvas object used to render on the object

Methods:

 clear()
 clearSelection() : Deselects all items in the list
 selectAll(): Selects all items in the list
 getItems(): Returns a strings object
 setItems(Strings): sets a strings object to the listbox
 getItemIndex()
 setItemIndex(integer)
 getCanvas()


Calendar[edit]

Calendar class: (Inheritance: WinControl-->Control-->Component-->Object)

 createCalendar(owner): 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".

Properties:

 Date: string - current date of the Calendar, format: yyyy-mm-dd
 DateTime: number - days since December 30, 1899

Methods:

 getDateLocalFormat - returns current date of the Calendar, format: ShortDateFormat from OS local settings


ComboBox[edit]

ComboBox class: (Inheritance: WinControl-->Control-->Component-->Object)

 createComboBox(owner): Creates a ComboBox class object which belongs to the given owner. Owner can be any object inherited from WinControl

Properties:

 Items: Strings - Strings derived object containings all the items in the list
 ItemIndex: integer - Get selected index. -1 is nothing selected
 Canvas: Canvas - The canvas object used to render on the object

Methods:

 clear()
 getItems()
 setItems()
 getItemIndex()
 setItemIndex(integer)
 getCanvas()


ProgressBar[edit]

ProgressBar class: (Inheritance: WinControl-->Control-->Component-->Object)

 createProgressBar(owner): Creates a ProgressBar class object which belongs to the given owner. Owner can be any object inherited from WinControl

Properties:

 Min: integer - The minimum positionvalue the progressbar can have (default 0)
 Max: integer - The maximum positionvalue the progressbar can have (default 100
 Position: integer - The position of the progressbar
 Step: integer- The stepsize to step by when stepIt() is called

Methods:

 stepIt() - Increase position with "Step" size
 stepBy(integer) - increase the position by the given integer value
 getMax() - returns the Max property
 setMax(integer) - sets the max property
 getMin() - returns the min property
 setMin(integer)- sets the min property
 getPosition() - returns the current position
 setPosition(integer) - sets the current position


TrackBar[edit]

TrackBar class: (Inheritance: WinControl-->Control-->Component-->Object)

 createTrackBar(owner): Creates a TrackBar class object which belongs to the given owner. Owner can be any object inherited from WinControl

Properties:

 Min: integer - Minimal value for the trackbar
 Max: integer - Maximum value for the trackbar
 Position: integer - The current position
 OnChange: function - Function to call when

Methods:

 getMax()
 setMax(integer)
 getMin(trackbar)
 setMin(trackbar, integer)
 getPosition(progressbar)
 setPosition(progressbar, integer)
 getOnChange(function)
 setOnChange()



CollectionItem[edit]

CollectionItem class: (Inheritance: Object)

Base class for some higher level classes. Often used for columns

Properties:

 ID: integer
 Index: integer - The index in the array this item belong to
 DisplayName: string

Methods:

 getID()
 getIndex()
 setIndex()
 getDisplayName()
 setDisplayName()


ListColumn[edit]

ListColumn class: (Inheritance: CollectionItem-->Object)

Properties:

 AutoSize: boolean
 Caption: string
 MaxWidth: integer
 MinWidth: integer
 Width: integer
 Visible: boolean

Methods:

 getAutosize()
 setAutosize(boolean)
 getCaption()
 setCaption(caption)
 getMaxWidth()
 setMaxWidth(width)
 getMinWidth()
 setMinWidth(width)
 getWidth()
 setWidth(width)


Collection[edit]

Collection class: (Inheritance: TObject)

Properties:

 Count: integer

Methods:

 clear(collection)
 getCount(collection)
 delete(collection, index)


ListColumns[edit]

ListColumns class: (Inheritance: Collection-->Object)

Properties:

 Columns[]: Array to access a column
 [] = Columns[]

Methods:

 add(): Returns a new ListColumn object
 getColumn(index): Returns a ListColumn object;
 setColumn(index, listcolumns): Sets a ListColumn object (not recommended, use add instead)

ListItem[edit]

ListItem class: (Inheritance: TObject)

Properties:

 Caption: boolean - The text of this listitem
 Checked: boolean - Determines if the checkbox is checked (if it has a checkbox)
 SubItems: Strings - The Strings object that hold the subitems
 Selected: boolean - Returns true if selected
 Index: integer - The index in the Items object of the owner of this listitem (readonly)
 Owner: ListItems - The ListItems object that owns this ListItem (readonly)

Methods:

 delete()
 getCaption() : Returns the first columns string of the listitem
 setCaption(string) : Sets the first column string of the listitem
 getChecked() : Returns true if the listitem is checked
 setChecked(boolean): Sets the checkbox of the listbox to the given state
 getSubItems(): Returns a Strings object
 makeVisible(partial): Scrolls the listview so this item becomes visible (Cheat Engine 6.4 and later)


ListItems[edit]

ListItems class: (Inheritance: TObject)

Properties:

 Count : Integer - The number of ListItems this object holds (Normally read only, but writable if OwnerData is true in the listview)
 Item[]: ListItem[] - Array to access each ListItem object
 [] = Item[]

Methods:

 clear()
 getCount()
 getItem(integer) : Return the listitem object at the given index
 add(): Returns a new ListItem object


Listview[edit]

Listview class: (Inheritance: WinControl-->Control-->Component-->Object)

 createListView(owner): Creates a ListView class object which belongs to the given owner. Owner can be any object inherited from WinControl

Properties:

 Columns: ListColumns - The Listcolumns object of the listview (Readonly)
 Items: ListItems - The ListItems objects of the listview
 ItemIndex: integer - The currently selected index in the Items object  (-1 if nothing is selected)
 Selected: ListItem - The currently selected listitem (nil if nothing is selected)
 Canvas: Canvas - The canvas object used to render the listview  (Readonly)
 AutoWidthLastColumn: Boolean - When set to true the last column will resize when the control resizes
 HideSelection: Boolean - When set to true the selection will not hide when the focus leaves the control
 RowSelect: Boolean - When set to true the whole row will be selected instead of just the first column
 OwnerData: Boolean - When set to true the listview will call the onData function for every line being displayed. 
                       Use Items.Count to set the number of virtual lines.
 OnData: function(sender, ListItem) - Called when a listview with OwnerData true renders a line

Methods:

 clear()
 getColumns() : ListColumns - Returns a ListColumns object
 getItems(): ListItems - Returns a ListItems object
 getItemIndex(): integer -  Returns the currently selected index in the Items object
 setItemIndex(index: integer)- Sets the current itemindex
 getCanvas() : Canvas - Returns the canvas object used to render the listview


TreeNode[edit]

TreeNode class: (Inheritance: TObject)

Properties:

 Text: string - The text of the treenode
 Parent: Treenode - The treenode this object is a child of. (can be nil) (ReadOnly)
 Level: Integer - The level this node is at
 HasChildren: boolean - Set to true if it has children, or you wish it to have an expand sign
 Expanded: boolean - Set to true if it has been expanded
 Count : Integer - The number of children this node has
 Items[]: Treenode - Array to access the child nodes of this node
 [] = Items[]
 Index: Integer - The index based on the parent
 AbsoluteIndex: Integer - The index based on the TreeView's Treenodes object (Items)
 Selected: Boolean - Set to true if currently selected
 MultiSelected: Boolean - Set to true if selected as well, but not the main selected object
 Data: Pointer - Space to store 4 or 8 bytes depending on which version of CE is used

Methods:

 delete()
 deleteChildren()
 makeVisible()
 expand(recursive:boolean=TRUE OPTIONAL) : Expands the given node
 collapse(recursive:boolean=TRUE OPTIONAL)  : collapses the given node
 getNextSibling(): Returns the treenode object that's behind this treenode on the same level
 add(text:string): Returns a Treenode object that is a child of the treenode used to create it


TreeNodes[edit]

TreeNodes class: (Inheritance: TObject)

Properties:

 Count : Integer - The total number of Treenodes this object has
 Item[]: TreeNode - Array to access each node
 [] = Item[]

Methods:

 clear()
 getCount()
 getItem(integer) : Return the TreeNode object at the given index (based on the TreeView's Treenodes)
 add(text:string): Returns a new root Treenode object
 insert(treenode, string): Returns a new treenode object that has been inserted before the given treenode
 insertBehind(treenode, string): Returns a new treenode object that has been inserted after the given treenode


Treeview[edit]

Treeview class: (Inheritance: CustomControl-->WinControl-->Control-->Component-->Object)

 createTreeView(owner)

Properties:

 Items: TreeNodes - The Treenodes object of the treeview (ReadOnly)
 Selected: TreeNode - The currently selected treenode

Methods:

 getItems()
 getSelected()
 setSelected()
 fullCollapse()  : Collapses all the nodes, including the children's nodes
 fullExpand() : Expands all the nodes and all their children
 saveToFile(filename): Saves the contents of the treeview to disk



Timer[edit]

Timer class: (Inheritance: Component-->Object)

 createTimer(owner OPT, enabled OPT): Creates a timer object. If enabled is not given it will be enabled by default (will start as soon as an onTimer event has been assigned)
                                       Owner may be nil, but you will be responsible for destroying it instead of being the responsibility of the owner object)

Properties:

 Interval: integer - The number of milliseconds (1000=1 second) between executions
 Enabled: boolean
 OnTimer: function(timer) - The function to call when the timer triggers

Methods:

 getInterval()
 setInterval(interval) : Sets the speed on how often the timer should trigger. In milliseconds (1000=1 second)
 getOnTimer()
 setOnTimer(function(timer))
 getEnabled()
 setEnabled(boolean)



CustomControl[edit]

CustomControl class: (CustomControl-->WinControl-->Control-->Component-->Object)

Properties:

 Canvas : The canvas object for drawing on the control/. Readonly

Methods:

 getCanvas() : Returns the Canvas object for the given object that has inherited from customControl


Canvas[edit]

Canvas class: (Inheritance: CustomCanvas-->Object)

Properties:

 Brush: Brush - The brush object
 Pen: Pen - The pen object
 Font: Font - The font object
 Width: integer - Width of the canvas
 Height: integer - Height of the canvas

Methods:

 getBrush(): Returns the brush object of this canvas
 getPen(): Returns the pen object of this canvas
 getFont(): Returns the font object of this canvas
 getWidth()
 getHeight()
 getPenPosition()
 setPenPosition(x,y)
 clear() - Clears the canvas
 line(sourcex, sourcey, destinationx, destinationy)
 lineTo(destinationx, destinationy)
 rect(x1,y1,x2,y2)
 fillRect(x1,y1,x2,y2)
 textOut(x,y, text)
 getTextWidth(text)
 getTextHeight(text)
 getPixel(x,y)
 setPixel(x,y,color)
 floodFill(x,y)
 ellipse(x1,y1,x2,y2)
 gradientFill(x1,y1,x2,y2, startcolor, stopcolor, direction) : Gradient fills a rectangle. 
                                                               Direction can be 0 or 1. 0=Vertical 1=Horizontal
 copyRect(dest_x1,dest_y1,dest_x2,dest_y2, sourceCanvas, source_x1,source_y1,source_x2,source_y2) : Draws an image from one source to another. Useful in cases of doublebuffering.
 draw(x,y, graphic) : Draw the image of a specific Graphic class
 getClipRect() : Returns a table containing the fields Left, Top, Right and Bottom, which define the invalidated region of the graphical object. Use this to only render what needs to be rendered in the onPaint event of objects.


Pen[edit]

Pen class: (Inheritance: CustomPen-->CanvasHelper-->Object)

Properties:

 Color: Integer - The color of the pen
 Width: integer - Thickness of the pen

Methods:

 getColor()
 setColor(color)
 getWidth()
 setWidth(width)


Brush[edit]

Brush class: (Inheritance: CustomBrush-->CanvasHelper-->Object)

Properties:

 Color : Integer

Methods:

 getColor()
 setColor()


Font[edit]

Font class: (Inheritance: CustomFont-->CanvasHelper-->Object) createFont(): Returns a font object (default initialized based on the main ce window)

Properties:

 Name: string
 Size: integer
 Color: integer

Methods:

 getName(): Gets the fontname of the font
 setName(string): Sets the fontname of the font
 getSize(): Gets the size of the font
 setSize(integer): Sets the size of the font
 getColor(): Gets the color of the font
 setColor(integer): Sets the color of the font
 assign(font): Copies the contents of the font given as parameter to this font


Graphic[edit]

Graphic class: (Inheritance: Object) : Abstract class

Properties:

 Width: integer
 Height: integer
 Transparent: boolean

Methods:

 getWidth(graphic): Gets the current width in pixels of this graphics object
 setWidth(graphic, width): Sets thw width in pixels
 getHeight(graphic)
 setHeight(graphic, height)


RasterImage[edit]

RasterImage class: (Inheritance: Graphic-->Object) : Base class for some graphical controls

Properties:

 Canvas: Canvas
 PixelFormat: PixelFormat - the pixelformat for this image. Will clear the current image if it had one. Supported pixelformats: pf1bit, pf4bit, pf8bit, pf15bit, pf16bit, pf24bit, pf32bit (recommended)
 TransparentColor: integer

Methods:

 getCanvas(): Returns the Canvas object for this image
 getPixelFormat():  Returns the current pixelformat
 getPixelFormat(pixelformat):  Sets the pixelformat for this image. Will clear the current image if it had one. Supported pixelformats: pf1bit, pf4bit, pf8bit, pf15bit, pf16bit, pf24bit, pf32bit (recommended)
 setTransparentColor(integer): Sets the color that will be rendered as transparent when drawn
 getTransparentColor():  Returns the color set to be transparent


Bitmap[edit]

Bitmap class: (Inheritance: CustomBitmap-->RasterImage-->Graphic-->Object) : Bitmap based Graphic object

 createBitmap(width, height) - Returns a Bitmap object


PortableNetworkGraphic[edit]

PortableNetworkGraphic Class: (Inheritence: CustomBitmap-->RasterImage-->Graphic-->Object)

 createPNG(width, height) - Returns a PortableNetworkGraphic object


JpegImage[edit]

JpegImage Class: (Inheritence: CustomBitmap-->RasterImage-->Graphic-->Object)

 createJpeg(width, height) - Returns a Jpeg object


Picture[edit]

Picture class: (Inheritance: Object) : Container for the Graphic class

 createPicture() : Returns a empty picture object

Properties:

 Graphic
 PNG
 Bitmap
 Jpeg

Methods:

 loadFromFile(filename)
 saveToFile(filename)
 loadFromStream(stream, originalextension OPTIONAL) : Loads a picture from a stream. Note that the stream position must be set to the start of the picture
 assign(sourcepicture)
 getGraphic() : Gets the Graphic object of this picture
 getPNG(): Returns a PortableNetworkGraphic Class object (Can be used from scratch)
 getBitmap(): Returns a Bitmap Class object (Can be used from scratch)
 getJpeg(): Returns a JpegImage Class object (Picture must be initialized with a jpeg file first)



GenericHotkey[edit]

GenericHotkey class: (Inheritance: Object)

 createHotkey(function, keys, ...) : returns an initialized GenericHotkey class object. Maximum of 5 keys
 createHotkey(function, {keys, ...}) : ^

Properties:

 DelayBetweenActivate: integer - Interval in milliseconds that determines the minimum time between hotkey activations. If 0, the global delay is used
 onHotkey: The function to call when the hotkey is pressed

Methods:

 getKeys()
 setKeys(key, ....)
 setOnHotkey(table)
 getOnHotkey


CommonDialog[edit]

CommonDialog class: (Inheritance: Object)

 Properties:
   OnShow: function(sender)
   OnClose: function(sender)
   Title: string - The caption at top of the dialog
 Methods:
   Execute() : Shows the dialog and return true/false depending on the dialog


FindDialog[edit]

FindDialog class: (Inheritance: CommonDialog-->Component-->Object)

Properties:

 FindText: String - The text the user wishes to find
 Options: Enum - Find Options
                  { frDown, frFindNext, frHideMatchCase, frHideWholeWord,
                    frHideUpDown, frMatchCase, frDisableMatchCase, frDisableUpDown,
                    frDisableWholeWord, frReplace, frReplaceAll, frWholeWord, frShowHelp,
                    frEntireScope, frHideEntireScope, frPromptOnReplace, frHidePromptOnReplace }
 OnFind: function (sender) - Called when the find button has been clicked
 OnHelp: function (sender) - Called when the help button is visible (see Options) and clicked

Methods:

 -


FileDialog[edit]

FileDialog class: (Inheritance: CommonDialog-->Component-->Object)

Properties:

 DefaultExt: string - When not using filters this will be the default extention used if no extension is given
 Files: Strings - Stringlist containing all selected files if multiple files are selected
 FileName: string - The filename that was selected
 Filter: string - A filter formatted string
 FilterIndex: integer - The index of which filter to use
 InitialDir: string - Sets the folder the filedialog will show first

Methods:

 -


OpenDialog[edit]

OpenDialog class: (Inheritance: FileDialog-->CommonDialog-->Component-->Object)

 createOpenDialog(owner) : Creates an opendialog object

Properties:

 Options: String
   A string formatted as "[param1, param2, param3]" to set OpenDialogs options
   Valid parameters are:
     ofReadOnly,
     ofOverwritePrompt  : if selected file exists shows a message, that file will be overwritten
     ofHideReadOnly     : hide read only file
     ofNoChangeDir      : do not change current directory
     ofShowHelp         : show a help button
     ofNoValidate
     ofAllowMultiSelect : allow multiselection
     ofExtensionDifferent
     ofPathMustExist    : shows an error message if selected path does not exist
     ofFileMustExist    : shows an error message if selected file does not exist
     ofCreatePrompt
     ofShareAware
     ofNoReadOnlyReturn : do not return filenames that are readonly
     ofNoTestFileCreate
     ofNoNetworkButton
     ofNoLongNames
     ofOldStyleDialog
     ofNoDereferenceLinks : do not expand filenames
     ofEnableIncludeNotify
     ofEnableSizing     : dialog can be resized, e.g. via the mouse
     ofDontAddToRecent  : do not add the path to the history list
     ofForceShowHidden  : show hidden files
     ofViewDetail       : details are OS and interface dependent
     ofAutoPreview      : details are OS and interface dependent

Methods:

 -


SaveDialog[edit]

SaveDialog class: (Inheritance: OpenDialog-->FileDialog-->CommonDialog-->Component-->Object)

 createSaveDialog(owner)


SelectDirectoryDialog[edit]

SelectDirectoryDialog class: (Inheritance: OpenDialog-->FileDialog-->CommonDialog-->Component-->Object)

 createSelectDirectoryDialog(owner)


Stream[edit]

Stream class: (Inheritance: Object)

Properties:

 Size: integer
 Position: integer

Methods:

 copyFrom(stream, count) - Copies count bytes from the given stream to this stream
 read(count): bytetable - Returns a bytetable containing the bytes of the stream. This increases the position
 write(bytetable, count OPTIONAL)- Writes the given bytetable to the stream

MemoryStream[edit]

MemoryStream class: (Inheritance: Stream-->Object)

 createMemoryStream()

Properties:

 Memory: Integer - The address in Cheat Engine's memory this stream is loaded (READONLY, tends to change)

Methods:

 loadFromFile(filename) : Replaces the contents in the memory stream with the contents of a file on disk
 saveToFile(filename) : Writes the contents of the memory stream to the specified file


FileStream[edit]

FileStream class: (Inheritance: HandleStream-->Stream-->Object)

createFileStream(filename, mode)

StringStream[edit]

StringStream class: (Inheritance: Stream-->Object)

createStringStream(string)

Properties:

DataString: The internal string

TableFile[edit]

TableFile class: (Inheritance: Object)

 findTableFile(filename): Returns the TableFile class object for the saved file

Properties:

 Name: string
 Stream: MemoryStream

Methods:

 saveToFile(filename)
 getData() : Gets a MemoryStream object



xmplayer[edit]

xmplayer class: (Inheritance: Object)

 The xmplayer class has already been defined as xmplayer, no need to create it manually

Properties:

 IsPlaying: boolean - Indicator that the xmplayer is currently playing a xm file
 Initialized: boolean - Indicator that the xmplayer is actually actively loaded in memory

Methods:

 setVolume(int)
 playXM(filename, OPTIONAL noloop)
 playXM(tablefile, OPTIONAL noloop)
 playXM(Stream, OPTIONAL noloop)
 pause()
 resume()
 stop()



CheatComponent[edit]

CheatComponent class: (Inheritance: WinControl-->Control-->Component-->Object)

 The cheatcomponent class is the component used in Cheat Engine 5.x trainers
 Most people will probably want to design their own components but for those that don't know much coding and use the autogenerated trainer this will be used

Properties:

 Color: Integer - background color
 Textcolor: integer - text color
 Activationcolor: integer - The textcolor to show when activated is true
 Activated: boolean - Toggles between the ActivationColor and the TextColor
 Editleft:integer - The x position of the optional edit field
 Editwidth: integer - the width of the optional edit field
 Editvalue:string - The string of the optional edit field
 Hotkey:string read - The hotkeypart of the cheat line
 Description:string - Description part of the cheat line
 Hotkeyleft: integer - The x position of the hotkey line
 Descriptionleft:integer - The x position of the Description line
 ShowHotkey: boolean - Decides if the hotkey label should be shown
 HasEditBox: boolean - Decides if the editbox should be shown
 HasCheckbox: boolean - Decides if the checkbox should be shown
 Font: Font - The font to use to render the text

Methods:

 -


MemoryRecordHotkey[edit]

MemoryRecordHotkey class: (Inheritance: Object)

 The memoryrecord hotkey class is mainly readonly with the exception of the event properties to be used to automatically create trainers
 Use the genreric hotkey class if you wish to create your own hotkeys

Properties:

 Owner: MemoryRecord - The memoryrecord this hotkey belongs to (ReadOnly)
 ID: integer - Unique id of this hotkey (ReadOnly)
 Description: string - The description of this hotkey (ReadOnly)
 HotkeyString: string - The hotkey formatted as a string (ReadOnly)
 OnHotkey: function(sender) - Function to be called when a hotkey has just been pressed
 OnPostHotkey: function(sender) - Function to be called when a hotkey has been pressed and the action has been performed

Methods:

 doHotkey: Executes the hotkey as if it got triggered by the keyboard


MemoryRecord[edit]

MemoryRecord class: (Inheritance: Object)

 The memoryrecord objects are the entries you see in the addresslist

Properties:

 ID: Integer - Unique ID
 Index: Integer - The index ID for this record. 0 is top. (ReadOnly)
 Description: string- The description of the memory record
 Address: string - Get/set the interpretable address string. Useful for simple address settings.
 OffsetCount: integer - The number of offsets. Set to 0 for a normal address
 Offset[]: integer - Array to access each offset
 CurrentAddress: integer - The address the memoryrecord points to
 Type: ValueType - The variable type of this record. See vtByte to vtCustom
   If the type is vtString then the following properties are available:
    String.Size: Number of characters in the string
    String.Unicode: boolean
   If the type is vtBinary then the following properties are available
     Binary.Startbit: First bit to start reading from
     Binary.Size: Number of bits
   If the type is vtByteArray then the following properties are available
     Aob.Size: Number of bytes
 CustomTypeName: String - If the type is vtCustomType this will contain the name of the CustomType
 Script: String - If the type is vtAutoAssembler this will contain the auto assembler script
 Value: string - The value in stringform.
 Selected: boolean - Set to true if selected (ReadOnly)
 Active: boolean - Set to true to activate/freeze, false to deactivate/unfreeze
 Color: integer
 ShowAsHex: boolean - Self explanatory
 ShowAsSigned: boolean - Self explanatory
 AllowIncrease: boolean - Allow value increasing, unfreeze will reset it to false
 AllowDecrease: boolean - Allow value decreasing, unfreeze will reset it to false
 Count: Number of children
 Child[index]: Array to access the child records
 [index] = Child[index]
 HotkeyCount: integer - Number of hotkeys attached to this memory record
 Hotkey[]: Array to index the hotkeys
 OnActivate: function(memoryrecord,before,currentstate):boolean - The function to call when the memoryrecord will change (or changed) Active to true. 
               If before is true, not returning true will cause the activation to stop.
 OnDeactivate: function(memoryrecord,before,currentstate):boolean - The function to call when the memoryrecord will change (or changed) Active to false. 
                 If before is true, not returning true will cause the deactivation to stop.
 OnDestroy: function() - Called when the memoryrecord is destroyed.
 DontSave: boolean - Don't save this memoryrecord and it's children

Methods:

 getDescription()
 setDescription()
 getAddress(): Returns the interpretable addressstring of this record. If it is a pointer, it returns a second result as a table filled with the offsets
 setAddress(string): Sets the interpretable address string, and if offsets are provided make it a pointer
 getOffsetCount(): Returns the number of offsets for this memoryrecord
 setOffsetCount(integer): Lets you set the number of offsets
 getOffset(index): Gets the offset at the given index
 setOffset(index, value): Sets the offset at the given index
 getCurrentAddress(): Returns the current address as an integer (the final result of the interpretable address and pointer offsets)
 appendToEntry(memrec): Appends the current memory record to the given memory record
 getHotkey(index): Returns the hotkey from the hotkey array
 getHotkeyByID(integer): Returns the hotkey with the given id


Addresslist[edit]

Addresslist class: (Inheritance: Panel-->WinControl-->Control-->Component-->Object)

Properties:

 Count: Integer - The number of records in the table
 SelCount: integer- The number of records that are selected
 SelectedRecord: MemoryRecord - The main selected record
 MemoryRecord[]: MemoryRecord - Array to access the individial memory records
 [] = MemoryRecord - Default accessor

Methods:

 getCount()
 getMemoryRecord(index)
 getMemoryRecordByDescription(description): returns a MemoryRecord object
 getMemoryRecordByID(ID)
 createMemoryRecord(): creates an generic cheat table entry and add it to the list
 getSelectedRecords():  Returns a table containing all the selected records
 doDescriptionChange(): Will show the GUI window to change the description of the selected entry
 doAddressChange(): Will show the GUI window to change the address of the selected entry
 doTypeChange(): Will show the GUI window to change the type of the selected entries
 doValueChange(): Will show the GUI window to change the value of the selected entries
 getSelectedRecord(): Gets the main selected memoryrecord
 setSelectedRecord(memrec): Sets the currently selected memoryrecord. This will unselect all other entries



MemScan[edit]

MemScan class: (Inheritance: Object)

 getCurrentMemscan(): Returns the current memory scan object. If tabs are used the current tab's memscan object
 createMemScan(progressbar OPTIONAL): Returns a new MemScan class object

Properties:

 OnScanDone: function(memscan) - Set a function to be called when the scan has finished
 FoundList: FoundList - The foundlist currently attached to this memscan object
 OnlyOneResult: boolean - If this is set to true memscan will stop scanning after having found the first result, and written the address to "Result"
 Result: Integer - If OnlyOneResult is used this will contain the address after a scan has finished

Methods:

 firstScan(scanoption, vartype, roundingtype, input1, input2 ,startAddress ,stopAddress ,protectionflags ,alignmenttype, "alignmentparam", isHexadecimalInput, isNotABinaryString, isunicodescan, iscasesensitive);
   Does an initial scan.
   memscan: The MemScan object created with createMemScan
   scanOption: Defines what type of scan is done. Valid values for firstscan are:
     soUnknownValue: Unknown initial value scan
     soExactValue: Exact Value scan
     soValueBetween: Value between scan
     soBiggerThan: Bigger than ... scan
     soSmallerThan: smaller than ... scan
   vartype: Defines the variable type. Valid variable types are:
     vtByte
     vtWord  2 bytes
     vtDword 4 bytes
     vtQword 8 bytes
     vtSingle float
     vtDouble
     vtString
     vtByteArray
     vtGrouped
     vtBinary
     vtAll
   roundingtype: Defined the way scans for exact value floating points are handled
     rtRounded: Normal rounded scans. If exact value = "3" then it includes 3.0 to 3.49999999. If exact value is "3.0" it includes 3.00 to 3.0499999999
     rtTruncated: Truncated algorithm. If exact value = "3" then it includes 3.0 to 3.99999999. If exact value is "3.0" it includes 3.00 to 3.099999999
     rtExtremerounded: Rounded Extreme. If exact value = "3" then it includes 2.0000001 to 3.99999999. If exact value is "3.0" it includes 2.900000001 to 3.099999999
   input1: If required by the scanoption this is a string of the given variable type
   input2: If requires by the scanoption this is the secondary input
   startAddress: The start address to scan from. You want to set this to 0
   stopAddress : The address the scan should stop at. (You want to set this to 0xffffffffffffffff)
   protectionflags: See aobscan about protectionflags
   alignmenttype: Scan alignment type. Valid options are:
     fsmNotAligned: No alignment check
     fsmAligned   : The address must be dividable by the value in alignmentparam
     fsmLastDigits: The last digits of the address must end with the digits provided by alignmentparam
   alignmentparam: String that holds the alignment parameter.
   isHexadecimalInput: When true this will handle the input field as a hexadecimal string else decimal
   isNotABinaryString: When true and the varType is vtBinary this will handle the input field as a decimal instead of a binary string
   isunicodescan: When true and the vartype is vtString this will do a unicode (utf16) string scan else normal utf8 string
   iscasesensitive: When true and the vartype is vtString this check if the case matches
 nextScan(scanoption, roundingtype, input1,input2, isHexadecimalInput, isNotABinaryString, isunicodescan, iscasesensitive, ispercentagescan, savedresultname OPTIONAL);
   Does a next scan based on the current addresslist and values of the previous scan or values of a saved scan
   memscan: The MemScan object that has previously done a first scan
   scanoption:
     soExactValue: Exact Value scan
     soValueBetween: Value between scan
     soBiggerThan: Bigger than ... scan
     soSmallerThan: smaller than ... scan
     soIncreasedValue: Increased value scan
     soIncreasedValueBy: Increased value by scan
     soDecreasedValue: Decreased value scan
     soDecreasedValueBy: Decreased value by scan
     soChanged: Changed value scan
     soUnchanged: Unchanged value scan
   roundingtype: Defined the way scans for exact value floating points are handled
     rtRounded: Normal rounded scans. If exact value = "3" then it includes 3.0 to 3.49999999. If exact value is "3.0" it includes 3.00 to 3.0499999999
     rtTruncated: Truncated algoritm. If exact value = "3" then it includes 3.0 to 3.99999999. If exact value is "3.0" it includes 3.00 to 3.099999999
     rtExtremerounded: Rounded Extreme. If exact value = "3" then it includes 2.0000001 to 3.99999999. If exact value is "3.0" it includes 2.900000001 to 3.099999999
   input1: If required by the scanoption this is a string of the given variable type
   input2: If requires by the scanoption this is the secondary input
   isHexadecimalInput: When true this will handle the input field as a hexadecimal string else decimal
   isNotABinaryString: When true and the varType is vtBinary this will handle the input field as a decimal instead of a binary string
   isunicodescan: When true and the vartype is vtString this will do a unicode (utf16) string scan else normal utf8 string
   iscasesensitive: When true and the vartype is vtString this check if the case matches
   ispercentage: When true and the scanoption is of type soValueBetween, soIncreasedValueBy or soDecreasedValueBy will cause CE to do a precentage scan instead of a normal value scan
   savedResultName: String that holds the name of a saved result list that should be compared against. First scan is called "FIRST"
 newScan(): Clears the current results
 waitTillDone(): Waits for the memscan thread(s) to finish scanning. Always use this
 saveCurrentResults(name): Save the current scanresults to a unique name for this memscan. This save can be used to compare against in a subsequent next scan
 getAttachedFoundlist(): Returns a FoundList object if one is attached to this scanresults. Returns nil otherwise
 setOnlyOneResult(state): If set to true before you start a scan, this will cause the scanner to only return one result. Note that it does not work with a foundlist
 getOnlyResult(): Only works if returnOnlyOneResult is true. Returns nil if not found, else returns the address that was found (integer)



FoundList
The foundlist is an object that opens the current memscan's result file and provides an interface for reading out the addresses.

createFoundList[edit]

createFoundList(memscan)

Properties:

 Count: integer
 Address[index]: 
 Value[index]: 

Methods:

 initialize(): Call this when a memscan has finished scanning. This will open the results for reading
 deinitialize(): Release the results
 getCount()
 getAddress(index): Returns the address as a string
 getValue(index): Returs the value as a string



Memoryview[edit]

Memoryview class: (Inheritance: Form-->ScrollingWinControl-->CustomControl-->WinControl-->Control-->Component-->Object)

 createMemoryView() - Creates a new memoryview window. This window will not receive debug events. Use getMemoryViewForm() function to get the main memoryview window

Properties:

 DisassemblerView: The disassemblerview class of this memoryview object
 HexadecimalView: The hexadecimalview class of this memoryview object

Methods:

 -


DisassemblerviewLine[edit]

DisassemblerviewLine class: (Inheritance: Object)

Properties:

 Address: The current address of this line
 Owner: The Disassemblerview that owns this line

Methods:

 -


Disassemblerview[edit]

Disassemblerview class: (Inheritance: Panel-->CustomControl-->WinControl-->Control-->Component-->Object)

 The visual disassembler used on the memory view window

Properties:

 SelectedAddress: integer - The currently selected address in the disassemblerview
 SelectedAddress2: integer - The secondary selected address in the disassemblerview
 TopAddress: Integer - The first address to show
 ShowJumplines: boolean - Determines if the jumplines should be shown
 OnSelectionChange: function(sender, address, address2) - Function to call when the selection has changed
 OnExtraLineRender: function(sender, Address, AboveInstruction, Selected): RasterImage OPTIONAL, x OPTIONAL, y OPTIONAL
   Function to call when you wish to provide the disassembler view with an extra image containing data you wish to show.
   This function is called once to get an image to show above the instruction, and once to get an image to show under the instruction and optional comments.
   The image for both calls must be different objects as rendering will only be done when both calls have been completed
   Sender is a DisassemblerviewLine object.
   If no coordinates are given the image will be centered above/below the instruction.

Methods:

 -


Hexadecimal[edit]

Hexadecimal class: (Inheritance: Panel-->CustomControl-->WinControl-->Control-->Component-->Object)

 The visual hexadecimal object used on the memory view window

Properties:

 OnAddressChange(hexadecimalview, function): function(hexadecimalview, address)
 OnByteSelect(hexadecimalview, function): function(hexadecimalview, address, address2)

Methods:

 -



Thread[edit]

Thread class: (Inheritance: Object)

 createNativeThread(function(Thread,...), ...):
   Executes the given function in another thread using the systems thread mechanism
   The function returns the Thread class object
   function declaration: function (Thread, ...)

Properties:

 name: string - This name will be shown when the thread terminated abnormally

Methods:

 freeOnTerminate(state):
   When set to true the thread object will free itself when the function ends (default=true)
   Note: Use this only from inside the thread function as the thread might have already terminated and freed itself when called
 synchronize(function(thread, ...), ...):
   Called from inside the thread. This wil cause the tread to get the main thread to execute the given function and wait for it to finish.
   Usually for GUI access
   Returns the return value of the given function
 waitfor():
   Waits for the given thread to finish (Not recommended to call this from inside the thread itself)



StructureFrm[edit]

StructureFrm class: (Inheritance: Object)

 createStructureForm(address)

Properties:

 Column[index]: structColumn - Fetches a structColumn object from the structure form
 Group[index]: structGroup - Fetches a structGroup object from the structure form
 Methods:
 structChange(): Forces a refresh
 addColumn(): Adds a new column in the currently focuses group and returns it's structColumn object
 addGroup(): Adds a new group and returns the structGroup object


structColumn[edit]

structColumn class: (Inheritance: Object)

Properties:

 Address: integer - The current address
 AddressText: string - Gets/sets the visual address
 Focused: boolean - Gets/sets the focused state

Methods:

 focus(): focuses the current column


structGroup[edit]

structGroup class: (Inheritance: Object) Properties:

 name: string - gets the current name
 box: Groupbox - Gets the groupbox object
 columnCount: integer- Gets the number of columns in the group
 columns[index]: structColumn - Returns the specific structColumn object

Methods:

 addColumns(): Adds a new columns to the specific group and returns it's structColumn objecy



structure[edit]

structure class: (Inheritance: Object)

 getStructureCount(): Returns the number of Global structures. (Global structures are the visible structures)
 getStructure(index): Returns the Structure object at the given index
 createStructure(name): Returns an empty structure object (Not yet added to the Global list. Call structure.addToGlobalStructureList manually)

Properties:

 Name: String - The name of the structure
 Size: Integer - The number of bytes between the last element and the start. ReadOnly
 Count: Integer - Number of elements in the structure. ReadOnly
 Element[]: structureElement - Returns the structure element at the given index. Readonly

Methods:

 getName(): Returns the name
 setName(name): Sets the name
 getElement(index): Returns a structureElement object (Changing offsets can change the index)
 getElementByOffset(offset): Returns a structureElement object where the specified offset is at least the requested offset
 addElement(): Adds a new blank structureElement and returns it
 autoGuess(baseaddresstoguessfrom, offset, size)
 fillFromDotNetAddress(address, changeName): Fills the structure with the layout gathered from querying .NET.  If changeName is true, the structure will take the name of the .NET class.  (6.4+)
 beginUpdate(): Call this when you want to make multiple updates to a structure. It will speed up the update process
 endUpdate(): Call this when done
 addToGlobalStructureList(): Add this to the list of structures for the user to select from. (Global structures will get saved to the table)
 removeFromGlobalStructureList(): Remove from the list of structures.


StructureElement[edit]

StructureElement class: (Inheritance: Object)

Properties:

 Owner: structure - The structure this element belongs to. Readonly
 Offset: integer - The offset of this element
 Name: string - The name of this element
 Vartype: integer - The variable type of this element
 ChildStruct: structure - If not nil this element is a pointer to the structure defined here
 ChildStructStart: integer - The number of bytes inside the provided childstruct. (E.g: It might point to offset 10 of a certain structure)
 Bytesize: integer - The number of bytes of this element. Readonly for basic types, writable for types that require a defined length like strings and array of bytes

Methods:

 getOwnerStructure(): Returns the structure this element belongs to
 getOffset(): Returns the offset of this element
 setOffset(offset): Sets the offset of this element
 getName(): Returns the name of this element
 setName(name): Sets the name of this element (tip: Leave blank if you only want to set the name of the variable)
 getVartype(): Returns the variable type of this element (check Variable types in defines.lua)
 setVartype(vartype)
 getChildStruct()
 setChildStruct(structure)
 getChildStructStart()
 setChildStructStart(offset)
 getBytesize(): Gets the bytesize of the element. Usually returns the size of the type, except for string and aob
 setBytesize(size): sets the bytesize for types that are affected (string, aob)



supportCheatEngine[edit]

supportCheatEngine(attachwindow, hasclosebutton, width, height, position ,yoururl OPTIONAL, extraparameters OPTIONAL, percentageshown OPTIONAL)
Will show an advertising window which will help keep the development of Cheat Engine going.
If you provide your own url it will be shown Up to 75% of the time.
  • attachwindow: form : The form that the ad is attached to
  • hasclosebutton: boolean : If true the window will have a border an a close button at top
    • width, height: integer : The client width and height of the window.
      • Prefered formats: 120x600, 160x600, 300x250, 468x60, 728x90, But you are free to use different formats.
  • Position: integer/enum: The place of the window
    • 0=Top
    • 1=Right
    • 2=Bottom
    • 3=left
  • Yoururl: string: The url you want to show. When given instead of showing CE's ads 100% it will show your url up to 75%.
You can use it for your own income, or for updating users about new versions of your trainer or whatever you feel like
  • Extraparameters: string: are url request parameters you can add to the default parameters (e.g trainername=mytrainer for tracking purposes).
  • PercentageShown: You can change the default of 75% to a smaller value like 50%.


fuckCheatEngine[edit]

fuckCheatEngine()
Removes the ad window if it was showing



Following are some more internal functions for Cheat Engine[edit]

dbk_initialize[edit]

dbk_initialize()
Returns true if the dbk driver is loaded in memory. False if it failed for whatever reason (e.g 64-bit and not booted with unsigned driver support)

dbk_useKernelmodeOpenProcess[edit]

dbk_useKernelmodeOpenProcess()
Switches the internal pointer of the OpenProcess api to dbk_OpenProcess

dbk_useKernelmodeProcessMemoryAccess[edit]

dbk_useKernelmodeProcessMemoryAccess()
Switches the internal pointer to the ReadProcessMemory and WriteProcessMemory apis to dbk_ReadProcessMemory and

dbk_WriteProcessMemory[edit]

dbk_WriteProcessMemory
-

dbk_useKernelmodeQueryMemoryRegions[edit]

dbk_useKernelmodeQueryMemoryRegions()
Switches the internal pointer to the QueryVirtualMemory api to dbk_QueryVirtualMemory

dbk_getPEProcess[edit]

dbk_getPEProcess(processid)
Returns the pointer of the EProcess structure of the selected processid

dbk_getPEThread[edit]

dbk_getPEThread(threadid)
Gets the pointer to the EThread structure


dbk_readMSR[edit]

dbk_readMSR(msr)
Reads the msr

dbk_writeMSR[edit]

dbk_writeMSR(msr, msrvalue)
Writes the msr

dbk_executeKernelMemory[edit]

dbk_executeKernelMemory(address, parameter)
Executes a routine from kernelmode (e.g a routine written there with auto assembler) parameter can be a value or an address. It's up to your code how it's handled


dbvm_initialize[edit]

dbvm_initialize(offloados OPTIONAL)
Initializes the dbvm functions (dbk_initialize also calls this) offloados is a boolean that when set will offload the system onto dbvm if it's not yet running (and only IF the dbk driver is loaded)

dbvm_readMSR[edit]

dbvm_readMSR(msr)
See dbk_readMSR

dbvm_writeMSR[edit]

dbvm_writeMSR(msr, value)
See dbk_writeMSR


dbk_getCR0[edit]

dbk_getCR0()
Returns Control Register 0

dbk_getCR3[edit]

dbk_getCR3()
Returns Control Register 3 of the currently opened process

dbk_getCR4[edit]

dbk_getCR4()
Returns Control Register 4

dbk_getPhysicalAddress[edit]

dbk_getPhysicalAddress(address)
Returns the physical address of the given address

dbk_writesIgnoreWriteProtection[edit]

dbk_writesIgnoreWriteProtection(state)
Set to true if you do not wish to initiate copy-on-write behaviour


dbvm_getCR4[edit]

dbvm_getCR4()
Returns the real Control Register 4 state


onAPIPointerChange[edit]

onAPIPointerChange(function)
Registers a callback when an api pointer is changed (can happen when the user clicks ok in settings, or when dbk_use*** is used. Does

NOT happen when setAPIPointer is called)


setAPIPointer[edit]

setAPIPointer(functionid, address)
Sets the pointer of the given api to the given address. The address can be a predefined address set at initialization by Cheat Engine, or an address you got from an autoassembler script or injected dll (When Cheat Engine itself was targeted)
 functionid:
   0: OpenProcess
     Known compatible address defines:
       windows_OpenProcess
       dbk_OpenProcess
   1: ReadProcessMemory
     Known compatible address defines:
       windows_ReadProcessMemory
       dbk_ReadProcessMemory
       dbk_ReadPhysicalMemory
       dbvm_ReadPhysicalMemory
   2: WriteProcessMemory
     Known compatible address defines:
       windows_WriteProcessMemory
       dbk_WriteProcessMemory
       dbk_WritePhysicalMemory
       dbvm_WritePhysicalMemory
   3: VirtualQueryEx
     Known compatible address defines:
       windows_VirtualQueryEx
       dbk_VirtualQueryEx
       VirtualQueryExPhysical


Extra variables defined:

dbk_NtOpenProcess[edit]

dbk_NtOpenProcess
Address of the NtOpenProcess implementation in DBK32


The dbvm_ addresses should only be used with auto assembler scripts injected into Cheat Engine

dbvm_block_interrupts[edit]

dbvm_block_interrupts
Address of function dbvm_block_interrupts: DWORD; stdcall;

dbvm_raise_privilege[edit]

dbvm_raise_privilege
Address of function dbvm_raise_privilege: DWORD; stdcall;

dbvm_restore_interrupts[edit]

dbvm_restore_interrupts
Address of function dbvm_restore_interrupts: DWORD; stdcall;

dbvm_changeselectors[edit]

dbvm_changeselectors
Address of function dbvm_changeselectors(cs,ss,ds,es,fs,gs: dword): DWORD; stdcall;



D3DHOOK[edit]

D3DHOOK class: (Inheritance: Object)

The d3dhook functions provide a method to render graphics and text inside the game, as long as it is running in directx9, 10 or 11

 createD3DHook(textureandcommandlistsize OPTIONAL, hookmessages OPTIONAL): Hooks direct3d and allocates a buffer with given size for storage of for the rendercommand list
   hookmessages defines if you want to hook the windows message handler for the direct3d window. The d3dhook_onClick function makes use of that
   If no size is provided 16MB is used and hookmessages is true
   Note: You can call this only once for a process
   It returns a d3dhook object

Properties:

 Width: Integer: The width of the screen (readonly)
 Height: integer: The height of the screen (readonly)
 DisabledZBuffer: boolean: Set this to true if you don't want previously rendered walls to overlap a newly rendered object (e.g map is rendered first, then the players are rendered)
 WireframeMode: boolean: Set this to true if you don't want the faces of 3d objects to be filled
 MouseClip: boolean: Set this if to true if you have one of those games where your mouse can go outside of the gamewindow and you don't want that.
 OnClick: function(d3dhook_sprite, x, y)
   A function to be called when clicked on an sprite (excluding the mouse)
   x and y are coordinates in the sprite object. If sprites overlap the highest zorder sprite will be given. It does NOT care if a transparent part is clicked or not
   Note: If you set this it can cause a slowdown in the game if there are a lot of sprites and you press the left button a lot
 OnKeyDown: function(virtualkey, char)
   function(vkey, char): boolean
     A function to be called when a key is pressed in the game window (Not compatible with DirectInput8)
     Return false if you do not wish this key event to pass down to the game

Methods:

 beginUpdate(): Use this function when you intent to update multiple sprites,textcontainers or textures. Otherwise artifacts may occur (sprite 1 might be drawn at the new location while sprite 2 might still be at the old location when a frame is rendered)
 endUpdate(): When done updating, call this function to apply the changes
 enableConsole(virtualkey): Adds a (lua)console to the specific game. The given key will bring it up (0xc0=tilde)
 createTexture(filename): Returns a d3dhook_texture object
 createTexture(picture, transparentColor OPTIONAL): Returns a d3dhook_texture object
   if the picture is not a transparent image the transparentcolor parameter can be used to make one of it's colors transparent
 createFontmap(font): Returns a d3dhook_fontmap object created from the given font
 createSprite(d3dhook_texture): returns a d3dhook_sprite object that uses the given texture for rendering
 createTextContainer(d3dhook_fontmap, x, y, text): Returns a d3dhook_textContainer object


D3DHook_Texture[edit]

D3DHook_Texture class: (Inheritance: Object)

This class controls the texture in memory. Without a sprite to use it, it won't show

Properties:

 Height: integer (ReadOnly)
 Width: integer (ReadOnly)

Methods:

 loadTextureByPicture(picture)


D3DHook_FontMap[edit]

D3DHook_FontMap class: (Inheritance: D3DHook_Texture-->Object)

A fontmap is a texture that contains extra data regarding the characters. This class is used by the textcontainer Current implementation only supports 96 characters (character 32 to 127)

Properties:

 -

Methods:

 changeFont(font): Changes the fontmap to the selected font
 getTextWidth(string): Returns the width of the given string in pixels


D3DHook_RenderObject[edit]

D3DHook_RenderObject class: (Inheritance: Object) The renderobject is the abstract class used to control in what manner objects are rendered. The sprite and TextContainer classed inherit from this

Properties:

 X: Float - The x-coordinate of the object on the screen
 Y: Float - The y-coordinate of the object on the screen
 CenterX: Float - X coordinate inside the object. It defines the rotation spot and affects the X position
 CenterY: Float - Y " "
 Rotation: Float - Rotation value in degrees (0 and 360 are the same)
 Alphablend: Float - Alphablend value. 1.0 is fully visible, 0.0=invisible
 Visible: boolean - Set to false to hide the object
 ZOrder: integer - Determines if the object will be shown in front or behind another object

Methods:

 -


D3DHook_Sprite[edit]

D3DHook_Sprite class: (Inheritance: D3DHook_RenderObject-->Object) A d3dhook_sprite class is a visible texture on the screen.


Properties:

 Width: Integer - The width of the sprite in pixels. Default is the initial texture width
 Height: Integer - The height of the sprite in pixels. Default is the initial texture height
 Texture: d3dhook_texture - The texture to show on the screen

Methods:

 -


D3Dhook_TextContainer[edit]

D3Dhook_TextContainer class: (Inheritance: D3DHook_RenderObject-->Object) A d3dhook_sprite class draws a piece of text on the screen based on the used fontmap. While you could use a texture with the text, updating a texture in memory is slow. So if you wish to do a lot of text updates, use a textcontainer

Properties:

 FontMap: The D3DHook_FontMap object to use for rendering text
 Text: The text to render

Methods:

 -



Disassembler[edit]

Disassembler class: (Inheritance: 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
 getVisibleDisassembler() - Returns the disassembler used by the disassemblerview. Special codes are: {H}=Hex value {R}=Register {S}=Symbol {N}=Nothing special
 registerGlobalDisassembleOverride(function(sender: Disassembler, address: integer, LastDisassembleData: Table): opcode, description): Same as
 Disassembler.OnDisassembleOverride, but does it for all disassemblers, including newly created ones.  Tip: Check the sender to see if you should use syntax
 highlighting codes or not
   This function returns an ID you can pass on to unregisterGlobalDisassembleOverride()  6.4+
 unregisterGlobalDisassembleOverride(id)

Properties:

 LastDisassembleData: Table
 OnDisassembleOverride: function(sender: Disassembler, address: integer, LastDisassembleData: Table): opcode, description
 syntaxhighlighting: boolean: This property is set if the syntax highlighting codes are accepted or not

Methods:

 disassemble(address): Disassembles the given instruction and returns the opcode. It also fills in a LastDisassembleData record
 decodeLastParametersToString(): Returns the unedited "Comments" information. Does not display userdefined comments
 getLastDisassembleData(): Returns the LastDisassembleData table.
   The table is build-up as follow:
     address: integer - The address that was disassembled
     opcode: string - The opcode without parameters
     parameters: string - The parameters
     description: string - The description of this opcode
     bytes: table - A table containing the bytes this instruction consists of (1.. )
     modrmValueType: DisAssemblerValueType  - Defines the type of the modrmValue field (dvtNone=0, dvtAddress=1, dvtValue=2)
     modrmValue: Integer - The value that the modrm specified. modrmValueType defines what kind of value
     parameterValueType: DisAssemblerValueType
     parameterValue: Integer - The value that the parameter part specified
     isJump: boolean - Set to true if the disassembled instruction can change the EIP/RIP (not ret)
     isCall: boolean - Set to true if it's a Call
     isRet: boolean - Set to true if it's a Ret
     isConditionalJump: boolean - Set to true if it's a conditional jump


DissectCode[edit]

DissectCode class: (Inheritance: Object)

 getDissectCode(): Creates or returns the current code DissectCode object

Properties:

 -

Methods:

 clear(): Clears all data
 dissect(modulename): Dissects the memory of a module
 dissect(base,size): Dissect the specified memory region
 addReference(fromAddress, ToAddress, type, OPTIONAL isstring):
   Adds a reference. Type can be jtCall, jtUnconditional, jtConditional, jtMemory
   In case of jtMemory setting isstring to true will add it to the referenced strings list
 deleteReference(fromAddress, ToAddress)
 getReferences(address): Returns a table containing the addresses that reference this address and the type
 getReferencedStrings(): Returns a table of addresses and their strings that have been referenced. Use getReferences to find out which addresses that are
 getReferencedFunctions(): Returns a table of functions that have been referenced. Use getReferences to find out which callers that are
 saveToFile(filename)
 loadFromFile(filename)



RIPRelativeScanner[edit]

RIPRelativeScanner class: (Inheritance: Object)

 createRipRelativeScanner(modulename): Creates a RIP relative scanner. This will scan the provided module for RIP relative instructions which you can use for whatever you like

Properties:

 Count: integer - The number of instructions found that have a RIP relative address
 Address[]: integer - An array to access the results. The address is the address of the RIP relative offset in the instruction

Methods:

 -


LuaPipe[edit]

LuaPipe class: (Inheritance: Object)

 Abstract class that LuaPipeServer and LuaPipeclient inherit from. It implements the data transmission methods

Properties:

 Connected: boolean: True if the pipe is connected

Methods:

 lock(): Acquire a lick on this pipe till unlock is called. If lock can not be acquired, wait. Recursive calls are allowed
 unlock()
 writeBytes(ByteTable, size OPTIONAL): Writes the provided byte table to the pipe. if size is not provided, the whole table is sent. Returns the number of bytes sent, or nil on failure
 readBytes(size: integer): returns a byte table from the pipe, or nil on failure
 readDouble(): Read a double from the pipe, nil on failure
 readFloat(): Read a float from the pipe, nil on failure
 readQword(): Read an 8 byte value from the pipe, nil on failure
 readDword(): Read a 4 byte value from the pipe, nil on failure
 readWord(): Read a 2 byte value from the pipe, nil on failure
 readByte(): Read a byte from the pipe, nil on failure
 readString(size: integer): Reads a string from the pipe, nil on failure.  (Can support 0-byte chars)
 readWideString(size: integer): Reads a widestring from the pipe, nil on failure
 writeDouble(v: double): Writes a double to the pipe. Returns the number of bytes sent, nil on failure
 writeFloat(v: single): writes a float to the pipe. Returns the number of bytes sent, nil on failure
 writeQword(v: qword): writes an 8 byte value to the pipe. Returns the number of bytes sent, nil on failure
 writeDword(v: dword): writes a 4 byte value to the pipe. Returns the number of bytes sent, nil on failure
 writeWord(v: word): writes a word to the pipe. Returns the number of bytes sent, nil on failure
 writeByte(v: byte): writes a byte to the pipe. Returns the number of bytes sent, nil on failure
 writeString(str: string; include0terminator: boolean OPTIONAL); Writes a string to the pipe. If include0terminator is false or not provided it will not write the 0 terminator byte.  Returns the number of bytes written, or nil on failure
 writeWideString(str: widestring; include0terminator: boolean OPTIONAL); Writes a widestring to the pipe. If include0terminator is false or not provided it will not write the 0 terminator bytes. Returns the number of bytes written, or nil on failure


LuaPipeClient[edit]

LuaPipeClient class: (Inheritance: LuaPipe-->Object)

Class implementing a client that connects to a pipe

 connectToPipe(pipename): Returns a LuaPipeClient connected to the given pipename. Nil if the connection fails

Properties:

 -

Methods:

 -


LuaPipeServer[edit]

LuaPipeServer class: (Inheritance: LuaPipe-->Object)

Class launching the server side of a pipe

 createPipe(pipename, inputsize OPTIONAL, outputsize OPTIONAL): 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.  Default input and output size is 4096 for both

Properties:

 valid: boolean - Returns true if the pipe has been created properly. False on failure (e.g wrong pipename)

Methods:

 acceptConnection() - Waits for a client to connect to this pipe (Warning: Freezes the thread this is executed in)


openLuaServer[edit]

openLuaServer(Name)
Opens a pipe with the given name. The LuaClient dll needs this name to connect to ce


LuaClient.dll functions:

BOOL CELUA_Initialize(char *name)
Initializes
UINT_PTR CELUA_ExecuteFunction(char *luacode, UINT_PTR parameter)
This function executes a lua function with parameters (parameter) and with the luacode as body Parameter will be treated as an integer
 In short:
   function(parameter)
     <luacode>
   end
 The return value of this function is the return value of the lua function (integer)



Settings class[edit]

This class can be used to read out and set settings of cheat engine and of plugins, and store your own data

global functions[edit]

getSettings[edit]

getSettings(path Optional)
Returns a settings object. If path is nil it will points to the Cheat Engine main settings (Registry) . If name is provides the settings currently accessed will be the one at the subkey provided
Note: Keep in mind that it returns a new object each call, even if he same name is used multiple times
Properties:
Path: string - Gets/Sets the current subkey (nil if main)
Value[]: A table access into the settings. e.g: Value["Count"]=12
Methods:
-



SymbolList class[edit]

This class can be used to look up an address to a symbolname, and a symbolname to an address It can also be registered with the internal symbol handler of cheat engine


This class makes use of a special "Symbol" table construction that contains size and optionally other data

  • Symbol Table:
    • modulename: string
    • searchkey: string
    • address: integer
    • symbolsize: integer


Global functions

createSymbolList[edit]

createSymbolList()
Creates an empty symbollist.
Properties:
-
Methods:
clear():
getSymbolFromAddress(address): Searches the list for the given address. The address does not have to match the exact address. As long as it falls withing the range
getSymbolFromString(searchkey):
addSymbol(modulename, searchkey, address, symbolsize, skipAddressToSymbolLookup OPTIONAL, extradata OPTIONAL): Adds a symbol to the symbollist
extradata is a table which can be used to fill in a return type and parameters for function calls. It has the following fields:
returntype: string
parameters: string

deleteSymbol[edit]

deleteSymbol(searchkey)
-

deleteSymbol[edit]

deleteSymbol(address)
-

register[edit]

register()
Registers the current symbol list with the symbol handler

unregister[edit]

unregister()
Unregisters the current symbol list from the symbol handler



Pagecontrol[edit]

Pagecontrol class: (WinControl-->Control-->Component-->Object)

This is an object that can hold multiple pages

Global functions

createPageControl(owner)
Properties:
ShowTabs: boolean - Shows the tabs
TabIndex: integer - Gets and sets the current tab
ActivePage: TabSheet - Returns the current tabsheet.
PageCount: integer - Gets the number of pages
Page[]: TabSheet - Get a specific page (TabSheet)
Methods:
addTab(): TabSheet - Creates a new TabSheet



TabSheet[edit]

TabSheet class: (WinControl-->Control-->Component-->Object)

Part of a page control. This object can contain other objects

Properties:

 TabIndex: integer - the current index in the pagelist of the owning pagecontrol

Methods:

 -

Links[edit]