Why didn't it work when I tried to use the command
CopyText fromScreen=X[2,20] -toClipboard
in order to copy a text into Windows clipboard
?

You need the InputAssistant component in order to use the CopyText command.