Posted: Mon Apr 27, 2020 11:58 am Post subject: Making CE trainer with 4 byte value boxes that can be edited
Basically I have a CE table with addresses that take 4 byte values. I need to make a CE trainer that basically has boxes where these current values are being displayed and can be changed by the user and locked, or typed in and changed on a click of a button. In total I have 16 addresses with values and i need to have the values displayed in the box and changed by typing in another value. I don't really orient in this Lua stuff so any help would be appreciated.
if addressList.Count >= 1 then
UDF1.CELabel1.Caption = addressList.getMemoryRecordByDescription('Record 1').Address
UDF1.CELabel2.Caption = addressList.getMemoryRecordByDescription('Record 2').Address
-- and so on until 16 records
UDF1.CEEdit1.Text = addressList.getMemoryRecordByDescription('Record 1').Value
UDF1.CEEdit3.Text = addressList.getMemoryRecordByDescription('Record 2').Value
-- and so on until 16 records
end
function changeValue()
-- To be better if give conditional check for new values
local rec1val = UDF1.CEEdit2.Text
local rec2val = UDF1.CEEdit4.Text
local mr1 = addressList.getMemoryRecordByDescription("Record 1")
local mr2 = addressList.getMemoryRecordByDescription("Record 2")
-- and so on until 16 records
mr1.Value = rec1val
mr2.Value = rec2val
-- and so on until 16 records
mr1.Active = true
mr2.Active = true
-- and so on until 16 records
end
UDF1.Show()
UDF1.CEButton1.OnClick = changeValue
Capture.JPG
Description:
Filesize:
85.06 KB
Viewed:
1128 Time(s)
_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL
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