OSC

Christie Widget Designer Version 6 - Q&A

Moderator: Moderator Group

Forum rules
When asking make sure to include the operating system and the revision of Widget Designer you are using.

OSC

Postby satanete666 » Tue Jun 09, 2020 11:20 pm

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
satanete666
 
Posts: 193
Joined: Fri May 20, 2011 5:20 pm

Re: OSC

Postby justyn roy » Wed Jun 10, 2020 4:03 pm

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!
Justyn Roy

Online Manual
User avatar
justyn roy
 
Posts: 132
Joined: Tue Sep 27, 2016 1:26 am

Re: OSC

Postby satanete666 » Mon Jun 15, 2020 10:33 pm

thank you Justin
satanete666
 
Posts: 193
Joined: Fri May 20, 2011 5:20 pm


Return to Widget Designer V6

Who is online

Users browsing this forum: No registered users and 14 guests