Difference between revisions of "Lua:getMemoryViewForm"

From Cheat Engine
Jump to navigation Jump to search
(Added example of setting address of the hex view)
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
[[Category:Lua]]
 
[[Category:Lua]]
'''function''' getMemoryViewForm() ''':''' [[Form]]
+
'''function''' getMemoryViewForm() ''':''' [[Lua:Class:MemoryView]]
  
 
Returns the main memory view [[Form]] class object which can be accessed using the [[Form]] class methods  
 
Returns the main memory view [[Form]] class object which can be accessed using the [[Form]] class methods  
Line 9: Line 9:
  
 
== Examples ==
 
== Examples ==
 +
-- see MemoryBrowserFormUnit in CE source
 
  local frm = getMemoryViewForm()
 
  local frm = getMemoryViewForm()
  getMemoryViewForm().ComponentByName['HexadecimalView'].address = 0x540000
+
  local hv = frm.HexadecimalView
 +
--
 +
-- see hexviewunit in CE source
 +
--  TDisplayType = (dtByte, dtByteDec, dtWord, dtWordDec, dtDword, dtDwordDec, dtQword, dtQwordDec, dtSingle, dtDouble);
 +
hv.address = 0x540000
 +
hv.DisplayType = 4 -- dtDword
 +
 
  
 
{{LuaSeeAlso}}
 
{{LuaSeeAlso}}

Latest revision as of 04:41, 24 March 2020

function getMemoryViewForm() : Lua:Class:MemoryView

Returns the main memory view 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.

Function Parameters[edit]

<none>

Examples[edit]

-- see MemoryBrowserFormUnit in CE source
local frm = getMemoryViewForm()
local hv = frm.HexadecimalView
--
-- see hexviewunit in CE source
--  TDisplayType = (dtByte, dtByteDec, dtWord, dtWordDec, dtDword, dtDwordDec, dtQword, dtQwordDec, dtSingle, dtDouble);
hv.address = 0x540000
hv.DisplayType = 4 -- dtDword


See also[edit]

Related Functions[edit]

Related Classes[edit]