Any built-in way to get the path for a selected file/folder ?

I want to get the path of a selected file/folder. For what I'm doing everything is on my Desktop so I use:

[Action]: Save selected text to variable selected_text
[Action]: Run Apple Script (blocking)

on run

tell application "BetterTouchTool"
set input to get_string_variable "selected_text"
end tell

set selected_session to (((path to desktop folder) as string) & input)

end run

Is there a better way to do this? Preferably to just get the path of a selected variable regardless of location.