Clipboard Copy Data
Keywords: binary bufffer clipboard copy data
This code can extract the results of hilighting a few files or directories in Windows Explorer and selecting the "COPY" operations.The files/directories selected are placed on the clipboard in a CF_HDROP type format.
Using the Binary function the clipboard contents can be placed in a binary buffer, the extricated with a little code.
Test carefully.
CF_HDROP=15 bb=binaryalloc(3000) BinaryClipGet(bb,CF_HDROP) offset=BinaryPeek(bb,0) BinaryReplace(bb,"",@tab,1) data=BinaryPeekStr(bb,offset,BinaryEODGet(bb)-offset) eod=StrIndex(data,strcat(@tab,@tab),0,@fwdscan) data=strsub(data,1,eod-1) BinaryFree(bb) message("Clipboard drop data",StrReplace(data,@tab,@crlf))
Article ID: W14827