MAXScript Listener output colorization


#1

Maxscript listener certainly lacks of output colorization and style.
Occidentally I found that if we set lexer type of the edit window to xml it slightly improves output readability.

fn ToggleListenerLexer type:#xml =
(
	local SCI_SETLEXER = 4001
	local SCI_GETLEXER = 4002
	local hwnd = (dotNetClass "Autodesk.Max.GlobalInterface").Instance.TheListener.EditBox
	
	local current = windows.sendMessage hwnd SCI_GETLEXER 0 0
	
	
	if current == 0 then
	(
		case type of
		(
			#xml : windows.sendMessage hwnd SCI_SETLEXER 5  0
			#mxs : windows.sendMessage hwnd SCI_SETLEXER 81 0
		)		
	)
	else
	(
		windows.sendMessage hwnd SCI_SETLEXER 0 0
	)	
)
ToggleListenerLexer()

7UTtI5EowB

Can it be somehow improved further? Custom styling for certain patterns would be nice