I haven't tried this, but how about OnLayoutEnter instead.
As a matter of fact, this is a good example regarding querying FM on its FIND status (whether on or off). The check for number of records found compared to total records is not reliable to answer this (they might be equal at some point).
The previous script could check:
if [ insideAPerformFind ]
I agree with Al's comment. It looks like you're not using the most appropriate trigger.