set_clipboard_data
Entity: predicate

get_clipboard_data
Entity: function

Usage:
Text is get_clipboard_data(char_set)
set_clipboard_data(Text, char_set)

Sets/Gets the clipboard data

Use this predicates to transfer data with the clipboard. (The operational system supports a memory buffer for transferring data between different applications. Its name is Clipboard. When you do copy and paste in any program you actually use this buffer).
char_set - integer which is a number of a char set.

The parameter char_set is used to improve the work with Windows 98/Me and with the old applications which were made for Windows 98/Me. Actually, set_clipboard_data sets the text on clipboard in two formats:

The first one is the Unicode format. This format is used from the new applications and on this format parameter char_set has no effect.

The second format is the text format and it will be with this char set which number is in the parameter char_set. So this parameter has to be grater than zero in order to represent text char set. If parameter char_set is zero then it is ignored.

Analogically the function get_clipboard_data returns the text which is stored in the clipboard in Unicode format. If there is no text in Unicode format then it returns the text which is stored in text format. In this case get_clipboard_data function assumes that the char set of this text is that which is given in the parameter char_set. So this parameter is used when the data is stored in the clipboard by old applications which do not support Unicode.

If you do not need the parameter char_set then make it zero. In this case the current char set will be used for the text format if it is not Unicode. If the current char set is Unicode then chat set 2 will be used.

Examples:
?- set_clipboard_data("Test Clipboard", 0),
Str is get_clipboard_data(0),
write(Str).