The rule with the ? was from youir example - see 2nd post in this thread.
Now i included your last example. But nothing happens.
I get many log-messages if i open a window, but all with the same text:
2017-01-12 19:37:12.902 [INFO ] [c.internal.ModelRepositoryImpl] - Refreshing model 'fensterkontakte.rules'
2017-01-12 19:37:44.301 [INFO ] [org.openhab.model.script.Test ] - There are 16 contacts that have a last update
2017-01-12 19:37:44.309 [INFO ] [org.openhab.model.script.Test ] - There are 16 contacts that have a last update
2017-01-12 19:37:44.309 [INFO ] [org.openhab.model.script.Test ] - There are 16 contacts that have a last update
2017-01-12 19:37:44.324 [INFO ] [org.openhab.model.script.Test ] - There are 16 contacts that have a last update
2017-01-12 19:38:34.216 [INFO ] [org.openhab.model.script.Test ] - There are 16 contacts that have a last update
2017-01-12 19:38:34.247 [INFO ] [org.openhab.model.script.Test ] - There are 16 contacts that have a last update
2017-01-12 19:38:34.327 [INFO ] [org.openhab.model.script.Test ] - There are 16 contacts that have a last update
2017-01-12 19:38:34.343 [INFO ] [org.openhab.model.script.Test ] - There are 16 contacts that have a last update
2017-01-12 19:38:34.347 [INFO ] [org.openhab.model.script.Test ] - There are 16 contacts that have a last update
2017-01-12 19:38:41.542 [INFO ] [org.openhab.model.script.Test ] - There are 16 contacts that have a last update
2017-01-12 19:38:41.601 [INFO ] [org.openhab.model.script.Test ] - There are 16 contacts that have a last update
2017-01-12 19:38:41.614 [INFO ] [org.openhab.model.script.Test ] - There are 16 contacts that have a last update
2017-01-12 19:38:41.646 [INFO ] [org.openhab.model.script.Test ] - There are 16 contacts that have a last update
2017-01-12 19:38:41.680 [INFO ] [org.openhab.model.script.Test ] - There are 16 contacts that have a last update
2017-01-12 19:38:41.684 [INFO ] [org.openhab.model.script.Test ] - There are 16 contacts that have a last update
2017-01-12 19:38:41.699 [INFO ] [org.openhab.model.script.Test ] - There are 16 contacts that have a last update
2017-01-12 19:38:41.780 [INFO ] [org.openhab.model.script.Test ] - There are 16 contacts that have a last update
2017-01-12 19:38:41.795 [INFO ] [org.openhab.model.script.Test ] - There are 16 contacts that have a last update
2017-01-12 19:38:45.196 [INFO ] [org.openhab.model.script.Test ] - There are 16 contacts that have a last update
2017-01-12 19:38:45.206 [INFO ] [org.openhab.model.script.Test ] - There are 16 contacts that have a last update