I have been searching the forums and the internet on how to make a script wait in the background for a file of a certain type to be opened. Once the file is opened, the script will perform what it needs to do then continue to wait for another file to be opened.
I have already written most of my script, I just cannot figure out how to make the script wait for the file to be opened.