Try this:
on mouseUp
put space & the selectedLine of me into fld "message field" of
stack "message box"
put "select before text of fld" && quote & "message field" & quote
&& "of stack" && quote & "message box" & quote into whattodo
send whattodo to this stack in 30
end mouseUp