Code:
alias popup { 
  if $1 == begin { return - }
  ;if $1 is begin, use - to start the popup.
  elseif $1 isnum 1- { return $read(<file>,$1) $+ : echo -a $read(<file>,$1) }
  ;if $1 is a number from 1 and onwards, return the $1'th line in <file>, and echo it.
  elseif $1 == end { return - }
  ; if $1 is end, use - to end the popup.
}
menu channel {
  file
  .$submenu($popup($1))
}


elseif $1 isnum 1- { return $read(<file>,$1) $+ : echo -a $read(<file>,$1) }

everything after ":" in the above line is what you want to do, $1 is always either "begin", "end" or a number in $submenu, unless $popup() (or any other alias you choose to use) uses /tokenize.

So:
return $read(<file>,$1) $+ :
That makes the popup name
echo -a $read(<file>,$1)
Is what you want the popup to do when you click it.


New username: hixxy