WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Bitmaps and Clipboard

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

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
File Created: 2001:11:08:12:40:12
Last Updated: 2001:11:08:12:40:12