Home › Forums › General XMetaL Discussion › copy paste a clipboard file › Reply To: copy paste a clipboard file
Reply to: copy paste a clipboard file
January 23, 2013 at 6:58 pmIf the path to the image is on the clipboard then you can use Windows File System Object to move or copy that file to the location you need it to be.
You can use the standard Windows ClipBrd.exe tool (aka: ClipBook Viewer) to see what formats are on the clipboard. You can then use XMetaL's clipboard API to get the path from the text on the clipboard (assuming it is there).
If what is on the clipboard is the actual bitmap image data (user pressed “print screen” or perhaps copied something from a graphics application) then you will need to use 3rd party software or write your own (possibly as a DLL) to save what is on the clipboard to a file. The solution will probably very much depend on which software you end up using and your exact needs (probably which image formats you wish to support). I suspect it would be quite tricky to implement this type of thing. If you wish to implement your own solution using a DLL then you could end up creating an event called On_Drop_