Code: Select all
ClipAll := ClipboardAll
ClipSize := VarSetCapacity(ClipAll)
Msgbox % ClipSize
Code: Select all
ClipAll := ClipboardAll
ClipSize := VarSetCapacity(ClipAll)
Msgbox % ClipSize
Not sure exactly how to go with it, might be quicker to save it to binary file with FileAppend, else venture down the burrow of delayed rendering as to what Petzold suggests:ClipboardAll works by iterating through the available clipboard formats, storing the data of each format. Some programs use delayed rendering and possibly other tricks, so the full data being copied isn't actually in the clipboard. I'm not sure whether the methods used by AutoHotkey will trigger delayed rendering; if not, perhaps that's the problem. However, MSDN seems to imply that it should be automatic:
The system sends the clipboard owner a WM_RENDERFORMAT message when a request is received for a specific format that has not been rendered.
HTHIf your program can transfer only one format of data to the clipboard (text, for instance), you can combine the
WM_RENDERALLFORMATS and WM_RENDERFORMAT processing. The code will look something like this:
case WM_RENDERALLFORMATS :
OpenClipboard (hwnd) ;
EmptyClipboard () ;
// fall through
case WM_RENDERFORMAT :
[put text into global memory block]
SetClipboardData (CF_TEXT, hGlobal) ;
if (message == WM_RENDERALLFORMATS)
CloseClipboard () ;
return 0 ;