That's not super easy unless the script is holding the file open currently or the script is altering the file as a user that is only used by that script. There isn't a residual "this is the script that created the process that altered this file" metadata anywhere. You have to connect the file to the process that changed it to the script that made that process. That's a bit.
The easiest thing to do, I'm sure, is to approach this from the application side and find out what it uses to do these tasks and handle it that way.