Answered
binary to text
Hi, I'm working on some project and need help, I have two text fields "Text1" and "Text2" in text1 there will be binary code I need text2 to translate that into text and show result, is that possible?
Hi, I'm working on some project and need help, I have two text fields "Text1" and "Text2" in text1 there will be binary code I need text2 to translate that into text and show result, is that possible?
You can use this in Text2 field as custom calculation script:
function binaryAgent(str) {
return String(str || "")
.trim()
.split(/\s+/)
.map(x => String.fromCharCode(parseInt(x, 2)))
.join("");
}
event.value = binaryAgent(this.getField("Text1").valueAsString);
Already have an account? Login
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.