clipboard(
clipboard(
)

The clipboard( function returns whatever text is currently on the computer’s clipboard.

Parameters

No parameters.

Description

This function returns whatever text is currently on the computer’s clipboard.

Here’s an example that grabs a name from the clipboard and selects all the records containing that name:

    local findThis
    findThis=clipboard()
    select Name contains findThis

This example copies the contents of the clipboard into a variable before using it in the select statement. This is not absolutely necessary – in fact this procedure could have been written in a single line like this:

    select Name contains clipboard()

However, the original procedure will be much faster. Because of the overhead involved in accessing the operating system, accessing the clipboard is much slower than accessing a variable. If you’re only going to be accessing the clipboard a few times, by all means use it directly. But if you are going to access the clipboard over and over again (as the select statement does) it’s much better to copy the value into a variable first.

See Also

- clear -- deletes the contents of the current cell without touching the clipboard.
- clipboardimagesave -- saves an image on the clipboard as an image file (.jpg, .png, etc.).
- clipboardimagesize( -- returns the dimensions of whatever image is currently on the computer's clipboard.
- copy -- copies the contents of the current field onto the clipboard.
- cut -- deletes the contents of the current field, copying it onto the clipboard.
- paste -- pastes the contents of the clipboard into the current field.
- scrapcalc -- calculates a formula and stores the result in the clipboard. (Note: The same effect can be achieved by putting the word *clipboard* on the left side of an assignment.)

History

Version | Status | Notes
10.0 | No Change | Carried over from Panorama 6.0