Difference between revisions of "Lua:autoAssemble"
Jump to navigation
Jump to search
(Did I forgot to mention this wiki has syntax highlighting now?) |
m (Added missing break.) |
||
| (4 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
[[Category:Lua]] | [[Category:Lua]] | ||
| − | + | {{CodeBox|'''function''' autoAssemble(''text'', [''targetself'', ''disableInfo'']) ''':''' Boolean, Table}} | |
| − | '''function''' autoAssemble('' | ||
| − | + | Runs the Auto Assembler with the given text. | |
| − | + | * If ''targetself'' is set, it will assemble into Cheat Engine itself. | |
| + | * Returns ''true'' on success. | ||
| + | * As a secondary return, it provides a table you can use for disabling. | ||
| + | * If ''disableInfo'' is provided, the ''[Disable]'' section will be handled automatically. | ||
| − | |||
| − | === Function Parameters === | + | ===Function Parameters=== |
| − | + | {|width="85%" cellpadding="5%" cellspacing="0" border="0" | |
| − | {|width="85 | ||
!align="left"|Parameter | !align="left"|Parameter | ||
!align="left"|Type | !align="left"|Type | ||
| − | !style="width: | + | !style="width: 60%;background-color:white;" align="left"|Description |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
|- | |- | ||
| − | | | + | |text |
| − | | | + | |String |
| − | | | + | |The Auto Assembler script text to run. |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
|- | |- | ||
| − | | | + | |targetself |
| − | | | + | |Boolean (optional) |
| − | | | + | |If true, assembles into Cheat Engine itself. Default is false. |
|- | |- | ||
| − | | | + | |disableInfo |
| − | | | + | |Table (optional) |
| − | |If provided the [Disable] section | + | |If provided, will handle the ''[Disable]'' section. |
|} | |} | ||
| + | ===Returns=== | ||
| + | Boolean — ''true'' if the assembly succeeded.<br> | ||
| + | Table — Optional secondary table for handling disable info. | ||
| + | ===Example=== | ||
| + | <pre> | ||
| + | -- Simple AutoAssembler script | ||
| + | local disableTable | ||
| + | local success, disableTable = autoAssemble([[ | ||
| + | alloc(newmem,1024) | ||
| + | // ... | ||
| + | ]], true) | ||
| − | + | if success then | |
| − | + | print("Script assembled successfully") | |
| − | + | end | |
| − | + | </pre> | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | </ | ||
{{LuaSeeAlso}} | {{LuaSeeAlso}} | ||
| − | + | {{Assembly}} | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
Latest revision as of 20:48, 5 December 2025
| <> Function function autoAssemble(text, [targetself, disableInfo]) : Boolean, Table |
Runs the Auto Assembler with the given text.
- If targetself is set, it will assemble into Cheat Engine itself.
- Returns true on success.
- As a secondary return, it provides a table you can use for disabling.
- If disableInfo is provided, the [Disable] section will be handled automatically.
Function Parameters[edit]
| Parameter | Type | Description |
|---|---|---|
| text | String | The Auto Assembler script text to run. |
| targetself | Boolean (optional) | If true, assembles into Cheat Engine itself. Default is false. |
| disableInfo | Table (optional) | If provided, will handle the [Disable] section. |
Returns[edit]
Boolean — true if the assembly succeeded.
Table — Optional secondary table for handling disable info.
Example[edit]
-- Simple AutoAssembler script
local disableTable
local success, disableTable = autoAssemble([[
alloc(newmem,1024)
// ...
]], true)
if success then
print("Script assembled successfully")
end
See also[edit]
| Lua |
| Script Engine |
Related Functions[edit]
| autoAssemble |
| autoAssembleCheck |
| disassemble |
| splitDisassembledString |
| getInstructionSize |
| getPreviousOpcode |
| registerAssembler |
| unregisterAssembler |