View previous topic :: View next topic |
Author |
Message |
usernotfound Expert Cheater Reputation: 0
Joined: 21 Feb 2016 Posts: 115
|
Posted: Wed Dec 07, 2016 2:35 am Post subject: Reading from multiple lines in memo object |
|
|
How could I do something like this with multiple lines, so that whatever is written in the memo object gets written to the autoAssemble line by line?
Code: | AAscriptenable = UDF1.CEMemo1.Lines
AAscriptdisable = UDF1.CEMemo2.Lines
function CECheckbox1Change(sender)
if sender.Checked then
autoAssemble(string.format([[
%s
]],AAscriptenable))
else
autoAssemble(string.format([[
%s
]],AAscriptdisable))
end
end |
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 457
Joined: 09 May 2003 Posts: 25262 Location: The netherlands
|
Posted: Wed Dec 07, 2016 2:52 am Post subject: |
|
|
to get the full text use AAscriptenable.Text
to get an individual libe use [] e.g. AAscriptenable[123456]
also, since you are using a disable part i recommend you add this as an entry to the table, and just set the Active property of the memoryrecord to true/false. (the standalone autoAssemble command can not use dealloc)
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
usernotfound Expert Cheater Reputation: 0
Joined: 21 Feb 2016 Posts: 115
|
Posted: Wed Dec 07, 2016 3:32 am Post subject: |
|
|
I tried this
Code: | function CECheckbox1Change(sender)
local aL = getAddressList()
local rec = aL.getMemoryRecordByDescription('AArec')
rec.Script = UDF1.CEMemo1.Text
if sender.Checked then
rec.Active = true
else
rec.Active = false
end
end |
But nothing came up in the entry, using Lines[] works but I'm not sure how to add all lines at once. And would this still work in a compiled .exe trainer since it is using CE MainForm?
edit: Oops my mistake didn't realize you meant Lines.Text, that works perfectly. Thanks DB!
|
|
Back to top |
|
|
|