This script is particularly useful when trying to figure out where emitters are in the emitterId attribute. The emitterId attribute is useful when emitting the same particle object out of multiple emitters but varying the per-particle attributes based on which emitter is spitting them out.
The problem with emitterId is that everytime you connect an emitter to the particles via the Dynamic Relationships editor it adds it one object higher in the array. However when you disconnect the emitter from the particles it doesn't shrink the array it just makes that number in the array empty. The next time you add another emitter or the same emitter, it will re-increment the array leaving blank spots making it hard to figure out where the emitter actually is in the emitterId attribute! (make sense?) :)
so, Using this script will return back to the script editor the full list of emitters actually connected to the particles and what their proper values in the emitterId are. Here is a sample front the script editor.
// Result:  emitter1  emitter7  emitter2  emitter5 //
What this means is... emitter1's emitterId is 0, emitter7's emitterId is 5, emitter2's emitterId is 7 and emitter5's id is 8
One tip, is that if you're using multiple emitters with 1 particle object you really want to change the emission seeds under the Emission Random Stream Seeds in the particleShape attribute editor.