I think we have no access to the selected items in the Links Panel through scripting.
However you can write your own links panel with ScriptUI showing all links. From that one you could get access to the selected links of your custom panel.
More on ScriptUI and working with panels or windows here:
ScriptUI for dummies | Peter Kahrel
Uwe