Thank you. I now had a second look at the example scripts, and while most of them are not really helpful for what I need, I found one script that is useful for me :)
-- <https://forum.pspad.com/read.php?2,79198,79243> PSPad freeware editor https://www.pspad.com