How to say in message which windows are open?

Have a look at the “Useful Templates, Template to get a list of entities” here: