$sline

From Scriptwiki
Revision as of 09:43, 3 February 2011 by Vliedel (talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Returns the selected line in a window listbox.

$sline(@window, line)[.ln]
  • @window is the custom window with a listbox to look in. The window MUST have a listbox.
  • Line is the line number to retrieve. In other words, the Nth selected line.
  • Returns: The Nth selected line in @Window
    • If the .ln property is specified, it will return the line number in the window that the Nth selected line is on.
    • If N=0, returns the total number of selected lines.

Examples

There are $sline(@mywindow,0) lines selected in @mywindow.
The 5th selected line is: $sline(@mywindow,5)

This is re-invinting the wheel to demonstrate .ln

The 5th selected line is: $line(@mywindow,$sline(@window,5).ln)

See Also

window $window $line $fline