Well, although it's not purely DM-based solution, I would suggest CrysTBox software (see the first link below) which includes a tool for automated analysis of SAED patterns. It's a standalone application for Windows (Linux version to be released) distributed together with a DM plug-in allowing for a comfortable analysis of images opened/acquired using DM.
However, if you are rather interested in some DM script, which does not require installation of any other software, then take a look at Dave Mitchell's web page (the second link below). He has implemented many great tools, including those for automated analysis of SAEDs from polycrystalline materials.