Hello, thanks for your quick answer. Please excuse me very much, it is my mistake. What I actually meant: [i]In the editor I want to execute code when text is _selected_.[/i]
Purpose: When the user selects a word (or part of a word), the script should highlight all identical occurrences. . - Format log windows code - My log parser is: [i][color=#0000FF]%F(%L[/color][color=#FF0000],%C[/color][color=#0000FF]) : %E[/color][/i] This works well, it finds errors such as "... (123[color=#FF0000],14[/color]) ...", sets an red error marker and jumps to the error line in the editor when I double-click. Everything fine. But it does not find errors like "... (123) ...", no error marker, no jump. [IMG]https://s17.directupload.net/images/191010/dm7duyb5.png[/IMG] Unfortunately the log-parser does not allow wildcards. If I change the log-parser to *[color=#0000FF]%F(%L) : %E[/color]* it finds both error forms, but the column specifications are missing. So I thought I'd check the text in the log-win with VBScript and add the column specification (*",1"* as dummy). I found a way in VBScript to start the code automatically with PSPad (init section), but no way to run the code all the time to notice changes in the editor or log-win. All codes with do-loop and "Sleep", "Wait", "Timeout", etc. totally blocked PSPad, or had other unwanted effects. Maybe it would work with a timer, but I searched for days and found no possibility for VBScirpt. I have a code for an (API-)timer in VB-Classic, but found no way to convert it to VBScript. For that and for some other things ;-) I would need a way to detect changes in the editor and log-win. -- <https://forum.pspad.com/read.php?2,71883,71890> PSPad freeware editor https://www.pspad.com
