$line

From Scriptwiki
Jump to: navigation, search

Line is used to get information on a line of text in an mIRC window. Note this works for channel windows as well as custom windows.

$line(window, line[, T])[.state|.color]
  • Window is the mIRC window to check.
  • Line is the line number to check. 0 will return the number of lines in the window.
  • T is an optional flag to specify which location.
    • 0 means the display area, 1 means the listbox.
  • The .state property returns $true or $false based on whether or not the line is selected.
  • The .color property returns the line's color.
  • No property returns the string at this line, $null, or the number of lines (if line = 0).

Example

if ($line(@mywindow,5,1).state) { echo -atg Line 5 is selected. }
if ($line(@window,5) == The end is near) { echo -atg Apparently the end is near. }
if ($line(@window,5).color == 1) { echo -atg Line 5 is in black. }