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.
by 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
by 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
-
- Posts: 132
- Joined: Tue Sep 27, 2016 1:26 am
by 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 2 guests