Run MEL commands whenever a scene is opened or closed
 
 
 

A script node lets you attach a MEL script to a scene, and have the script run whenever the scene is opened (loaded from disk) or closed (when the user opens another scene file or starts a new scene).

Refer to the MEL and expressions guide for information on script nodes.