Lua:Class:Addresslist

From Cheat Engine
Revision as of 22:51, 18 May 2012 by SoftICE (talk | contribs)
Jump to navigation Jump to search

The Addresslist class can be used to access information regarding the Cheat Engine table. It is commonly combined with MemoryRecord.

addresslist_getCount(addresslist)

Returns the ammount of entires in the addresslist.

Example:

 --Assume the table is empty
 table=getAddressList()
 address=0x2031a3ac
 --Create 2 entires
 for i=1,2 do 
    mr=addresslist_createMemoryRecord(table) 
    memoryrecord_setAddress(mr,address) 
 
    address=address+1 
 end 
 entries=addresslist_getCount(table) -- entries now has the value 2

addresslist_getMemoryRecord(addresslist, index)

Returns the MemoryRecord entry. The first object is indexed by 0.

Example:

 table=getAddressList()
 memory_record1=addresslist_getMemoryRecord(table,0)

addresslist_getMemoryRecordByDescription(addresslist, string)

Returns the MemoryRecord entry matched by the string. The description has to be an exact match, but is case-insensitive

Example:

 --Assume we have a entry in the cheat table with the description "Health"
 table=getAddressList()
 memory_record=addresslist_getMemoryRecordByDescription(table,"Health")

addresslist_getMemoryRecordByID(addresslist, ID)

Returns the MemoryRecord entry matched by the unique ID.

Example:

 --Assume we have a entry in the cheat table with the description "Health"
 table=getAddressList()
 id=memoryrecord_getID(addresslist_getMemoryRecordByDescription(table,"Health"))
 memory_record=addresslist_getMemoryRecordByID(table,id)

addresslist_createMemoryRecord(addresslist)

Creates an empty memory record at the end of the addresslist. This function also returns the empty MemoryRecord entry, which can be used to immediately access the MemoryRecord.

Example:

 --Assume we have a entry in the cheat table with the description "Health"
 table=getAddressList()
 memory_record=addresslist_createMemoryRecord(table)
 memoryrecord_setAddress(memory_record,0x00400000)



Don't know what these are:

addresslist_getSelectedRecords(addresslist) Returns a array of selected Cheat Table entires. (??)

addresslist_doDescriptionChange(addresslist) Change description(??)

addresslist_doAddressChange(addresslist)

addresslist_doTypeChange(addresslist)

addresslist_doValueChange(addresslist)

addresslist_getSelectedRecord(addresslist)

addresslist_setSelectedRecord(addresslist)