Introduction

Language Structure

IB Statements

File System

Comet 32 Runtime

Index

(Query Clipboard)

Mnemonic: (Query Clipboard)
Discussion: This mnemonic, which is used with the system driver (X00), determines if the Windows clipboard contains data. This mnemonic is issued via a PRINT statement (see example below).

This mnemonic returns a result string, so it is necessary to issue an INPUT statement following the PRINT statement. The result string is interpreted as follows:

ASC(result-string) = 0 clipboard does not contain data
ASC(result-string) NE 0 clipboard contains data

Also see:
(Copy from Clipboard)
(Copy to Clipboard)

History: This mnemonic was added in REL 01.05 and requires Build 292 or higher.
Example 1: This program opens the system driver and queries the Windows clipboard. If the clipboard does not contain data, the program loops repeatedly (or until the user presses the F3 key). During this loop process, if another application places data on the clipboard, this program breaks out of the loop, copies the contents of the clipboard to the RESULT$ variable and displays the value of RESULT$.
LENGTH 254 & LOCAL RESULT$
.
.
.
Open (1) "X00"
Print "Waiting for Clipboard data - F3 Transmit to exit..."
Do
  Print (1) (QueryClipboard)
  Input (1) Result$
    If (Asc(Result$) NE 0) Then _
      Break
Loop

Print (1) (CopyFromClipboard)
Input (1) Result$
Print "Clipboard data: ";Result$

Close (1)