Script to hide groups


I’m using Shift+Ctrl+Alt and a left-click to hide the eye lashes of my model.
I’ve recorded a video here:

I need to do this quite often and for different models.
However, since the vertex count never changes (only the topology of the model), I hope that I can automate this using a script.

I recorded a macro, but it would only record my canvas strokes.

I’m currently a bit lost on how I could script my actions.

Does anybody have any idea for me?