Guidance
指路人
g.yi.org
Guidance Forums / Reginald Rexx / BUG (or confusion getting RXCLIP to work)

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. BUG (or confusion getting RXCLIP to work)
#12859
Posted by: Michael S 2009-04-29 21:46:37
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
Message2.
#12860
Posted by: Doug Arndt 2009-04-29 23:39:32
I don't know Michael, it worked fine for me.

I'm using kedit, not notepad, but "My Data" shows up.
Doug
Message3.
#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 ... interesting
Doug
Message4.
#12862
Posted by: Jeff Glatt 2009-04-30 00:13:17
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")
Message5.
#12863
Posted by: Doug Arndt 2009-04-30 00:51:10
>  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 2
Doug
Message6.
#12864
Posted by: Doug Arndt 2009-04-30 01:06:45
Seems that the 2 vrs 3 parm error in clipset is the issue.

Try:

clipclear()
MyVariable = "My Data"
clipset("MyVariable")
Doug
Message7.
#12865
Posted by: Jeff Glatt 2009-04-30 03:43:45
Ah ok. Try the latest update.
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Tue 2024-12-10  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0