Difference between revisions of "Lua:getForm"

From Cheat Engine
Jump to navigation Jump to search
m (Correct the example to list all forms (it was missing the first one))
 
(4 intermediate revisions by one other user not shown)
Line 1: Line 1:
 +
[[Category:Lua]]
 
'''function''' getForm(''Index'')
 
'''function''' getForm(''Index'')
  
Line 15: Line 16:
  
 
== Examples ==
 
== Examples ==
  for i = 1, getFormCount() - 1 do
+
  for i = 0, getFormCount() - 1 do
 
   local frm = getForm(i)
 
   local frm = getForm(i)
 
   print(frm.ClassName)
 
   print(frm.ClassName)
Line 21: Line 22:
 
  end
 
  end
  
== See also ==
+
{{LuaSeeAlso}}
* [[Lua]]
 
* [[Help_File:Script engine|Script engine]]
 
  
 
=== Related Functions ===
 
=== Related Functions ===
* [[getFormCount]]
+
* [[Lua:getFormCount|getFormCount]]
* [[getMainForm]]
+
* [[Lua:getMainForm|getMainForm]]
* [[getSettingsForm]]
+
* [[Lua:getSettingsForm|getSettingsForm]]
* [[getMemoryViewForm]]
+
* [[Lua:getMemoryViewForm|getMemoryViewForm]]
* [[getLuaEngine]]
+
* [[Lua:getLuaEngine|getLuaEngine]]
* [[registerFormAddNotification]]
+
* [[Lua:registerFormAddNotification|registerFormAddNotification]]

Latest revision as of 09:00, 24 August 2020

function getForm(Index)

Returns the form at the specific index.

Function Parameters[edit]

Parameter Type Description
Index integer The index of the form to get

Examples[edit]

for i = 0, getFormCount() - 1 do
  local frm = getForm(i)
  print(frm.ClassName)
  print(frm.Caption)
end

See also[edit]

Related Functions[edit]