$sline

From Scriptwiki
Revision as of 20:38, 11 May 2008 by Aca20031 (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