Difference between revisions of "Lua:Class:Addresslist"

From Cheat Engine
Jump to navigation Jump to search
m
Line 1: Line 1:
The Addresslist class can be used to access information regarding the Cheat Engine table. It is commonly combined with [[MemoryRecord]].
+
'''Control Class''': (Inheritance: [[Panel]]->[[WinControl]]->[[Control]]->[[Component]]->[[Object]])
  
'''addresslist_getCount'''(addresslist)
 
  
Returns the ammount of entires in the addresslist.
+
The Addresslist class can be used to access information regarding the Cheat Engine table. It is commonly combined with [[MemoryRecord]].
 
 
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)
+
===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
  
'''addresslist_doTypeChange'''(addresslist)
+
===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
  
'''addresslist_doValueChange'''(addresslist)
+
  getSelectedRecords():  Returns a table containing all the selected records
  
'''addresslist_getSelectedRecord'''(addresslist)
+
  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
  
'''addresslist_setSelectedRecord'''(addresslist)
+
  getSelectedRecord() : Gets the main selected memoryrecord
 +
  setSelectedRecord(memrec) : Sets the currently selected memoryrecord. This will unselect all other entries

Revision as of 21:17, 24 February 2015

Control Class: (Inheritance: Panel->WinControl->Control->Component->Object)


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


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