Script for warnings/alarms from Siemens PLC

Hello!
I want to ask if anybody has seen a script that shows warnings and alarms from Siemens PLC?
Right now I have this done, but it was without script.
For each variable I have created Instance (Siemens S7) and I make action (in german: Ereigniss) when this bit is high (1) then I make it visible with function IPS_SetHidden(…, false) and of course when whis warning/alarm is low (0) I make it invisible with the same function IPS_SetHidden(…, true)
What is annoying is that I have to do this for each bit…
When you have 10 or 20 warnings it doesn’t matter but when you have 100 or 1000?
Please help :wink:

Marcin