MIDI in DAT ->ordered sequence>trigger

Hello there

I would love to make a small app which shows a special picture associated with the correctly imputed/ordered MIDI messages.
In a callbacks of MIDIin DAT I can make a short script to connect the final picture with any incoming midi message I want. But I can’t figure out how to do it for an ordered sequence of a MIDI messages (f.e. if someone press three different keys on my MIDI keys).

Thanks in advance

ok, solved by capturing the message`s indexes, transform them to a string(text) and finally use an if statement with searching specific index sequence in that string…