Script sharing: selecting molecules of a given type

Attached is a Materials Studio script for everybody who has ever built a cell consisting of many different molecules and forgot to change the representation for one species, or would like to build sets containing only water etc. 

This script is executed from the User menu and expects an open document with at least one atom (or one fragment) selected. It goes through the entire document and selects all the fragments that have the same molecule type. 

Installation:
- copy the file SelectMoleculesOfSameType.pl to your Favourites folder, e.g. Documents\Materials Studio Projects\My Favourites
- open Tools | Scripting | Library | User Menu and import the SelectSameMolecule.xml file
- on the Scripting Library, make sure that the Script points to SelectMoleculesOfSameType.pl that you copied previously.
You should now have a "user" menu in the main menu bar that contains the new command.  

For further help, you may want to study the scripting tutorial at Tutorials | Scripting Tutorials | Executing Scripts from the User Menu.