Logic Machine Forum
Convert 4 byte to 2 byte - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8)
+--- Thread: Convert 4 byte to 2 byte (/showthread.php?tid=5673)



Convert 4 byte to 2 byte - Haug1 - 15.10.2024

Hi.

How do i make a script to convert a 4 byte value to a 2 byte value.

My 4 byte value is 3/4/0 
and my new 2 byte value is 3/4/7


RE: Convert 4 byte to 2 byte - Daniel - 15.10.2024

Create event script on 4 byte and paste this
Code:
value = event.getvalue()
grp.checkwrite('3/4/7', value)



RE: Convert 4 byte to 2 byte - Haug1 - 15.10.2024

Perfect. Thanks!