0
Answered
Level value in two digits
I need to send a volume command from a level (min 0, max 38).
The command is '<11VOxx',x0D where xx is the value for the volume. For the first 9 digits the value from the level is 0,1,2 ...9, but I need to send 00,01,02 ... 09. How can I get the value from the level in two digits, for the first 9 values?
Thank you
The command is '<11VOxx',x0D where xx is the value for the volume. For the first 9 digits the value from the level is 0,1,2 ...9, but I need to send 00,01,02 ... 09. How can I get the value from the level in two digits, for the first 9 values?
Thank you
Customer support service by UserEcho
function lev () { var level = IR.GetItem("Page 1").GetItem("Item 1").Value if (level < 10) {var level = "0"+level.toString(); IR.SetVariable("Tokens.Lev", level)} else {IR.SetVariable("Tokens.Lev", level.toString())} }Something like this?