This script extends and improves the functionality of the button in the material editor labeled "Select by Material". I was always frustrated by this button because to effectively get every object with a specific material applied I always had to unfreeze/unhide everything, and on heavy scenes, this proved to be difficult. Also, using this functionality is rough because it will only select the group head if an object that has the material applied is part of a group, resulting in me mistakenly assigning materials to whole groups.
This script allows you to select the material, click the button and have all the objects that material is assigned to selected (even if they are hidden or frozen), if the objects happen to be a part of a group, it will open every level of the group till it gets to the object with the assigned material, and select only it.
Run the script, goto Customize->Customize User Interface, Toolbars, Group: "Main UI", Category: "All Commands", drag the item "SelectObjsByMaterial" to a toolbar, or alternatively assign it to a QUAD menu.
Now, open the material editor and pick an object assigned to something in your scene (doesn't matter if the object is hidden/frozen/grouped etc.) and click the hotkey, the result will be you will have every object in the scene with that material selected (even if you can't see them, they are still selected).
Alternatively if you assign this script to a quad, you will also have an alternate box, if you use the alt box from the quad, it will automatically unhide/unfreeze all the objects making sure you can see them, so you know exactly what you're affecting.