Posted: Mon May 22, 2017 6:02 am Post subject: Ctrl edit value
Hello. My idea is that example my value is 0011. If I choose Ctrl, value will be 0012. Then If I don't choose Ctrl, value will come back first value
Can anybody help me make the above idea?
Couldn't you see what writes to the address then edit the instruction (or something similar) so when [Enabled] it adds 1 (or mov's 12 into it) and when [Disabled] it mov's 11 into it. When you save it to the address table, right click it and set a hotkey to Toggle it.
There's probably an easier way which just involves the address and no assembly but in the hotkey menu i can't see an increase when toggled and decrease when untoggled option.
Freeze it, set value to desired value, when desired value changes then change the value and CE will keep that value set. If you want a GUI then when your checkbox or whatever is selected/enabled you set the value to 12 and when it's deselected/disabled you set the value to 11.
For a checkbox you get code like this:
Code:
mr = getAddressList().getMemoryRecordByID(1)
function CECheckbox1Change(sender)
mr.Active = true -- make sure it's frozen (really could do outside function)
mr.value = sender.Checked and 12 or 11 -- remember lua is decimal by default
end
If that's not good enough then you'd need to use a script like NotJustSomeGuy mentioned (in the gui code you'd set mr.Active to sender.Checked and not mess with mr.value since scripts don't have a value for you to change).
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