If you just want to copy the selected line to clipboard, "clipboard $sline(@test,1)" would do the job, but judging from your code it looks like you are trying to do something else aswell..