Get the selection text of the window