about OnPluginLineReceived....

Posted by Maxhrk on Sun 02 Dec 2007 12:34 PM — 2 posts, 14,588 views.

USA #0
is it possible to find out what color(s) this line has.. from my understanding it probably don't do that, right?
Australia Forum Administrator #1
When that function is called the line is the last line in the output window (or maybe the last few, if it wraps around, because this is called at a newline, and if it is a long line the "real" line may start a couple of lines back on the screen).

You can use GetLinesInBufferCount to find the number of the last line, and then use GetLineInfo to find how many style runs are in that line. Finally you can use GetStyleInfo to find what colour each style is in.

http://www.gammon.com.au/scripts/doc.php?function=GetLinesInBufferCount
http://www.gammon.com.au/scripts/doc.php?function=GetLineInfo
http://www.gammon.com.au/scripts/doc.php?function=GetStyleInfo