Trigger for "when application X opens any file"?

Is it possible to have a Trigger for "when application X opens any file"?

Or do I have to just use "focused window changes" and scan for window title changes? (This is harder due to having to account for all application prompts with window titles, but is less powerful in some cases, like when the user opens the same file — which results in the same window title — as they had open previously.)

1 Like

Nyet...

It used to be possible to monitor the macOS for file-open events, although Apple has played games with some of the tools over the last decade or more.

I don't see an open-file event in LaunchD, but I'm not an expert...

Here are a couple of rabbit holes you can chase:

1 Like