Closing Pictures with Active Scripts

A script cannot be fully executed if the picture containing it is closed or replaced. Therefore, if you use the Close method on the picture which contains the active script, the Close method should appear as the last method in the script. Otherwise, the picture closes before the rest of the script can run.

Remember that some command subroutines, such as ReplacePicture and ClosePicture, contain the Close method, so they are also affected.