Difference between revisions of "$sline"

From Scriptwiki
Jump to: navigation, search
 
m
 
Line 22: Line 22:
  
 
[[Category:Custom Windows]]
 
[[Category:Custom Windows]]
 +
[[Category:Window Identifiers]]

Latest revision as of 09:43, 3 February 2011

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