|
<< Click to Display Table of Contents >> Navigation: 3. Script Language > Clipboard Commands > Set Clipboard Text > Clipboard Commands |
MiniRobotLanguage (MRL)
CLB.Set by Type
Set Clipboard Data by its Type
Intention
CLB.Set by Type is designed to place data onto the system clipboard in a specified format. This functionality is essential for enabling data exchange between your application and other applications running on the same system. It allows users to copy data from your application and paste it elsewhere, or vice versa, enhancing the interoperability and user experience.
Constant Name |
Value |
Comment |
|---|---|---|
CF_TEXT |
1 |
Text format |
CF_BITMAP |
2 |
Bitmap format |
CF_METAFILEPICT |
3 |
Metafile picture format |
CF_SYLK |
4 |
Microsoft Symbolic Link format |
CF_DIF |
5 |
Software Arts' Data Interchange Format |
CF_TIFF |
6 |
Tagged Image File Format |
CF_OEMTEXT |
7 |
Text format containing characters in the OEM character set |
CF_DIB |
8 |
Device Independent Bitmap |
CF_PALETTE |
9 |
Color palette format |
CF_PENDATA |
10 |
Pen data format |
CF_RIFF |
11 |
Resource Interchange File Format |
CF_WAVE |
12 |
Waveform audio format |
CF_UNICODETEXT |
13 |
Unicode text format |
CF_ENHMETAFILE |
14 |
Enhanced metafile format |
CF_HDROP |
15 |
Handle to a list of file names |
CF_LOCALE |
16 |
Locale identifier |
CF_DIBV5 |
17 |
Version 5 device independent bitmap (DIB) |
CF_MAX |
18 |
Maximum clipboard format value used in the enumeration |
Syntax
CLB.Set by Type|P1|P2
Parameter Explanation
P1 - This parameter represents the data you want to place on the clipboard.
It must be passed as a string, which can contain any text or data that you wish to copy to the clipboard.
P2 - This parameter specifies the format of the clipboard data.
Windows supports a variety of predefined clipboard formats (like CF_TEXT, CF_BITMAP, etc.) as well as custom formats defined by applications.
The format is passed as a number "1" or as a String like "CF_Text".
This value determines how the clipboard data should be interpreted by the receiving application.
For example, CF_TEXT indicates that the data is plain text, while CF_BITMAP indicates a bitmap image.
If omitted the default is CF_Text.
Example
'***********************************
' CLB.-Sample
'***********************************
CLB.Reset
VAU.$$UNI=fe ff 00 50 00 72 00 6f 00 66 00 69 00 6c 00 21 00 20 d8 3d dc ef 00 20 00 44 00 61 00 73 00 20 00 50 00 6f 00 73 00 74 00 68 00 6f 00 72 00 6e 00 2c 00 20 d8 3c dd fa d8 3c dd e6 00 20 00 64 00 69 00 65 00 20 00 55 00 6b 00 72 00 61 00 69 00 6e 00 65 00 2d 00 46 00 6c 00 61 00 67 00 67 00 65 00 20 00 75 00 6e 00 64 00 20 d8 3d dc 89 00 20 00 64 00 69 00 65 00 20 00 53 00 70 00 72 00 69 00 74 00 7a 00 65 00 2e 00 2e 00 2e
'STR.Swap Byte Order|$$UNI
CLB.Set by Type|$$UNI|CF_Text
PRT.CONTENT:
CLB.GetContent|$$CON
PRT.$$CON
PRT.--------------------
CLB.Get by Type|$$RET|CF_Text
PRT.GOT by Type:
PRT.$$RET|c
PRT.--------------------
PRT.ShowA
CLB.showa
$$UNI=Hallo Ich nun hier.
'STR.Swap Byte Order|$$UNI
CLB.Set by Type|$$UNI|CF_Text
PRT.CONTENT:
CLB.GetContent|$$CON
PRT.$$CON
PRT.--------------------
CLB.Get by Type|$$RET|CF_Text
PRT.GOT by Type:
PRT.$$RET|c
PRT.--------------------
PRT.ShowA
CLB.showa
MBX.!
END.

Remarks
-
Limitations:
-
See also:
•