Quitting printer application after processing

Here is my problem.

I’m trying to script my printer application (the one that launches when I’m printing something). I want make a script that watches if the app is running, if it does, wait for the spooling to end and then quit the application.

My problems are
¢ I don’t know how to make a script to watch over something
¢ And my printer application is not scriptable.

My printer is a Xerox Docucolor 242 and the application is “DC242”.

Here is what i’ve done so far. not much :confused:

	
quit application "DC242"

Thanks guys!