tcmd clearing clipboard

Jun 28, 2008
4
0
Hi there,
I'm getting a very regular issue with tcmd clearing the clipboard ( and sometimes inserting random single characters instead ). I've had this for a while, but I'm afraid I couldn't say since which version as at first I thought it was either just me going insane or having a very strange ability to fail to press <ctrl>-c <ctrl>-v properly.

My current version is TCC 12.11.76 x64 Windows 7 [Version 6.1.7601]

It appears to only be when copying from an explorer window and switching to tcmd.

I've traced it to tcmd by using a clipboard viewer, finding the HWND owner of the clipboard at the time of clearing, and then the process ID, which points to tcmd.exe.

It doesn't matter if I am trying to copy the full path, or part of the path, tcmd will just randomly obliterate it.

Anyone have any ideas?
 
May 20, 2008
11,527
102
Syracuse, NY, USA
Can you give us some steps to follow in trying to reproduce the problem?

On Tue, 01 Nov 2011 14:54:40 -0400, lemooseigh <> wrote:

|Hi there,
| I'm getting a very regular issue with tcmd clearing the clipboard ( and sometimes inserting random single characters instead ). I've had this for a while, but I'm afraid I couldn't say since which version as at first I thought it was either just me going insane or having a very strange ability to fail to press <ctrl>-c <ctrl>-v properly.
|
|My current version is TCC 12.11.76 x64 Windows 7 [Version 6.1.7601]
|
|It appears to only be when copying from an explorer window and switching to tcmd.
|
|I've traced it to tcmd by using a clipboard viewer, finding the HWND owner of the clipboard at the time of clearing, and then the process ID, which points to tcmd.exe.
|
|It doesn't matter if I am trying to copy the full path, or part of the path, tcmd will just randomly obliterate it.
|
|Anyone have any ideas?
 
Jun 28, 2008
4
0
All I need to do is
boot up tcmd
open an explorer window to any where ( local drives, windows share
copy all or part of the address in the address bar ( I alt-d and ctrl-c/ctrl-x )
alt-tab to tcmd
ctrl-v

Here, more often than not, is where the clipboard is trashed.

Using the context menu to copy/paste also fails at the same rate, and the same issue occurs if copying from internet explorer.

This only appears to occur from explorer/IE.
It doesn't appear to happen if I switch to another application before switching to tcmd (unless it's another explorer/IE window I switch to ).
It also doesn't happen when I copy from another app and switch to tcmd.


Can you give us some steps to follow in trying to reproduce the problem?
 
May 20, 2008
603
0
Sammamish, WA
TCC 12.11.76 x64 Windows 7 [Version 6.1.7600]
TCC Build 76 Windows 7 Build 7600

I can not reproduce what you report.

On Tue, Nov 1, 2011 at 12:56, lemooseigh <> wrote:


> All I need to do is
> boot up tcmd
> open an explorer window to any where ( local drives, windows share
> copy all or part of the address in the address bar ( I alt-d and
> ctrl-c/ctrl-x )
> alt-tab to tcmd
> ctrl-v
>
> Here, more often than not, is where the clipboard is trashed.
>
> Using the context menu to copy/paste also fails at the same rate, and the
> same issue occurs if copying from internet explorer.
>
> This only appears to occur from explorer/IE.
> It doesn't appear to happen if I switch to another application before
> switching to tcmd (unless it's another explorer/IE window I switch to ).
> It also doesn't happen when I copy from another app and switch to tcmd.
>
>
>
> ---Quote (Originally by vefatica)---
> Can you give us some steps to follow in trying to reproduce the problem?
> ---End Quote---
>
>
>
>



--
Jim Cook
2011 Monday: 4/4, 6/6, 8/8, 10/10, 12/12 and 5/9, 9/5, 7/11, 11/7.
Next year they're Tuesday.
 
May 20, 2008
11,527
102
Syracuse, NY, USA
On Tue, 01 Nov 2011 19:30:10 -0400, rconn <> wrote:

|Not reproducible here.

I can't reproduce it either.

But I did notice simething very interesting. If, in Explorer, I select a file
or directory, open the right-click context menu and choose "Copy" ... then go to
TCMD, I **can** (the interesting part) paste the file/dir **full name** into the
command line with right-click context menu\paste. At the same time consoles and
other apps expecting text in the clipboard see it as empty.

So TCMD's right-click\paste is doing something nice ... maybe recognizing
muliple formats in the clipboard or otherwise being smart enough to get the file
name and paste it. It would be nice if TCC could do that.

Note, it even works if multiple files/dirs are so selected ... they're pasted to
the command line in TCMD separated by spaces
 

rconn

Administrator
Staff member
May 14, 2008
12,404
152
So TCMD's right-click\paste is doing something nice ... maybe recognizing
muliple formats in the clipboard or otherwise being smart enough to get the file
name and paste it. It would be nice if TCC could do that.

Note, it even works if multiple files/dirs are so selected ... they're pasted to
the command line in TCMD separated by spaces

TCMD is doing a *LOT* of work to handle all of that.

Unfortunately, it's impossible in a stand-alone console app, because Windows won't pass the necessary mouse messages. Another reason to be running TCMD!
 
May 20, 2008
11,527
102
Syracuse, NY, USA
On Tue, 01 Nov 2011 21:26:32 -0400, rconn <> wrote:

|Unfortunately, it's impossible in a stand-alone console app, because Windows won't pass the necessary mouse messages. Another reason to be running TCMD!

I understand that you can't get the *console* to cooperate. But couldn't you
implement it (future version) for Ctrl-V, @CLIP[], @LINES[clip:], and
@LINE[clip:,n]? I imagine it could go something like this (not a heck of a lot
of work?).

If no clipboard text format is available, check for CF_HDROP; that's what the
shell uses for a collection of files "copied" via the right-click context menu.
If CF_HDROP is available, you can get the file count and names pretty easily,
like this.

Code:
WCHAR szFileName[MAX_PATH];
HDROP hDrop = (HDROP) GetClipboardData(CF_HDROP);
if ( hDrop != NULL )
{
	UINT nFiles = DragQueryFile(hDrop, 0xFFFFFFFF, NULL, 0);
	for ( INT i=0; i<nFiles; i++ )
	{
		DragQueryFile(hDrop, i, szFileName, MAX_PATH);
		wprintf(L"%s\n", szFileName);
	}
}

My personal preference would be that @LINES[clip:] count the files, @CLIP[n] and
@LINE[clip:,n] return them separately, but Ctrl-V give them all, space separated
and quoted. I didn't much like TCMD's pasting them **newline-separated** after
"Copy as path"; they're space-separated if copied in Explorer and pasted into
TCMD.
 
May 20, 2008
11,527
102
Syracuse, NY, USA
<nfiles; i++="" )
When I view my previous message on the forum, the "code" segment terminates after "for ( INT i=0; i" (no doubt because of the LT symbol next). But when I quote that post the quoted text includes all the code except only for the tail of the "for" line ... odd ... a bug?

Anyway, here's the code again.

</nfiles;>
Code:
OpenClipboard(NULL);
WCHAR szFileName[MAX_PATH];
HDROP hDrop = (HDROP) GetClipboardData(CF_HDROP);
if ( hDrop != NULL )
{
    UINT nFiles = DragQueryFile(hDrop, 0xFFFFFFFF, NULL, 0);
    for ( INT i=0; i LT nFiles; i++ )
    {
        DragQueryFile(hDrop, i, szFileName, MAX_PATH);
        wprintf(L"%s\n", szFileName);
    }
}
CloseClipboard()
<nfiles; i++="" )


Even though an error message is not in order when the clipboard contains nothing of interest, it's worth noting that if GetClipboardData() (as above) fails (CF_HDROP not available), GetLastError() will return 0.


</nfiles;>
 

samintz

Scott Mintz
May 20, 2008
1,511
18
Solon, OH, USA
TCMD is doing a *LOT* of work to handle all of that.

Unfortunately, it's impossible in a stand-alone console app, because Windows won't pass the necessary mouse messages. Another reason to be running TCMD!

If the data is already in the clipboard, why do you need mouse messages?

-Scott
 

samintz

Scott Mintz
May 20, 2008
1,511
18
Solon, OH, USA
Vince,

If it's that simple, you could create a plug-in command that converts the
clipboard contents from CF_HDROP to CF_TEXT. Then all the rest of the
regular clip: tools should just work.

-Scott



When I view my previous message on the forum, the "code" segment
terminates after "for ( INT i=0; i" (no doubt because of the LT symbol
next). But when I quote that post the quoted text includes all the code
except only for the tail of the "for" line ... odd ... a bug?

Anyway, here's the code again.

Code:
OpenClipboard(NULL);
WCHAR szFileName[MAX_PATH];
HDROP hDrop = (HDROP) GetClipboardData(CF_HDROP);
if ( hDrop != NULL )
{
UINT nFiles = DragQueryFile(hDrop, 0xFFFFFFFF, NULL, 0);
for ( INT i=0; i LT nFiles; i++ )
{
DragQueryFile(hDrop, i, szFileName, MAX_PATH);
wprintf(L"%s\n", szFileName);
}
}
CloseClipboard()


Even though an error message is not in order when the clipboard contains
nothing of interest, it's worth noting that if GetClipboardData() (as
above) fails (CF_HDROP not available), GetLastError() will return 0.
 
May 20, 2008
11,527
102
Syracuse, NY, USA
On Thu, 03 Nov 2011 13:25:05 -0400, samintz <> wrote:

|Vince,
|
|If it's that simple, you could create a plug-in command that converts the
|clipboard contents from CF_HDROP to CF_TEXT. Then all the rest of the
|regular clip: tools should just work.

Yes, but how would it be used? It would have to be cumbersome. Copy/paste is
usually done on-the-fly. If I were composing a command and wanted to paste,
say, a space-separated list of file names copied in Explorer, I couldn't execute
a command. I suppose I could implement a variable, say, _HDROP that would
return such a list. But being seamlessly built into all the clipboard features
provided by TCC seems much nicer.
 

samintz

Scott Mintz
May 20, 2008
1,511
18
Solon, OH, USA
Well, alternatively, you could make it a stand-alone application that gets
invoked via hot-key. Say Ctrl+Alt+V.
-Scott




On Thu, 03 Nov 2011 13:25:05 -0400, samintz <> wrote:

|Vince,
|
|If it's that simple, you could create a plug-in command that converts the

|clipboard contents from CF_HDROP to CF_TEXT. Then all the rest of the
|regular clip: tools should just work.

Yes, but how would it be used? It would have to be cumbersome. Copy/paste
is
usually done on-the-fly. If I were composing a command and wanted to
paste,
say, a space-separated list of file names copied in Explorer, I couldn't
execute
a command. I suppose I could implement a variable, say, _HDROP that would
return such a list. But being seamlessly built into all the clipboard
features
provided by TCC seems much nicer.
 
May 20, 2008
11,527
102
Syracuse, NY, USA
On Thu, 03 Nov 2011 14:54:43 -0400, samintz <> wrote:

|Well, alternatively, you could make it a stand-alone application that gets
|invoked via hot-key. Say Ctrl+Alt+V.

That could be done by a plugin keystroke handler. And I suppose I could do
@DROP[n] = count (n=0) or = the line itself (n=1 to count).
 
Similar threads
Thread starter Title Forum Replies Date
Jay Sage TCMD Macro Recorder Support 7
MickeyF equivalent to TCSTART.btm for TCMD? Support 4
D Fixed TCMD /X option Support 7
vefatica TCMD hides itself! Support 3
vefatica Tray min'd TCMD and ACTIVATE Support 6
C How to? starting TCC/TCMD v25 Support 2
CWBillow TCC and TCMD in Powershell Support 6
kb6ojs How to? "Specified Account Already Exists" error installing TCMD v27 Support 12
CWBillow TCMD Colors Support 8
Jay Sage Issues With TCMD File Explorer Support 0
C Last TCMD that supports win 7? Support 5
gentzel TCMD background color confusion Support 6
R Upgrade TCMD 19 to TCC 26 Support 1
Alpengreis Remaining TCMD background process (v26) ... Support 19
S Windows Server version not being detected correctly in TCMD 26RC2 Support 9
G TCMD crash when copy Support 3
Joe Caverly DrawVLine results different in TCMD tab and detached TCC Support 11
Alpengreis [TCMD v25.00.24] Small space problem with the DE translation in Prefs-GUI Support 1
Alpengreis [TCMD v25.00.24] Problem with copy and paste and the # char via mouse in TCC Support 6
Jay Sage TCMD Crashes with "tctoolbar /c /r file" Support 5
nikbackm TCMD 25 - Unregister older TCMD version Support 2
G Documentation on TCMD.INI Support 9
R New Clear Buffer in TCMD Home Menu Support 2
CWBillow Back up TCMD tabs Support 2
CWBillow Upgrade Windows 10's effect on TCMD and TCC Support 3
DrusTheAxe TCMD 24.02.49 x64 crashed due to DivideByZero :-( Support 4
A After update to 24.02.49, helpfile tcmd.chm hangs when opened Support 0
David McClelland TCMD 24 & Perl - perl thinks it's own executable is ...\TCMD24\TCC.EXE??? Support 3
dcantor How to? Can 32-bit TCC be run on a system with 64-bit TCMD and TCC installed? Support 6
W pdir returns diff results between tcc and tcmd - one is an error msg Support 5
vefatica What's TCMD's problem with ^e[0m? Support 13
CWBillow TCMD PowerShell Tab elevated Support 6
A How to? Copy+Paste in TCMD tabs with Ctrl-Shift-Ins? Support 5
vefatica TCMD output invisible on Win10 Support 22
J Moving from TCC v22 to TCMD v24 issues Support 3
RChrismon How to? Copy TCMD.INI to New Version Support 7
rps TCMD OPTIONS dialog Support 2
rps TCMD Tabs priority option setting Support 0
D Can we fix the scaling for TCmd? Support 14
CWBillow TCMD Tab Defs Support 4
A How to? TCMD Configuration Dialog: 'Smooth Scrolling' Option missing? Support 1
A Fixed [23.0.22]: TCMD crashes shortly after start, TCC keeps running in background Support 6
A TCMD - Dir Command puts out blank lines? Support 16
P Symantec Endpoint Protection trapped TCMD.EXE and said it contained WS.Reputation.1 (Virus?) Support 3
Emilio III TCMD Tab titles on Insider Windows Support 2
kb6ojs Want to start TCMD v20 with every Windows 10 bootup Support 3
D Tcmd 22.00.42 - annoying desktop refresh Support 47
CWBillow Context menu extensions for TCC/TCMD v18? Support 1
vefatica Pasting into TCMD via right-click menu? Support 2
M Please explain TCMD's ANSI x3.64 support Support 4

Similar threads