I don’t know how practical it is (because it uses sampleImage(), which can bring your system to its knees), but this should start a counter (which you could use to drive a triggered action) whenever it detects something in your Difference Matte layer:
L = thisComp.layer("Difference Matte Layer");
tRun = 0;
s = L.sampleImage([L.width,L.height]/2,[L.width,L.height]/2);
trig = (s[0]+s[1]+s[2]) > 0;
t = time - thisComp.frameDuration;
while (t >= 0){
s = L.sampleImage([L.width,L.height]/2,[L.width,L.height]/2,true,t);
if (trig){
if (s[0]+s[1]+s[2] == 0){
tRun = time - t;
break;
}
}else{
trig = (s[0]+s[1]+s[2]) > 0;
}
t -= thisComp.frameDuration;
}
tRun