There are two types of text strings in the Windows operating system; ascii and unicode. REXX strings are ascii. It may be that the version of notepad you're using recognizes only a unicode text string on the clipboard. (Some Windows software is compiled with unicode support only). In that case, first run your text through the function ConvertStr, and then pass a format of "UNICODETEXT" to ClipSet.
Incidentally, your ClipSet call is incorrect. The "CLEAR" flag should be passed as the third arg -- not combined with the format (ie, second arg).unicode = convertstr("My Data")
clipset(unicode, "UNICODETEXT", "CLEAR") If you're not sure whether the other program wants unicode or ascii, and it can deal with only one of the two, then set both formats. (And don't use the CLEAR flag).unicode = convertstr("My Data")
clipset(unicode, "UNICODETEXT")
clipset("My Data") |