Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

Clipboard.GetText

Queries clipboard content as text.

Component Version macOS Windows Linux Server iOS SDK
Clipboard 2.6 ✅ Yes ✅ Yes ❌ No ❌ No ✅ Yes
MBS( "Clipboard.GetText" { ; type } )   More

Parameters

Parameter Description Example Flags
type The data type.
By default NSStringPboardType, but can be other Mac types.
Mac only.
"" Optional

Result

The text from the clipboard. Empty if no text is there.

Description

Queries clipboard content as text.
Examples for type parameter: public.utf8-plain-text, CorePasteboardFlavorType 0x54455854, public.rtf,CorePasteboardFlavorType 0x75747874.

For server this will query the clipboard of the user account running the server app on the server computer and not the clipboard of any client.

You may want to use Text.ReplaceNewline function with mode = 1 on the text to normalize line endings to what FileMaker expects.

Examples

Get text from clipboard:

MBS("Clipboard.GetText")

Query addressbook data from Contacts app:

MBS("Clipboard.GetText"; "ABPeopleDictPboardType")

Get design from clipboard after copying it in FileMaker:

MBS("Clipboard.GetText"; "dyn.agk8u")

See also

Release notes

Example Databases

Blog Entries

This function checks for a license.

Created 18th August 2014, last changed 5th March 2024


Clipboard.GetStyledText - Clipboard.GetTypes