[ANSWERED] help me. javascript!?!
-
how to fix what HEX - shows not lowercase letters but capital ones?screen-shot-2021-12-23-at-17.29.58.png
-
hex - "445c" - and you need what would be like that hex - "445C"
-
You need to paste this code:
function main() { return [arguments[0].toString(2), arguments[1].toString(16).toUpperCase(16)]; }
Best Michel
-
@michel said:
return [arguments[0].toString(2), arguments[1].toString(16).toUpperCase(16)];
thank you very much!!!
-
As described in Ryan Webber's article (see link at the end of my reply), you can use the print() function in combination with the Monitor window for debugging Javascript code.
This code worked :
function main()
Important: At first, the Javascript actor outputted only the digits of the Hex code, no letters A-F. It seemed to me that it converted the string back to integer due to automatic data conversion. After connecting the output of the Javascript actor to a Trigger Text actor it worked.
{
var outhex;
outhex = (arguments[0].toString(16)).toUpperCase();
print (outhex);
print ('\n');
return [arguments[0].toString(2), outhex ] ;
}Cheers, Gunther