Page 1 of 1

OSC

PostPosted: Tue Jun 09, 2020 11:20 pm
by satanete666
I am writting a macro to send osc commands with a lot of diffente parameters and i need to know if the length is divisible by four, how can i compare to know if is true or not.

Thanks in advance

Re: OSC

PostPosted: Wed Jun 10, 2020 4:03 pm
by justyn roy
To see if the length is divisible by 4:

Code: Select all
Var isDivisable = false
Var count = InputBox1.Text.EncodeBytes.count
Var modulo = Math.Mod(count, 4)

If modulo = 0 {
   isDivisable = true
}

debugMessage(isDivisable)


Of course, you can take away the 'debug message' if you'd like, I just have that in there so you can see what the result is.

Have fun!

Re: OSC

PostPosted: Mon Jun 15, 2020 10:33 pm
by satanete666
thank you Justin