Copy text to the windows clipboard

How can I copy a selected text with javascript. I checked on the Documentation and i found:


but is not explained very clear how to use it.

Can you tell me how it should be in javascript. Let’s say:

myText = ‘This is my text I want to copy’;

//exeoutput function
exeoutput.RunHEScriptCode(“SetClipboardText(” + myText + “)”);