Brian Dunning's FileMaker Custom Functions

AS_set_clipboard ( text )

Set the clipboard to the content of a field that is not present in the current layout or set it to a text string (Apple only).

  Average rating: 3.7 (71 votes) Log in to vote

Thomas Siebert   Thomas Siebert - Show more from this author
http://www.t-seabird.de

Share on Facebook Share on Twitter

  Sample input:
AS_set_clipboard ( "hello" )
  Sample output:
"hello" is set to the clipboard

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

Set the clipboard to the content of a field that is not present in the current layout or set it to a text string.

The FileMaker Scriptstep "Copy" can not be used for this task if the field is not present or if you want to have a specific text string inside the clipboard.

Use the cf within the scriptstep "Perform AppleScript".
Choose the option "Calculated AppleScript".

You also may use "Perform AppleScript" directly from a button.

 

Comments

Vince   Vince, France
May 11, 2010
How is it supposed to work ?
It's impossible, I even bothered to try thought I was pretty sure it was useless.

You have to use a perform applescript at some point, and then the CF is unnecessary.

Could you tell us how to make it work, what's your reasoning
 
Thomas Siebert   Thomas Siebert
May 12, 2010
Sorry, I forgot to write the hint to use the function within the scriptstep "Perform AppleScript".

You have to choose the option "Calculated AppleScript".
You also may use "Perform AppleScript" directly from a button.

I remembered to add these lines after I already posted the function. Unfortunately my Internet was down for a Day so I had no chance to correct it fast enough.

The reason is that the ScriptStep "Copy" does only work when a field is present in the current layout.
With that AppleScript You'll be able to access any field of your table or relation.
I wrote the cf to be able to get an incoming phone number from a global field into the pastboard optionally.
 
Nick Lightbody   Nick Lightbody, Deskspace Systems Limited
Mar 10, 2011
Very useful, thanks, solved my problem
 
Happy   Happy, SLC, UT
Apr 19, 2011
Perfect! Just what I needed! Thanks!
 
Troy Krueger   Troy Krueger, Muffetta's
Sep 27, 2021
I cannot get it to work with a field.
It works find with 'hard' text ie.
But not with ```AS_set_clipboard ( "Testing" )```
But not with ```AS_set_clipboard ( T01_ACCOUNTS::Service_Address_Comp )```
I'm sure I'm missing something.
I am using the 'calculated AppleScript' option with a 'perform applescript' step in a script.
Any help would be greatly appreciated.
 
Troy Krueger   Troy Krueger, Muffetta's
Sep 27, 2021
ERG!, never mind, I got it.
THANK YOU, nice little CF.
Cheers
 

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 20 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth: