# Clipboard Plugin

Online Help

## Description

Clipboard is an action plugin that can be used to move text to and get text from the Windows clipboard.

Both 32-bit and 64-bit versions of the Clipboard action plugin are available in supported products. Action names and categories are identical, however when adding them to projects the 32-bit plugin is named "Clipboard" while the 64-bit version is named "Clipboard (64-bit)." Choose the appropriate version of the plugin based on whether the runtime using the plugin is a 32-bit or 64-bit executable.

## Actions

### Clipboard.CopyText (string Text);

#### Description:

Copies a string of text to the Windows clipboard.

#### Text:

(string) The text to copy to the clipboard.

#### Returns:

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.

#### Example:

    -- Copy some text to the clipboard
    Clipboard.CopyText("Hello World");

### string Clipboard.GetText ();

#### Description:

Retrieves text from the Windows clipboard.

#### Returns:

(string) A string of text from the clipboard, if available. If there is no text available an empty string will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

#### Example:

    -- Display text from the clipboard in a message box
    CBText = Clipboard.GetText();
    Dialog.Message("Clipboard Text", CBText);

### boolean Clipboard.IsTextAvailable ();

#### Description:

Determines whether text is available on the Windows clipboard.

#### Returns:

(boolean) True if text is available or false if text is not available. You can use Application.GetLastError to determine whether this action failed, and why.

#### Example:

    -- Is there any text on the clipboard?
    bTextAvailable = Clipboard.IsTextAvailable();

    -- Inform the user
    if bTextAvailable then
        Dialog.Message("Status", "There is text on the clipboard!");
    else
        Dialog.Message("Status", "There is NO text on the clipboard!");
    end

## Error Codes

12010 - Failed to open clipboard.

## Change Log

### 2.0.2.0

- Made the 'Clipboard.IsTextAvailable' action return false if there was a text entry on the clipboard, but it's data was empty.

### 2.0.1.0

- Compiled the 32-bit Clipboard action plugin using a newer compiler.
- Added a 64-bit version of the Clipboard action plugin (Clipboardx64.lmd) and plugin template file (_plugin_template.xml).

### 2.0.0.0

- Updated to version 2.0 of the plugin SDK.

## Additional Information

### Author:

Indigo Rose Corporation
http://www.indigorose.com/support/

### Copyright:

Plugin is copyright © 2003-2018 Indigo Rose Software Design Corporation.

### Website:

http://www.indigorose.com

Copyright © 2018 Indigo Rose Software Design Corporation.
All Rights Reserved.