[DISABLE]
["Tutorial-i386.exe"+1FD5D0]+480:
{$lua}
local value
if UDF1.CECheckbox1.Checked then
value = 750
else
value = 250
end
if not value then return 'db *' else
return ('dd %x'):format(value) end
{$asm}
Code:
-- generic checkbox handler
local checkboxChangedHandler = function(sender)
local al = AddressList or getAddressList()
local mr = al.getMemoryRecordByDescription(sender.Name)
if not mr then return end
AutoAssemble(([[
%x:
dd %x
]]):format(mr.currentAddress, sender.Checked and 500 or 100))
end
for i=0,UDF1.ComponentCount-1 do
local c = UDF1.Component[i]
if c.ClassName == 'TCECheckBox' then
c.OnChange = checkboxChangedHandler
end
end
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