Tutorial

Getting Started with Macros

Macro Editor

User Interface

Menus and Toolbar

Editing Macros

Macro Debugging

How To

Using variables

Finding and modifying objects

Creating new page content

Asking for user input

Storing persistent data

Using binary data

Sorting objects

Macro menus

Bulleted and numbered lists

Accessing the file system

Sample Macros

Concepts

Expressions

Objects

Properties

Variables

Data Types

Arrays

Functions

Literals

Operators

Comments

Last updated on: April 20, 2025
Also available as a single HTML file

Onetastic Macro Documentation > Functions > Clipboard Functions > Clipboard_Get

Clipboard_Get

Returns information from the clipboard for the specified format.

Syntax

String|Binary Clipboard_Get(String format)

Parameters

String format
The format to read from the clipboard. Possible values are: plain, html, image. Return type of the function is binary if this is set to image, and string otherwise.

Examples

// Get some text from the clipboard and insert into the current page title $page = GetCurrentPage() if (Clipboard_Query("plain")) $page.title.paragraph.text = Clipboard_Get("plain") // Get some HTML from the clipboard and insert into the current page if (Clipboard_Query("html")) $htmlBlock = InsertObject($page.outlines[0], "HtmlBlock", -1) $htmlBlock.value = Clipboard_Get("html") // Get some image from the clipboard and insert into the current page if (Clipboard_Query("image")) $image = InsertObject($page, "Image", -1) $image.data = Clipboard_Get("image")

Reference

Statements

Hierarchy Objects

Page Objects

Other Objects

Functions

Array Functions

Clipboard Functions

Data Store Functions

Data Type Specific Functions

Date/Time Functions

Dialog Box Functions

File System Functions

Macro Execution Functions

Macro Menu Functions

Object Functions

Special Functions

String Functions

Window Functions