Basic Scripting advice needed


sry if this was already asked, but couldn’t find anything with search.
But i just need a basic guide how to create scripts.

I want to change from ioBroker and i already have a lot of scripts, like checking Battery state of Homematic devices and some taskstasks because of absense.

So what i need is a possibilty to create scripts and if possible a chance to use a scripting tool with syntax highlighing,…

Thx in advance.

In openHAB, those are called rules:

There is also an experimental rules engine which you could try:

Edit: another option, if you have programming skills: