Difference between revisions of "Lua:writeString"
Jump to navigation
Jump to search
m |
m (Syntax Highlighting.) |
||
| Line 29: | Line 29: | ||
===Examples=== | ===Examples=== | ||
| − | < | + | <syntaxhighlight lang="lua" line> |
-- Write an ASCII string to address 0x123456 | -- Write an ASCII string to address 0x123456 | ||
local success = writeString(0x123456, "Hello, world!") | local success = writeString(0x123456, "Hello, world!") | ||
| Line 36: | Line 36: | ||
-- Write a widechar (Unicode) string to a CEAddressString | -- Write a widechar (Unicode) string to a CEAddressString | ||
writeString("game.exe+1234", "Unicode Text", true) | writeString("game.exe+1234", "Unicode Text", true) | ||
| − | </ | + | </syntaxhighlight> |
{{LuaSeeAlso}} | {{LuaSeeAlso}} | ||
Latest revision as of 15:43, 25 June 2026
Writes a string to the specified address in the currently opened (target) process. Set WideChar to true to write the string as widechar (UTF-16/Unicode). Returns true on success.
Function Parameters[edit]
| Parameter | Type | Description |
|---|---|---|
| Address | Integer or CEAddressString | The address in the target process to write to. |
| Text | String | The string to write. |
| WideChar | Boolean (optional) | Set to true to write as a widechar (UTF-16/Unicode) string. Default is false (ASCII/ANSI). |
Returns[edit]
Boolean — true if the write was successful, false otherwise.
Examples[edit]
1 -- Write an ASCII string to address 0x123456
2 local success = writeString(0x123456, "Hello, world!")
3 print("Write successful:", success)
4
5 -- Write a widechar (Unicode) string to a CEAddressString
6 writeString("game.exe+1234", "Unicode Text", true)