Creating Single Trigger from multiple similar events

Need help,

I need to have trigger on two different images that appears randomly every 5-15 minutes on same region – around 100x100 pixels. I am using event On Image Appear.

Image A and Image B appear and disappear randomly multiple times. I need to have trigger on following conditions:

  1. Trigger only on the first appearance of Image A, ignore all consecutive Images A and trigger on the first appearance of Image B.
  2. Next, the same process: After trigger on the first Image B, ignore all consecutive Images B and trigger on the first appearance of the Image A.
  3. Repeat Forever

I tried to solve it different ways using single and parallel processes but no success. I am using Desktop Applications.

Thank you,
River