The simplest way is to add it to the address list and do
Code:
CEEdit1MR = AddressList.getMemoryRecordByDescription("Name of memory record")
if not CEEdit1MR then print("Failed to find memory record for CEEdit1MR")
else
CEEdit1UpdateTimer = createTimer()
CEEdit1UpdateTimer.Interval = 1000 -- update once a second
CEEdit1UpdateTimer.OnTimer = function(t)
CETrainer.CEEdit1.Text = CEEdit1MR.Value
end
-- called when the user presses enter
CETrainer.CEEdit1.OnEnter = function(sender)
CEEdit1MR.Value = CETrainer.CEEditBox1.Text -- or sender.Text
end
end
Those could be set in the gui editor in which case it'd look more like
Code:
function CETrainer_CEEdit1Enter(sender)
...
end
just because that's how the event handlers are named by default (form_name_event_without_on) and the gui sets the function based on the name in the trainer rather than assigning the function directly with lua.
there's also readBytes(address,numBytes) and writeBytes(address,numBytes) if you want to do it yourself for whatever reason. _________________
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum