AnsweredAssumed Answered

Generic copy to clipboard script?

Question asked by disabled_JustinClose on Jan 13, 2013
Latest reply on Feb 20, 2015 by eric


Generic copy to clipboard script?


     I am trying to be a bit helpful to my end users and create a system that will automatically copy the contents of a field to their clipboard.  (Yes, this overwrites their clipboard...not a problem.)  This is necessary because they will be pasting these contents into another application.

     So, I have done this with a single field for a single script.  But I would like to make it generic, because I have a large number of fields that I would like to apply this to, and I don't want to make a new script for each one.

     This sounds like the job of a few design functions and Get(activefieldname).  But, it appears that the only internal (with no plug-ins) way of getting things on the clipboard is to use Copy().  This allows you to set a field, but not by calculation, only by fully-qualified name (using a chooser pop-up).  If you don't give a field, it copies all fields in the current record (according to the documentation).  This doesn't allow for much generic-ness.

     I was thinking that I could perhaps plop a global field somewhere, have the script copy whatever the active field contents are, paste them into that global, and then have the Copy() just always work against that global field.  But that seems a bit awkward and complex. 

     Anyone have any better ideas?