Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

WAD Another Clipboard Problem Under Windows 11

Jun
528
3
To verify the problems I've been seeing on my Windows 10 desktop, I've tried exploring the clipboards on my Windows 11 laptop, and I came across a further anomaly. It appears that CLIP0: is not recognized properly. In the following sequence, the clipboards start out cleared. Then I try to type the contents of CLIP0:,

TCC(30.00.21) (80%): C:\commands\bat>clip
CLIP0:
CLIP1:
CLIP2:
CLIP3:
CLIP4:
CLIP5:
CLIP6:
CLIP7:
CLIP8:
CLIP9:

TCC(30.00.21) (80%): C:\commands\bat>type clip0:
TCC: (Sys) Element not found.
"C:\Users\ms-j\AppData\Local\Temp\CTMP4420.JPS"

The command generates an error message. The same thing happens with type clip: (without the zero). The other numbered clipboards work fine.
 
WAD (very old behavior). If you don't have anything in your clipboard TCC will return an error message (and it always has).

Not under Windows 10.

TCC(30.00.22): C:\>clip /z

TCC(30.00.22): C:\>clip
CLIP0:
CLIP1:
CLIP2:
CLIP3:
CLIP4:
CLIP5:
CLIP6:
CLIP7:
CLIP8:
CLIP9:

TCC(30.00.22): C:\>type clip:

TCC(30.00.22): C:\>

By the way, the error message syntax is still wrong. It shows only a clipboard number for the /S option.

Usage : CLIP [/C clipn:] [/R n] [/S n text][/Z]]

It seems a bit odd that all the options except for /R require a full clipboard name while /R does not. To get around all of the extra typing and to add extra features, I have written a batch script with extended syntax.

TCC(30.00.22): C:\>clp //

Syntax options:

1. Display contents of specified clipboard(s):

CLP # [ # ... ], where each # can also be a range (#-#)

2. Clear contents of specified clipboard(s):

CLP /C # [ # ... ], where each # can also be a range (#-#)

3. Set contents of specified clipboard:

CLP /S # string

4. Clear all the clipboards (equivalent to "CLP /C 0-9")

CLP /Z
 
Not under Windows 10.

I changed the behavior in build 22 so that if the clipboard is completely empty it will not display anything. If the clipboard contains something but it isn't in a text format, you will still get the error.

Try it with every other version of TCC prior to 30,0,22, and you'll get the error message.

It seems a bit odd that all the options except for /R require a full clipboard name while /R does not. To get around all of the extra typing and to add extra features, I have written a batch script with extended syntax.

CLIPn: would make no sense with /R, which is the number of rotations you want to perform.
 
CLIPn: would make no sense with /R, which is the number of rotations you want to perform.

That's not how I understood the help text.

/R Rotates the clipboards to make clipboard n the default

It does not say that n is the number of rotations; it says that clipn: will move into position 0.

Anyway, it doesn't really matter so long as it works using the syntax displayed. That is not the case with the syntax for the /S option in the error message, nor in the message that appears in the status bar.

As long as the clipboards rotate asynchronously, I don't see myself using them, so all this is academic. I'm still having a very hard time understanding the use you intended for them. If they are used in a long-running batch script, one might be doing other work in other applications that involves clipping text to the Windows clipboard, and the batch script would have no way of knowing.
 
As long as the clipboards rotate asynchronously, I don't see myself using them, so all this is academic. I'm still having a very hard time understanding the use you intended for them. If they are used in a long-running batch script, one might be doing other work in other applications that involves clipping text to the Windows clipboard, and the batch script would have no way of knowing.

I don't understand why you think this is different from using the clipboard in Windows (in any app, not just TCC) for the past 25 years. If you used CLIP: you would never know if some other app overwrote it before you referred to it again.

You could make the same argument that you could never use file names in batch files, because you never know if some other app might have overwritten or deleted them. At some point, you just have to take control of your system.
 

Similar threads

Back
Top