- Jun
- 1,092
- 48
I was caught off guard and surprised when testing a script that calculated some text and copied it to the clipboard. If I ran the command again, the text was not being copied. In addition, when the script was called from another script, control did not return (at least sometimes) to the calling script. Execution terminated as if the second script had been chained to rather than called.
So far, I have been unable to find a completely consistent pattern for this, and I'm hoping that someone can explain it. A few things things seem to repeat consistently.
So far, I have been unable to find a completely consistent pattern for this, and I'm hoping that someone can explain it. A few things things seem to repeat consistently.
- If I run something like
echo test > clip:for the first time, the text is copied to the clipboard. If I recall it from the history and run it again and again, the text is never copied again. It also is not copied if I retype the same command. I can also modify the command line in an insignificant way, such as removing the space between '>' and 'clip:' or adding extra space, and still nothing is copied to the clipboard.
- If I run the command
echo test | clipunder CMD in Windows Terminal, the text is copied, even if I do it right after sending the same text to the clipboard from TCC. Repeating the command does not result in anything being copied to the clipboard. If I return to TCC and recall the command, text is copied the first time, but not thereafter.