Difference between revisions of "Lua:Class:Addresslist"

From Cheat Engine
Jump to navigation Jump to search
m (Still working just saving just incase of crash)
 
(Well I created a stub atleast...)
Line 1: Line 1:
 
'''Work in progress'''
 
'''Work in progress'''
The Addresslist class can be used to access information regarding the Cheat Engine table.
+
 
 +
The Addresslist class can be used to access information regarding the Cheat Engine table. It is commonly combined with [[MemoryRecord]].
  
 
'''addresslist_getCount'''(addresslist)
 
'''addresslist_getCount'''(addresslist)
Line 6: Line 7:
 
Returns the ammount of entires in the 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)
 
'''addresslist_getMemoryRecord'''(addresslist, index)
Line 11: Line 24:
 
Returns the [[MemoryRecord]] entry. The first object is indexed by 0.
 
Returns the [[MemoryRecord]] entry. The first object is indexed by 0.
  
 +
Example:
 +
  table=getAddressList()
 +
  memory_record1=addresslist_getMemoryRecord(table,0)
  
 
'''addresslist_getMemoryRecordByDescription'''(addresslist, string)
 
'''addresslist_getMemoryRecordByDescription'''(addresslist, string)
Line 16: Line 32:
 
Returns the [[MemoryRecord]] entry matched by the string. The description has to be an exact match, but is case-insensitive
 
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)
  
'''addresslist_getMemoryRecordByID'''(addresslist_getMemoryRecordByID)
 
  
'''addresslist_createMemoryRecord'''(addresslist_createMemoryRecord)
 
  
'''addresslist_getSelectedRecords'''(addresslist_getSelectedRecords)
+
----
 +
Don't know what these are:
  
 +
'''addresslist_getSelectedRecords'''(addresslist)
 +
Returns a array of selected Cheat Table entires. (??)
  
'''addresslist_doDescriptionChange'''(addresslist_doDescriptionChange)
+
'''addresslist_doDescriptionChange'''(addresslist)
 +
Change description(??)
  
'''addresslist_doAddressChange'''(addresslist_doAddressChange)
+
'''addresslist_doAddressChange'''(addresslist)
  
'''addresslist_doTypeChange'''(addresslist_doTypeChange)
+
'''addresslist_doTypeChange'''(addresslist)
  
'''addresslist_doValueChange'''(addresslist_doValueChange)
+
'''addresslist_doValueChange'''(addresslist)
  
'''addresslist_getSelectedRecord'''(addresslist_getSelectedRecord)
+
'''addresslist_getSelectedRecord'''(addresslist)
  
'''addresslist_setSelectedRecord'''(addresslist_setSelectedRecord)
+
'''addresslist_setSelectedRecord'''(addresslist)

Revision as of 18:50, 18 May 2012

Work in progress

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)