General XMetaL Discussion

XMetaL Community Forum General XMetaL Discussion copy paste a clipboard file

  • pooh2583

    copy paste a clipboard file

    Participants 1
    Replies 2
    Last Activity 9 years, 8 months ago

    Hi,

    I am copying a particualr image file on a clipboard, and i want to copy paste that clipbord file into a loacation where my xml file (ActiveDocument ) is present.

    How to achieve this copy paste functionality for Xmetal

    Please Reply

    Regards

    Reply

    Derek Read

    Reply to: copy paste a clipboard file

    If 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_ where the latter portion is defined by Application.AcceptDropFormat or ActiveDocument.AcceptDropFormat. There is limited documentation for this in the Programmers Guide under the topic “when objects are dropped”. It is limited because we do not have an example of a DLL that can handle a specific clipboard format and no guidance as to how you would write one. You might get started with a search like this: http://www.google.com/search?q=dll+clipboard+format

    Reply

    pooh2583

    Reply to: copy paste a clipboard file

    Thank you , for the reply

    Reply

  • You must be logged in to reply to this topic.

Lost Your Password?

Products
Downloads
Support