Page 1 of 1

Ruby - Just calc on trigger

PostPosted: Thu May 23, 2013 10:19 pm
by chackl
Hello!

I have a simple question to ruby but i did not find anything that was useable.
I want to execute some lines in ruby only if a Trigger in incoming like that:
ruby trigger question.png
ruby trigger question.png (15.66 KiB) Viewed 8129 times


i think it is simple - but i do not get it :D

Regards

Re: Ruby - Just calc on trigger

PostPosted: Thu May 23, 2013 10:22 pm
by MyCo
Code: Select all
def event(i, v, t)
    output(@ins[0]+@ins[1]) if (i == 2)
end

Re: Ruby - Just calc on trigger

PostPosted: Thu May 23, 2013 10:28 pm
by chackl
Thanks it worked!!!