Clipboard Verbs and Functions

For this topic's original documentation, see:

CLIPCLEAR Verb - Clear Clipboard Data

CLIPFROMFILE Verb - Copy File Data to Clipboard

CLIPFROMSTR Verb - Copy String to Clipboard

CLIPISFORMAT() Function - Get Clipboard Format Availability

TIM=int In BBj 20.20 and higher, the TIM=int option will cause the CLIPISFORMAT() function to timeout, reporting an error, if it's not able to read the clipboard within int seconds. TIM=0 is equivalent to not specifying the TIM=int option at all.

CLIPLOCK Verb - Lock Clipboard

BBj cannot lock the clipboard, so the CLIPLOCK verb has no effect. In BBj, all clipboard-related verbs and functions should include an ERR= option because an !ERROR=92 (Clipboard unavailable) error can happen at any time.

CLIPREGFORMAT() Function - Register Clipboard Format

CLIPTOFILE Verb - Copy Clipboard Data to New String File

CLIPTOSTR() Function - Get Clipboard Data in Specified Format

TIM=int In BBj 20.20 and higher, the TIM=int option will cause the CLIPTOSTR() function to timeout, reporting an error, if it's not able to read the clipboard within int seconds. TIM=0 is equivalent to not specifying the TIM=int option at all.

CLIPUNLOCK Verb - Unlock Clipboard

BBj-Specific Information

In BBj 6.00 and higher, the BBj clipboard supports the following formats:

Format Number

Microsoft Window Name

Comments

1

CF_TEXT

 

2

CF_BITMAP

 

7

CF_OEMTEXT

 

13

CF_UNICODETEXT

 

15

CF_HDROP

The string is assumed to be a list of filenames separated by $0D0A$.

CLIPREGFORMAT("HTML")

"HTML Format"

 

CLIPREGFORMAT("RTF")

"Rich Text Format"

 

CLIPREGFORMAT("CSV")

 

 

CLIPREGFORMAT("BMP")

 

 

CLIPREGFORMAT("JPEG")

 

 

CLIPREGFORMAT("PNG")

 

 

CLIPREGFORMAT("GIF")

 

Added in BBj 19.10

BUI-Specific Information

BUI logoBrowsers impose strict security rules on clipboard access: "As with many new APIs, the Clipboard API is only supported for pages served over HTTPS. To help prevent abuse, clipboard access is only allowed when a page is the active tab. Pages in active tabs can write to the clipboard without requesting permission, but reading from the clipboard always requires permission."