How to put ASCII codes in strings

I know this is a dumb question and has been asked before.

I've tried searching but I am lacking the ability to word the question in such a way I get the right answer.

I want to include CHR$(15) in a message a few times.

I guess that I will be using the template node, but getting that into a valid syntax is my sticking point.

Someone - please.

With a bit of digging I found this could work:

In a function node rather than a template node.

msg.payload = msg.payload + String.fromCharCode(15,15,15);

and it gets the desired result.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.