Finding out which pattern matched

Post Reply
Barnabus
Posts: 12
Joined: Tue Dec 11, 2012 12:03 am

Finding out which pattern matched

Post by Barnabus »

Hi all,

Given a multi-pattern OR trigger, I'd like to find out the index of the matching pattern. This would allow me to have one trigger on static command results (success and fail messages), and just check the index in my logic to see what happened.

I don't think this is currently possible.

Barnabus

User avatar
Vadi
Posts: 5050
Joined: Sat Mar 14, 2009 3:13 pm

Re: Finding out which pattern matched

Post by Vadi »

It's not current possible, but I'm not sure if it should be either - if you'd like your trigger to do something else entirely, it should be a different trigger that does a body of logic. Complicating triggers by cramming more things into them doesn't seem like the way forward.

Post Reply