¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

Re: Simpl + String Building


 

So, have you tried dumping the long integer straight into makestring using %lx or maybe %4lx?
something like ??

MakeString(Output$, "ABC\x00\x00%4lx\x0D", number);

From: <Crestron@...> on behalf of "nomorefloydsound@... [Crestron]" <Crestron@...>
Reply-To: <Crestron@...>
Date: Wednesday, January 2, 2019 at 12:35 PM
To: <Crestron@...>
Subject: [Crestron] Re: Simpl + String Building

?

Thank you for reply, Dustin...

The string coming in "10B0B" was already the hex equivalent of my converted long integer.? So it came in 68363 as a string, I converted it to a LONG INTEGER and then took the value of the LONG INTEGER and converted it to HEX using LToHex.

which gave me 10B0B.

So, I then made the string...

Byte3 = MID(CodeInHex, 1, 1);
Byte2 = MID(CodeInHex, 2, 2);
Byte1 = MID(CodeInHex, 4, 2);

MakeString(Output$, "ABC\x00\x00\\x0%1s\\x%2s\\x%2s\x0D", Byte3, Byte2, Byte1);

The Output$ string, when brought into SIMPL windows, shows EXACTLY what I need, but, when I try and send that code out of a PUSH statement it doesn't format it correctly.

PUSH Press
{?? ?
?String rString[50];?rString = TestModule.SendToDest(Output$);
?Print("Server Response = %s\n",rString);
?Server_Response = rString;
}

Join [email protected] to automatically receive all group messages.