Difference between revisions of "Lua:registerAutoAssemblerTemplate"

From Cheat Engine
Jump to navigation Jump to search
(Examples)
(Replaced content with '<span style="font-size:25px;color:red">Sorry! Content not available.</span>')
Line 1: Line 1:
[[Category:Lua]]
+
<span style="font-size:25px;color:red">Sorry! Content not available.</span>
'''function''' registerAutoAssemblerTemplate(''name'',''function'')
 
 
 
Registers a template to be used with the auto assembler window template menu
 
 
 
Returns an ID you can use with [[Lua:unregisterAutoAssemblerTemplate|unregisterAutoAssemblerTemplate]]
 
 
 
 
 
 
 
== Function Parameters ==
 
{|width="85%" cellpadding="10%" cellpadding="5%" cellspacing="0" border="0"
 
!align="left"|Parameter
 
!align="left"|Type
 
!style="width: 80%;background-color:white;" align="left"|Description
 
|-
 
|name
 
|String
 
|The command string it self
 
|-
 
|function
 
|function(script, sender)
 
|The function called when the user picks the script.  (script is a StringList object. sender is a frmAutoInject object)
 
|}
 
 
 
== Examples ==
 
registerAutoAssemblerTemplate('Better AOBScan script generator',function(script, sender)
 
  print("Do something with the script")
 
  script.add('//this is added by my script. Your script was '..script.Count..' lines long before this was added')
 
  script.add(string.format("//%.8x is the address you had selected in the disassembler", getMemoryViewForm().DisassemblerView.SelectedAddress))
 
end )
 
 
 
{{LuaSeeAlso}}
 
 
 
== Related Functions ==
 
* [[Lua:registerAutoAssemblerCommand|registerAutoAssemblerCommand]]
 
* [[Lua:registerAutoAssemblerPrologue|registerAutoAssemblerPrologue]]
 
* [[Lua:unregisterAutoAssemblerPrologue|unregisterAutoAssemblerPrologue]]
 
* [[Lua:registerAutoAssemblerTemplate|registerAutoAssemblerTemplate]]
 
* [[Lua:unregisterAutoAssemblerTemplate|unregisterAutoAssemblerTemplate]]
 
* [[Lua:generateCodeInjectionScript|generateCodeInjectionScript]]
 
* [[Lua:generateAOBInjectionScript|generateAOBInjectionScript]]
 
* [[Lua:generateFullInjectionScript|generateFullInjectionScript]]
 

Revision as of 11:09, 16 March 2019

Sorry! Content not available.