Two consecutive MIDI packet trigger?

Hi, I'm currently using Keyboard Maestro to emulate HUI protocol to trigger macros when a track is muted and unmuted. The mute status is conveyed in two packets, the first denoting which channel, and the second denoting which port. I've been trying to do something where I have a macro that triggers on the first packet, set a variable to 1, waits a very short amount of time, then sets that variable to 0. Then I have a macro that triggers on the second packet, it checks the variable status, and if the variable is 1, it executes. However, Pro Tools can spit a lot of packets out in a very short amount of time, and my macro is triggering when I don't want it to because it's not specifically looking for two consecutive packets. Is there any way to make a trigger that would only activate with two specific consecutive packets?

Figured it out. I made a macro to catch every other channel (zone) select packet than the ones I actually want, and it sets an inhibit variable. That makes it so I can trigger on the two packets in succession, because any other zone select packet kills the trigger.

Hi, could you be so kind and show me how you did it and share your scripts with me?
I want to read out the status of an active solo via HUI and then talk to my GPIO Buttons on the mixing desk to show the status.
I think i have to check BO OC 16 and then B0 2C 43 (for the Solo LED) and for turning it off BO OC 16 and B0 2C 03 (for Solo LED off).