Don't use EnumQmThreads. Use Statement at the start of the function (see my previous post). Get caller's text with _s.getmacro(iid), and parse that text.
To highlight, use SendMessage(GetQmCodeEditor SCI.XXX ...) where XXX is a Scintilla message documented in the Scintilla website. I don't remember what message to use.
To highlight, use SendMessage(GetQmCodeEditor SCI.XXX ...) where XXX is a Scintilla message documented in the Scintilla website. I don't remember what message to use.