06-29-2007, 12:16 PM
I'm processing copying in other applications triggered on Cc:
This results in several applications on my computer reporting the inability to access the clipboard every other time Ctrl+C is pressed. Is there a better way? A true trigger on the WM_DRAWCLIPBOARD notification would be preferable since it would also handle copy via the mouse, cut, copy with another keyboard shortcut, etc. Thanks.
;;keep stack of recently copied text
int+ cc_next ;; global variable to hold last copied position
str+ cc_last ;; last string copied
def MAX_CLIPBOARD 30
;;retrieve clipboard contents
str s.getsel
s.trim
if s.len > 3 and s.len < 30000 and s <> cc_last
,;;determine next filename to store text in
,cc_next + 1
,if cc_next > MAX_CLIPBOARD
,,cc_next = 1
,;;write to file
,s.setfile(ClipFilename(cc_next))
,cc_last = s
,
key Cc
This results in several applications on my computer reporting the inability to access the clipboard every other time Ctrl+C is pressed. Is there a better way? A true trigger on the WM_DRAWCLIPBOARD notification would be preferable since it would also handle copy via the mouse, cut, copy with another keyboard shortcut, etc. Thanks.