Search found 8 matches

by FineCutBodies
20 Jan 2017 02:52
Forum: General Discussion
Topic: Index in Switches Script
Replies: 12
Views: 2467

Re: Index in Switches Script

are the switches in the matrix set up as radio buttons? (i.e. - only 1 on at a time?) If so, you can do an "OnExpression (x) any" and then do a firstof(x) to get the one that is on. firstof() returns the index (0 based) of the first non-null item in an array. If you wanted to do processing for what ...
by FineCutBodies
20 Jan 2017 02:51
Forum: General Discussion
Topic: Index in Switches Script
Replies: 12
Views: 2467

Re: Index in Switches Script

I know it's not working, I just gave it as an example that how good it would be if I could get 'i' as an argument :) So no worry, the first script works well... I just told you how to make it work, not that it's not working. Create an expression called 'i'. I know, but that's not solving the ...
by FineCutBodies
19 Jan 2017 08:34
Forum: General Discussion
Topic: Index in Switches Script
Replies: 12
Views: 2467

Re: Index in Switches Script

My brain hurts at this point - so I'm going to have to get back to you on this later. I can really quickly tell you why screenshot 2 isn't working. If you define "i" in the script it's a local variable. If you create an expression called "i" it's going to act like what I would call a global ...
by FineCutBodies
19 Jan 2017 08:05
Forum: General Discussion
Topic: Index in Switches Script
Replies: 12
Views: 2467

Re: Index in Switches Script

*Edit #3* The more I think about this the more I see the problem you're running into. Maybe if you're finding that you can't get this to work without a workaround or inelegant solution, the problem is using switches and noteout() like this is like trying to force a square peg through a round hole ...
by FineCutBodies
19 Jan 2017 07:58
Forum: General Discussion
Topic: Index in Switches Script
Replies: 12
Views: 2467

Re: Index in Switches Script

I know the lack of context can be misleading and sorry for it, I just tried to minimize the "problem" to see if there is an easy answer for it, as couldn't find anything in the documentation or on the forum. Yeah your for loop also would work, I just don't want to send out 16 (or 64 in worst case if ...
by FineCutBodies
19 Jan 2017 05:57
Forum: General Discussion
Topic: Index in Switches Script
Replies: 12
Views: 2467

Re: Index in Switches Script

Thanks for your answer, but trust me I know what I do and yes you are right, that's exactly what the script has to do (and more, but that's not related here) :) no need for noteoffs, as these messages are triggers on the other side. Yes, I can solve it other inelegant ways (currently my project ...
by FineCutBodies
19 Jan 2017 04:12
Forum: General Discussion
Topic: Index in Switches Script
Replies: 12
Views: 2467

Index in Switches Script

Hi, Maybe it's just me, but couldn't find any information if there is a way to determine in script which Switch was changed on a Switches object's OnExpression callback? I have 16 Switches in a matrix and I can make a separate OnExpression callback for each like: OnExpression (x[0] is changing ...
by FineCutBodies
19 Jan 2017 04:11
Forum: Introductions
Topic: foo
Replies: 0
Views: 1171

foo

bar