| Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next 1 | 1. BUG (or confusion getting RXCLIP to work) #12859 | Try the following scenario
Edit any text/word/excel document and copy data to the clipboard. Open notepad and paste the copied data into the notepad.
Now run the following script in RPC
LIBRARY rxclip
cliperr = "SYNTAX"
clipheading = 1
myvariable = "My data"
clipset("MyVariable", "TEXT|CLEAR")
Try pasting again into your notepad and you won't see the string My data. What's wrong ? (BTW - I've tried every variation on the second parameter and never go "My Data" onto the clipboard | 2. #12860 | I don't know Michael, it worked fine for me.
I'm using kedit, not notepad, but "My Data" shows up.Doug | 3. #12861 Posted by: Doug Arndt 2009-04-29 23:44:11 Last edited by: Doug Arndt 2009-04-29 23:46:52 (Total edited 1 time) | Ha, guess what, decided to try notepad, and you're right ... it didn't work.
Try pasting it back into RPC, that works too. Seems it's not a rexx bug, but notepad.
Then I tried to paste it into Word, ( I have an old version ) that didn't work either ... interestingDoug | 4. #12862 | 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") | 5. #12863 | > Incidentally, your ClipSet call is incorrect. The "CLEAR" flag should be passed as the third arg -- not combined with the format (ie, second arg).
Using:
clipset("MyVariable", "TEXT", "CLEAR")
results in: SYNTAX raised: Too many arguments in invocatin of "CLIPSET"; maximum expected is 2Doug | 6. #12864 | Seems that the 2 vrs 3 parm error in clipset is the issue.
Try:
clipclear() MyVariable = "My Data" clipset("MyVariable")Doug | 7. #12865 | Ah ok. Try the latest update. | Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next 1 |
|
|