Hello PSPad doesn't support events for scripting. Personally, I can't imagine to execute script during highlighting. It will deadly decrease speed of highlighting. All highlighting is made online based on code rules.
I don't understand "I want to format log windows code". Can you give me some example? -- <https://forum.pspad.com/read.php?2,71883,71884> PSPad freeware editor https://www.pspad.com
