Detect File Open

Quick question.

Other than:

  1. AppleScript
  2. Shell command
  3. Window containing the file name

is there a Keyboard Maestro native way to test whether a file is open?

Thank you.

  1. Define "open". Actually, thinking about it, define "file" :wink:
  2. Decide if it actually matters...

Open for read access? For write access? Open in an app or in any process at all?

You can happily use KM to add text to a file that's already open in BBEdit, you can rename a file that's open in TextEdit, and so on.

A very open-ended "quick question" that may not have a quick answer!

Apologies, I should have been clearer.

Just to determine whether the file is open or not, it is a log file for monitoring purposes.