Getting the selection in Adium


I am trying to get the selection i have made in the adium message window into a variable.
Normally this works just fine with the finder.
Do you know what to do?

Here is the code:

tell application “Adium”
set theResult to the selection as text
end tell


I figures it out by using a copy function…