Single script to select different things

 From:  Flowgun
11127.3 In reply to 11127.2 
This is amazing! thank you a lot, Michael!

it works exactly like I asked. Nevertheless, testing it gave me more ideas to make it more exhaustive:

- curve selection: if some curves are already selected, it selects the rest of curves also.

- Group selection: I use your script that groups selected objects by name (object_0001, object_0002,..).
Is it possible to make this script loop through named objects? (if one group is selected / nothing is selected)?

- point selection: if some points on a curve are selected, it selects the rest.

also, I noticed that if more than one object is selected, the script does nothing.
Maybe it would be useful to select the naked edges of all selected objects (can be useful for example to blend between two objects).
I had some other ideas for this, but for consistency's sake and keeping the script for selection only, I guess this is the most logical thing to do.