Fixed CLIPMONITOR problems

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
#1
Running version of TCC below in its own window (not a TCMD tab).

TCC 14.02.38 Windows XP [Version 5.1.2600]
TCC Build 38 Windows XP Build 2600 Service Pack 3
Registered to E. S. Fabian

Issued command
CLIPMONITOR forever f:\loc\raw.btm

The batch program just copies the clipboard contents to a file with the next available numeric name (e.g., 1000.raw,1001.raw, etc.). It works perfectly when I perform the following:
a/ load the clipboard from the highlighted area of a Firefox tab using the ctrl-C hotkey,
b/ switch to the TCC window (using alt-tab),
c/ execute the batch file from the command line.

Problems:
1/ CLIPMONITOR did not automatically detect the change of clipboard contents
2/ When I performed the actions abc above manually, the monitor was triggered, but it reported that the TCC trial period had expired. The "exit" option terminated the registered TCC instance.

I have always had issues using the monitor-type commands, this may also be a problem of not using it properly, but the documentation gives no help.
 
#2
The first part of your post seems to simply note that the clipboard is working.

But the second part seems to be a bug. After issuing

Code:
clipmonitor forever beep
nothing I do with the clipboard causes a beep.
 
#5
I don't know if it applies, but ... from what little I've read, since Vista, in order to receive WM_CLIPBOARDUPDATE, you must AddClipboardFormatListener(HWND).

And in a quick test (Win7), calling AddClipboardFormatListener() **does** make the difference between receiving and not receiving WM_CLIPBOARDUPDATE.
 

rconn

Administrator
Staff member
May 14, 2008
10,162
86
#7
I don't know if it applies, but ... from what little I've read, since Vista, in order to receive WM_CLIPBOARDUPDATE, you must AddClipboardFormatListener(HWND).
It is not necessary to use AddClipboardFormatListener in Win7, though it's less fragile than SetClipboardViewer (which uses WM_DRAWCLIPBOARD, not WM_CLIPBOARDUPDATE).
 
#8
Rex:
CLIPMONITOR now works in the manner desired - but only twice! The first two times it executed the batch file specified correctly. Note that batch file does NOT execute any other programs or batch files, though it does use global aliases. However, on the third change of clipboard contents (from a webpage displayed in a Firefox tab) the message signaling that the trial version of TCC expired popped up again, and selecting "exit" closed the (registered) TCC window. Started a new instance of TCC 14.02.39, once again the third change of clipboard content was fatal...
Notes:
1/ installation directory is F:\JPSOFT\I14; .ini and TCSTART.BTM and TCEXIT.BTM files reside in F:\JPSOFT.
2/ TCC is normally started with a command explicitly specifying both its full path and the full path of the .INI file to be used, in the directory in which the .INI file is. TCStartPath directive is set to "." This method works for 4nt V5 and all later command processors, both from the command line and from desktop shortcuts (many invokable by hotkeys).
 
#10
This sequence makes TCC disappear!
Code:
v:\> clipmonitor forever echo foo
 
v:\> foo [now just playing]
foo
foo
foo
    clipmonitor /c [actual command]
 
v:\> clipmonitor forever echo %@clip[0]
Code:
TCC  14.02.39
Module=C:\Windows\SYSTEM32\ntdll.dll
Address=77852F8B
Exception=C00000FD
EAX=7FFDB000  EBX=00000000  ECX=08803040  EDX=00000000
ESI=00000308  EDI=08803064  EBP=08803028  ESP=08802FD4
CS=0000001B  DS=00000023  ES=00000023  SS=00000023
Flags=00010206
 
Stack:
1 : ntdll.dll 00000001:00051f8b
2 : USER32.dll 00000001:0001b590
3 : USER32.dll 00000001:00014294
4 : USER32.dll 00000001:00014582
5 : TakeCmd.dll 00000001:0007ebc3
6 : USER32.dll 00000001:0001b4e7
7 : USER32.dll 00000001:0001b5e7
8 : USER32.dll 00000001:00014294
So does this (a little better formed); GPFfile is the same.
Code:
v:\> clipmonitor forever echo %%@clip[0]
 
v:\> tor f [just playing]
ver
pmonito
echo %@clip[0]
    clipmonitor /c [actual command]
 
v:\> clipmonitor forever echo %%@clip[0]