Logic Machine Forum
ADD STRING TO OBJECT NAME - 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: ADD STRING TO OBJECT NAME (/showthread.php?tid=5137)



ADD STRING TO OBJECT NAME - Frank68 - 07.12.2023

HI
I have to change the name of the object, I recovered the name, so far everything is ok, how do I check if it is different from nothing, also how do I rewrite the new name

to read I created a loop with the group addresses and I would also like to use it to rewrite if different from null.

Thank you


RE: ADD STRING TO OBJECT NAME - Daniel - 07.12.2023

Use
Code:
if not value then
...
end
where value is your null string


RE: ADD STRING TO OBJECT NAME - Frank68 - 07.12.2023

(07.12.2023, 08:39)Daniel Wrote: Use
Code:
if not value then
...
end
where value is your null string
 perfect
if i need read the name of object
in name var
after  I need rewite the new_name in the same address, how can I do it ?


RE: ADD STRING TO OBJECT NAME - admin - 07.12.2023

Check this: https://forum.logicmachine.net/showthread.php?tid=3033


RE: ADD STRING TO OBJECT NAME - Daniel - 07.12.2023

To find the name
https://kb.logicmachine.net/libraries/lua/#grpfindalias
to update it
https://kb.logicmachine.net/libraries/lua/#grpcreateconfig