Announcement

Collapse
No announcement yet.

Copy to clipboard

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Copy to clipboard

    Anybody know the best way to copy text to clipboard thru AMS4? Dont want to use Ctrl+C ... looking to achieve it with a mouse click [img]/ubbthreads/images/icons/smile.gif[/img]

    There's gotta be a dll function for this??
    -
    = Derek
    ["All glory comes from daring to begin" - fortune cookie]

  • #2
    Re: Copy to clipboard

    Design time, or run time?
    --[[ Indigo Rose Software Developer ]]

    Comment


    • #3
      Re: Copy to clipboard

      Run time
      -
      = Derek
      ["All glory comes from daring to begin" - fortune cookie]

      Comment


      • #4
        Re: Copy to clipboard

        Derek,

        There is no built-in way to do that with AMS40. However, through the use of DLLs and the File.CallDLLFunction action, it is very easy.

        I put together a small DLL today that has 3 functions that it exports:

        BOOL IsTextOnClipboard() - Returns TRUE or FALSE depending on whether or not there is text available on the Windows clipboard.

        BOOL CopyTextToClipboard(LPCTSTR strText) - Puts text onto the Windows clipboard. Returns TRUE if successful or FALSE if it fails (I don't see why it would ever fail).

        LPCTSTR GetTextFromClipboard() - Gets the contents of the Windows clipboard if there is text available, returns an empty string ("") if not there.

        All of these functions are easy to call from AMS40. I have attached a zip file that has the DLL and a sample project for you to try out. Unzip it to "...\My Documents\AutoPlay Media Studio Projects\Clipboard DLL Test", keeping the Distribution folder in place.

        You (or any registered AMS40 user) may use and distribute this DLL freely at your own risk. Indigo Rose has not tested this DLL fully and it is not a supported Indigo Rose product. You get the idea...

        Let me know how it works for you!

        - Brett

        10644-ClipboardTestDLL.zip

        Comment


        • #5
          Re: Copy to clipboard

          Well I never expected that! [img]/ubbthreads/images/icons/shocked.gif[/img]

          Thank you very much. I have tried it and it works just fine. This could be extremely handy in many projects, I'm sure.
          Thanx Brett. Thanx IR [img]/ubbthreads/images/icons/smile.gif[/img]
          -
          = Derek
          ["All glory comes from daring to begin" - fortune cookie]

          Comment


          • #6
            Re: Copy to clipboard

            No problem... glad it worked for ya.

            [img]/ubbthreads/images/icons/smile.gif[/img]

            Comment

            Working...
            X