Help File:Script engine

From Cheat Engine
Revision as of 13:41, 7 March 2017 by TheyCallMeTim13 (talk | contribs) (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…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Script engine

List of CE specific functions and variables:

TrainerOrigin
A variable that contains the path of the trainer that launched cheat engine (Only set when launched as a trainer)
process
A variable that contains the main modulename of the currently opened process
getCEVersion()
Returns a floating point value specifying the version of cheat engine


activateProtection()
Prevents basic memory scanners from opening the cheat engine process
fullAccess(address,size)
Changes the protection of a block of memory to writable and executable


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(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(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(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 from a table


readInteger(address)
Reads an integer from the specified address
readQword(address)
Reads a 64-bit integer from the specified address
readPointer(address)
In a 64-bit target this equals readQword, in a 32-bit target readInteger()
readFloat(address)
Reads a single precision floating point value from the specified address
readDouble(address)
Reads a double precision floating point value from the specified address
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
writeInteger(address,value)
Writes an integer to the specified address. Returns true on success
writeQword(address, value)
Write a 64-bit integer to the specified address
writeFloat(address,value)
Writes a single precision floating point to the specified address. Returns true on success
writeDouble(address,value)
Writes a double precision floating point to the specified address. Returns true on success
writeString(address,text, widechar OPTIONAL)
Write a string to the specified address. Returns true on success


readBytesLocal(address,bytecount, ReturnAsTable)
See readBytes but then it's for Cheat engine's memory
readIntegerLocal(address)
Reads an integer from the specified address in CE's memory
readQwordLocal(address)
Reads a 64-bit integer from the specified address in CE's memory
readPointerLocal(address)
ReadQwordLocal/ReadIntegerLocal depending on the cheat engine build
readFloatLocal(address)
Reads a single precision floating point value from the specified address in CE's memory
readDoubleLocal(address)
Reads a double precision floating point value from the specified address in CE's memory
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(address,value)
Writes an integer to the specified address in CE's memory. Returns true on success
writeQwordLocal(address,value)
Writes a 64-bit integer to the specified address in CE's memory. Returns true on success
writeFloatLocal(address,value)
Writes a single precision floating point to the specified address in CE's memory. Returns true on success
writeDoubleLocal(address,value)
Writes a double precision floating point to the specified address in CE's memory. Returns true on success
writeStringLocal(address,string, widechar OPTIONAL)
Write a string to CE's memory at the specified address. Returns true on success
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


wordToByteTable(number)
Converts a word to a bytetable
dwordToByteTable(number)
Converts a dword to a bytetable
qwordToByteTable(number)
Converts a qword to a bytetable
floatToByteTable(number)
Converts a float to a bytetable
doubleToByteTable(number)
Converts a double to a bytetable
stringToByteTable(string)
Converts a string to a bytetable
wideStringToByteTable(string)
Converts a string to a widestring and converts that to a bytetable


byteTableToWord(table)
Converts a bytetable to a word
byteTableToDword(table)
Converts a bytetable to a dword
byteTableToQword(table)
Converts a bytetable to a qword
byteTableToFloat(table)
Converts a bytetable to a float
byteTableToDouble(table)
Converts a bytetable to a double
byteTableToString(table)
Converts a bytetable to a string
byteTableToWideString(table)
Converts a bytetable to a widestring and convets that to a string


bOr(int1, int2)
Binary Or
bXor(int1, int2)
Binary Xor
bAnd(int1, int2
Binary And
bShl(int, int2)
Binary shift leftP
bShr(int, int2)
Binary shift right
bNot(int)
Binary not


writeRegionToFile(filename, sourceaddress,size)
Writes the given region to a file. Returns the number of bytes written
readRegionFromFile(filename, destinationaddress)
Reads a file from memory and writes the contents of that file to the specified address


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


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(integer)
Returns whatever the reference points out

destroyRef(integer) - Removes the reference

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


getTranslationFolder()
Returns the path of the current translation files. Empty if there is no translation going on
loadPOFile(path)
Loads a '.PO' file used for translation
translate(string)
Returns a translation of the string. Returns the same string if it can't be found
translateID(translationid - string, originalstring - string OPTIONAL)
Returns a translation of the string id


ansiToUtf8(string)
Converts a string in Ansi encoding to UTF8
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(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(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(symbolname)
Returns a table as defined by the SymbolList class object (modulename, searchkey, address, size)
getModuleSize(modulename)
Returns the size of a given module (Use getAddress to get the base address)
reinitializeSymbolhandler(waittilldone : BOOLEAN OPTIONAL, default=TRUE)
reinitializes the symbolhandler. E.g when new modules have been loaded
reinitializeDotNetSymbolhandler(modulename OPTIONAL)
Reinitializes only the DotNet part of the symbol list. (E.g After an ILCode has been JITed) (6.4+)


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(address, addresstojumpto, addresstogetnewcalladdress OPT)
Generates an auto assembler script which will hook the given address when executed
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(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(command)
Removes the callback.


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(ID)
Removes the callback.


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


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(ID)
Removes the callback.


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(ID)
Removes the callback.


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(ID)
Unregisters the registered assembler


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(ID)
Removes the callback.


showMessage(text)
shows a messagebox with the given text
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(text, type, buttons...)
pops up a messagebox with a specific icon/sound with the specified buttons (mbok, mbyes, ....)
sleep(milliseconds)
pauses for the number of specified milliseconds (1000= 1 sec...)


getProcesslist(Strings)
Fills a Strings inherited object with the processlist of the system.
Format: %x-pidname
getProcesslist()
Returns a table with the processlist (pid - name )
getWindowlist(Strings)
Fills a Strings inherited object with the top-window list of the system.
Format: %x-windowcaption
getWindowlist()
Returns a table with the windowlist (pid - window caption )


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


''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()
Returns the currently opened process. If none is open, returns 0
getProcessIDFromProcessName(name)
returns a processid
openProcess(processid)
causes cheat engine to open the given processid
openProcess(processname)
causes cheat engine to find and open the given process
setPointerSize(size)
Sets the size cheat engine will deal with pointers in bytes. (Some 64-bit processes can only use 32-bit addresses)
pause()
pauses the current opened process
unpause()
resumes the current opened process


getPixel(x,y)
returns the rgb value of the pixel at the specific screen coordinate
getMousePos
returns the x,y coordinates of the mouse
setMousePos(x,y)
sets the mouse position


isKeyPressed(key)
returns true if the specified key is currently pressed
keyDown(key)
causes the key to go into down state
keyUp(key)
causes the key to go up
doKeyPress(key)
simulates a key press


shortCutToText(shortcut)
Returns the textual representation of the given shortut value (integer) (6.4+)
textToShortCut(shortcutstring)
Returns an shortcut integer that the given string represents. (6.4+)


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


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(command, parameters OPTIONAL, folder OPTIONAL, showcommand OPTIONAL)
Executes a given command


getTickCount()
Returns the current tickcount since windows was started. Each tick is one millisecond
processMessages()
Lets the main eventhandler process the new messages (allows for new button clicks)
inMainThread()
Returns true if the current code is running inside the main thread (6.4+)
integerToUserData(int)
Converts a given integer to a userdata variable
userDataToInteger(UserDataVar)
Converts a given userdata variable to an integer


synchronize(function(...), ...)
Calls the given function from the main thread. Returns the return value of the given function
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(text)
Writes the given text to the clipboard
readFromClipboard()
Reads the text from the clipboard


speedhack_setSpeed(speed)
Enables the speedhack if needed and sets the specific speed
speedhack_getSpeed()
Returns the last set speed


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


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


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(script)
Registers a custom type based on an auto assembler script. The script must allocate an "ConvertRoutine" and "ConvertBackRoutine".


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()
just closes ce
hideAllCEWindows()
makes all normal ce windows invisible (e.g trainer table)
unhideMainCEwindow()
shows the main cheat engine window


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


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(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()
Returns the processID of the process that is currently on top


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


getCheatEngineDir()
Returns the folder Cheat Engine is located at


disassemble(address)
Disassembles the given address and returns a string in the format of "address - bytes - opcode : extra"
splitDisassembledString(disassembledstring)
Returns 4 strings. The address, bytes, opcode and extra field


getInstructionSize(address)
Returns the size of an instruction (basically it disassembles the instruction and returns the number of bytes for you)
getPreviousOpcode(address)
Returns the address of the previous opcode (this is just an estimated guess)


beep()
Plays the fabulous beep/ping sound!
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


getUserRegistryEnvironmentVariable(name)
Returns the environment variable stored in the user registry environment
setUserRegistryEnvironmentVariable(name, string)
Sets the environment variable stored in the user registry environment
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(string)
Returns an md5 hash string from the provided string


getFormCount()
Returns the total number of forms assigned to the main CE application
getForm(index)
Returns the form at the specific index
registerFormAddNotification(function(form))
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)


getSettingsForm()
Returns the main settings form
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()
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()
Returns the lua engine form object (Creates it if needed)
getApplication()
Returns the application object. (the titlebar)
getAddressList()
Returns the cheat table addresslist object
getFreezeTimer()
Returns the freeze timer object
getUpdateTimer()
Returns the update timer object


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(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(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


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(symbolname)
Unregisters a userdefined symbol.


getNameFromAddress(address)
Returns the given address as a string. Registered symbolname, modulename+offset, or just a hexadecimal string depending on what address
inModule(address)
returns true if the given address is inside a module
inSystemModule(address)
returns true if the given address is inside a system module
getCommonModuleList
Returns the commonModuleList stringlist. (Do not free this one)



debugging

debug variables

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

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(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(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()
Returns true if the debugger has been started
debug_getCurrentDebuggerInterface()
Returns the current debuggerinterface used (1=windows, 2=VEH 3=Kernel, nil=no debugging active)
debug_canBreak()
Returns true if there is a possibility the target can stop on a breakpoint. 6.4+
debug_isBroken()
Returns true if the debugger is currently halted on a thread
debug_getBreakpointList()
Returns a lua table containing all the breakpoint addresses


debug_addThreadToNoBreakList(threadid)
This will cause breakpoints on the provided thread to be ignored
debug_removeThreadFromNoBreakList(threadid)
removed the threadid from the list


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(address)
if the given address is a part of a breakpoint it will be removed
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(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(boolean)
When set the Kernel debugger will try to record the last branch(es) taken before a breakpoint happens
debug_getMaxLastBranchRecord()
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)


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(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.


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


getComment(address)
Gets the userdefined comment at the specified address.
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)
Gets the userdefined header at the specified address.
setHeader(address)
Sets the userdefined header at the specified address.


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

inheritsFromObject(object)
Returns true if given any class.
inheritsFromComponent(object)
Returns true if the given object inherits from the Component class.
inheritsFromControl(object)
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)
Creates an object of the specified class: (Assuming it's a registered class and has a default constructor).


Class definitions

Objectclass: (Inheritance: )

Properties:

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

Methods:

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


Componentclass: (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


Controlclass: (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


GraphicsObjectclass: (Inheritance: Object)


Regionclass: (Inheritance: GraphicsObject-->Object)

 createRegion(): Created 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 )


WinControlclass: (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 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 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 class: (Inheritance: Menu-->Component-->Object)

 createMainMenu(form)

The mainmenu is the menu at the top of a window


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 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 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 class: (Inheritance: CustomApplication-->Component-->Object)

Properties:

 Title: The title of cheat engine in the bar

Methods:

 bringToFront(): Shows the cheat engine app


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 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 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 class: (Inheritance: GraphicControl-->Control-->Component-->Object)

 createPaintBox(owner): Creates a Paintbox class object


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 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 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 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 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 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 class: (Inheritance: WinControl-->Control-->Component-->Object)


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 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 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 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 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 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 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 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 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 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 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 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 class: (Inheritance: TObject)

Properties:

 Count: integer

Methods:

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


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

Properties:

 Columns[]: Array to access a column
 [] = 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)

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 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 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 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 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 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 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 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 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 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 class: (Inheritance: CustomBrush-->CanvasHelper-->Object)

Properties:

 Color : Integer

Methods:

 getColor()
 setColor()


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 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 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 class: (Inheritance: CustomBitmap-->RasterImage-->Graphic-->Object) : Bitmap based Graphic object

 createBitmap(width, height) - Returns a Bitmap object


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

 createPNG(width, height) - Returns a PortableNetworkGraphic object


JpegImage Class: (Inheritence: CustomBitmap-->RasterImage-->Graphic-->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)



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)

 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 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 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 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 class: (Inheritance: OpenDialog-->FileDialog-->CommonDialog-->Component-->Object)

 createSaveDialog(owner)


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

 createSelectDirectoryDialog(owner)


Stream class: (Inheritance: Stream-->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-->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-->Stream-->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