Difference between revisions of "Lua:getMemoryViewForm"

From Cheat Engine
Jump to navigation Jump to search
m
m (Syntax Highlighting.)
 
Line 13: Line 13:
  
 
===Examples===
 
===Examples===
<pre>
+
<syntaxhighlight lang="lua" line>
 
local memoryView = getMemoryViewForm()
 
local memoryView = getMemoryViewForm()
  
Line 20: Line 20:
 
   memoryView.bringToFront()
 
   memoryView.bringToFront()
 
end
 
end
</pre>
+
</syntaxhighlight>
  
<pre>
+
<syntaxhighlight lang="lua" line>
 
local memoryView = getMemoryViewForm()
 
local memoryView = getMemoryViewForm()
  
Line 29: Line 29:
 
   print("Visible: " .. tostring(memoryView.Visible))
 
   print("Visible: " .. tostring(memoryView.Visible))
 
end
 
end
</pre>
+
</syntaxhighlight>
  
<pre>
+
<syntaxhighlight lang="lua" line>
 
local memoryView = getMemoryViewForm()
 
local memoryView = getMemoryViewForm()
  
Line 37: Line 37:
 
   print("The main Memory View is currently focused")
 
   print("The main Memory View is currently focused")
 
end
 
end
</pre>
+
</syntaxhighlight>
 
 
===Notes===
 
* This function returns the original/base Memory View form.
 
* It does not return additional Memory View windows that may have been opened.
 
* The returned object can be used like a Form object.
 
  
 
{{LuaSeeAlso}}
 
{{LuaSeeAlso}}
  
 
{{Forms}}
 
{{Forms}}

Latest revision as of 19:52, 26 June 2026

<> Lua API Reference

function getMemoryViewForm() : Form

Returns the main Memory View form object.

There can be multiple Memory View windows, but this function only returns the original/base Memory View form. The returned object can be accessed using the Form class methods and the methods of the classes it inherits from.

Function Parameters[edit]

This function has no parameters.

Returns[edit]

Form — The main Memory View form object.

Examples[edit]

1 local memoryView = getMemoryViewForm()
2 
3 if memoryView ~= nil then
4   memoryView.show()
5   memoryView.bringToFront()
6 end
1 local memoryView = getMemoryViewForm()
2 
3 if memoryView ~= nil then
4   print("Memory View caption: " .. tostring(memoryView.Caption))
5   print("Visible: " .. tostring(memoryView.Visible))
6 end
1 local memoryView = getMemoryViewForm()
2 
3 if memoryView ~= nil and memoryView.isForegroundWindow() then
4   print("The main Memory View is currently focused")
5 end

Main Pages

Core Lua documentation entry points

Lua
Script Engine

Form Related Classes