$sline(@window,1) should return the 1rst selected line in the listbox. $sline(@window,0) returns the total number of lines selected, these only work in listboxes.