I don't think you can do that. The closest you can get is to start a projector automatically...but you can't close it automatically. Even that much, needs a plugin to do it.
Normally though, you leave the projector up all the time, and curate what goes to it. What are you actually doing?
en.wikipedia.org