Cut and Paste (AREV32)
At 14 FEB 2013 10:14:03AM Jeff Miller wrote:
I am having some issues with the Cut and Paste functions around AREV32.
I go into a windows product like Word and Copy a block of information using Ctrl-C. Then I go into a prompt in AREV32 and perform a Paste by doing a right-click then paste. It works but is extremely slow. I could probably type faster than the system is pasting the information. We are talking about a character every second or two. So a block of 60 characters will take between 2 to 3 minutes.
I am using version 9.2.1. It looks like this is an OI function doing the paste. The Ctrl-V does not work. Only if you do a Right-Click and paste.
I would appreciate any help with this,
Thanks
Jeff Miller
Miller's Software Services
At 24 APR 2013 05:08AM Craig Tildesley wrote:
Yes, it's pretty hopeless but wouldn't it be useful if we could just use good old Ctrl F3/F4
The windows clipboard is available as this is reallly OI. The only problem is that the CLIPBOARD property isn't readily available and its a bit odd when used 'properly' .
Arev32 needs to access OI properties using the handily provided CTO_GET_PROPERTY/CTO_SET_PROPERTY. CTO_GET_PROPERTY rather messes up linemarks so we need an alternate way of access the clipboard.
save this as DLL_CLIPBOARD and run DECLARE_FCNS "DLL_CLIPBOARD". I used old System Editors command line but it may well work from Arev32 TCL
USER32 INT STDCALL OpenClipboard(VOID) LPSTR STDCALL GetClipboardData(UINT) VOID STDCALL CloseClipboard(VOID) *HANDLE STDCALL SetClipboardData(UINT,LPCHAR)save this in Arev32 as getclipboard, compile and catalog
subroutine getclipboard(p1) declare function OPENCLIPBOARD,GETCLIPBOARDDATA,CTO_GET_PROPERTY IF UNASSIGNED(P1) THEN P1 = "" BUF = @CUR.BUF<1> + 1 IF BUF = 1 THEN BUF = 2 IF P1 THEN * SET TEXT = @CUR.BUF<BUF> SWAP @VM WITH \0D0A\ IN TEXT CALL CTO_SET_PROPERTY("CLIPBOARD","TEXT",TEXT) END ELSE * GET if openclipboard() Then text = getclipboarddata(1) SWAP \0D0A\ WITH @VM IN TEXT @CUR.BUF<BUF> = TEXT call closeclipboard() END End returnI set uo a couple of macros to call getclipboard with 0 to get the windows clipboard and getclipbioard with a 1 to set it (useful if you are copying a program segment that is over a page long).
This will copy into or out of the Arev buffer.
Hope this helps
At 21 MAY 2013 10:18PM Jeff Miller wrote:
I wanted to thank you Craig for the suggestion. I used the "CLIPBOARD" property to get the contents of the windows buffer then I transferred it to the AREV buffer. I only needed it to go one way. And this enabled me to do that. The client is most happy. I put the program on a Macro key "Alt-5".
Jeff Miller
Miller's Software Services