UI "commands" are the same as in game, so the command for sending a tell is, well, "tell".
Doesn't the community window already have an invite button? At least for the search results I'm fairly certain that it does. Otherwise you could make one yourself. Get the friend's name from the list's SelectedItem. The format is hopefully defined in some template file (can't check, am at work), telling you which parameter contains the name.
Grab the name and send it to the command line (command is "beginchatinput").
Happy modding!