[1] |
|
|||
Returns | strX / <err> | |||
#s | Transfer only SDS data | |||
#d | Transfer only DDS data | |||
localeID | Integer localeID. / 0: don’t set locale / -1 use glbCP's locale <-- check this. | |||
Description |
Transfers the contents of strX to the clipboard.
Unless #s or #d is passed as the first argument, the Xtra will fill the clipboard with both SDS (CF_TEXT) and DDS (CF_UNICODETEXT) data, by performing any internal conversion required. It will also set the clipboards to localeID (CF_LOCALE), to localeID, or automatically, according to the string's CP. The localeID is, in short, a Windows value specifying a country-language pair. By examining the localeID, a Windows app can decide which CodePage to use for SDS, or other country/place dependant data. If no localeID is passed, the Xtra will use the first localeID that is known to be compatible with the strX. Otherwise, it will set localeID as the clipboard's localeID. If the function succeeds, the original strX will be returned. Otherwise, an <err>. |
|||
Examples |
_s("αβγ", 1253).toClip() --transfer Greek characters to the clipboard
_s("αβγ", 1251).toClip() --transfer Cyrillic characters to the clipboard _d("αβγ", 1253).app("αβγ", 1251).toClip() --transfer a unicode string, containing both Greek and Cyrillic characters to the clipboard. put _d("αβγ", 1251).toS().toClip(#s) --transfer SDS only Cyrillic text. An application has to use the localeID that is automatically added to the clipboard to properly use the SDS data. |
|||
Notes |
strDs are CP, and therefore localeID independent.
strSs are localeID dependant, but the Xtra will automatically identify a compatible one. However, even if the localeID is set correctly, certain applications may not examine it in order to identify the correct CP to apply to any SDS data contained in the clipboard. Such applications (Director falls in this category) usually use the Ansi-1252 CP for all text copied from the clipboard. Windows automatically create the CF_UNICODETEXT when only CF_TEXT data is transferred to the clipboard, and vice versa. |