[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Testers wanted for new Copy/Paste/Replace routine



Would you enjoy a Copy/Paste/Replace function that works with the Windows
system Clipboard as if it were native to XyWrite? Instantaneous! Simple to
use. Can (but need not) be assigned to the same keystrokes that all other
Windows applications use (Ctrl-C, Ctrl-V, Ctrl-X). Works in both FullScreen
and Desktop windows.

Sound good? (As advertised on TV?) You can use the Windows system clipboard
to Copy/Paste/Replace *within* XyWrite, OR between XyWrite and to/from other
applications. The routine really doesn't know the difference -- indeed, there
isn't any difference. Inside XyWrite, you're shuttling text in and out of the
Windows clipboard instead of using XyWrite functions CP (CoPy), MV (MoVe),
RD (RuboutDefined), etc. All three-byters, functions, and XyWierd characters
are copied faithfully. And, unlike the plain vanilla Windows clipboard,
Replaced text is still logged to the *XyWrite* clipboard buffer, whence it can
be undeleted. Altogether, pretty nifty. The only significant limitation
(imposed by a DLL) is on the maximum size of Copy/Paste text: 16,384
characters.

It's part of XyWWWeb.U2 v115 (just released publicly), but nobody has ever
tested it apart from myself (and I've only tested it in Xy4-DOS). Win32 ONLY
(9x NT 2000 XP), Xy4-DOS -- should work also in XyWin, NBWin.

Anyone willing to give it a whirl, and report back?

If you wish to try it, don't contact me first -- just implement it, and then
post your results. Email me if you need more info. In anticipation, thanks
very much! Details follow. It's a lot harder to describe than to use -- it
really works just like normal Windows Copy/Paste/Replace services, but adapted
to Xywrite's peculiarities:

Installation
------------
1. Install XyWWWeb.U2 v115. Download XYWEB115.ZIP from:
 http://users.datarealm.com/xywwweb/

2. Ensure that Windows Script Host [WSH] is installed on your
machine (it almost certainly is). At a DOS Prompt, command:
 cscript /?
A list of commands should display. If not, then (in XyWrite)
command "HELP OED" and page down a tad to the URLs
for WSH at Microsoft.com. Download WSH and install it.

3. Download CLIPW32.ZIP:
 http://users.datarealm.com/xywwweb/CLIPW32.ZIP

4. UnZIP CLIPW32.ZIP, yielding two files: CLIP.VBS and AutoItX.DLL
 Move CLIP.VBS to the same directory as Xy4+ Editor.EXE [XW.EXE|NB.EXE]
  (don't leave more than one copy of this file lying around!)
 Move AutoItX.DLL to [BootDrive]:\WINNT(or WINDOWS)\SYSTEM32
 "Register" AutoItX.DLL with your operating system (one-time only):
  At a DOS Prompt, command: REGSVR32 AutoItX.dll

At this point, you're installed, except for configuring your KBD file if you
wish to do so (HIGHLY recommended -- see below for various configurations).

Using CLIP
----- ----
ALL the following information applies to the Win32 version of CLIP only.

There are several different framenames that can be used
 to Copy, Paste, and/or Replace:
Framename  Machine type   Function
---------  ------------   --------
CLIP    Dual-boot Windows|OS/2: Copy OR Paste [no Replace]
        [see Footnote 2]
CLIPW    Windows: Copy OR Paste [no Replace]
CLIPWC   Windows: Copy ONLY (~Ctrl-C)
CLIPWP   Windows: Paste ONLY (~Ctrl-V)
CLIPWR   Windows: Replace ONLY (~Ctrl-X)
CLIP[W[C]] /F Special Command: Copy whole current file
        ^^^^^^^ ^^^^^^^
You can issue the above commands manually on the CMline; or you can assign
one or more of them to KeyBoarD file keys, which I *strongly recommend*.

Two factors matter when you Copy/Paste: the location of your cursor (CMline
or Text); and the presence or absence of DeFined text in the current window.
 Cursor on CMline: Copy command copies CMline content (if any)
 Cursor in Text:  Copy command copies DeFined text (if any)
 Cursor on CMline: Paste command pastes to the CMline
 Cursor in Text:  Paste command pastes to the Text window
 Cursor on CMline: Replace command replaces DF block (if any) in Text
 Cursor in Text:  Replace command replaces DF block (if any) in Text

You'll always get the result you expect if you assign the three different
functions (Copy Paste Replace) to separate KBD keys. It's a bit trickier when
you assign the multifunction framename CLIPW (or just CLIP) to a **single key
that performs both Copy and Replace**. When using a single key, you must be
sure, when you Paste, that there is no text DeFined -- otherwise you'll Copy
instead of Paste. Also, when using single-key framename CLIPW, the Replace
function is unavailable -- Replace requires framename CLIPWR. You can always
Replace manually via the CMline, with "CLIPWR".

Indeed, all these framenames work on the CMline, using the .
Here's a usage chart. The results will be the same, in either (CMline or
Text) cursor position, whether you issue CLIP manually on the CMline with the
Helpkey, or you assign CLIP to KBD key(s):

Cursor on the CMline
====================
No argument on CMline
---------------------
CLIP[ or CLIPW] <== Paste Clipboard contents to CMline
CLIPWC <== Aborts, even if DF text is present
CLIPWR <== Replace DF text (if any) with Clipboard text

Text argument on CMline
-----------------------
CLIP[ or CLIPW or CLIPWC] damp souls <== Copy CMline text
CLIPWR damp souls <== *Ignore* CMline text arg! replace DF
                text (if any) with Clipboard content

Cursor in Text (ALWAYS *ignores* CMline content, if any)
==============
CLIP[ or CLIPW] <== Pastes content of Clipboard
CLIPWC <== Copies DeFined text (if any)
CLIPWR <== Replace DF text (if any) with Clipboard content

KeyBoarD File Assignments
-------------------------
 Single-key assignment:
nn=NOJM2,.,c,l,i,p,w,Q2  <== Windows: Copy or Paste [no Replace]
 Or use three separate keys (BEST!):
nn=NOJM2,.,c,l,i,p,w,c,Q2 <== Windows: Copy only
nn=NOJM2,.,c,l,i,p,w,p,Q2 <== Windows: Paste only
nn=NOJM2,.,c,l,i,p,w,r,Q2 <== Windows: Replace only
 or
nn=NOJM2,.,c,l,i,p,Q2   <== Dual-boot Windows|OS/2 machines

Two Reserved Filenames (in your Editor.EXE directory)
----------------------
CLIP.TXT
CLIP1.TXT

******************

Footnote 1:
In the context of Win32, CLIP and CLIPW work identically. However, CLIP does
require that frame "GetXyOS" be run in STARTUP.INT, in order to identify your
operating system:
 JM (2.GetXyOS);*; <==that's true function JM, inserted with "pfun JM"
You can check whether this has been done by commanding in XyWrite:
 va/nv @652
XyWrite should return something like "XyOS=W2K" or "XyOS=W98". Some machines
have trouble running GetXyOS -- if your machine is such, then you can manually
indicate, in STARTUP.INT, the identity of your Operating System by inserting
into STARTUP.INT just ONE of the following lines (where "<" and ">" are true
guillemets, of course):
;*;
;*;
;*;
;*;
;*;
;*;

Footnote 2:
The OS/2 version of CLIP is not deprecated; it still works, using XyShell; but
the old Win32 XyShell CLIP frame is REPLACED by this new interface.


-----------------------------
Robert Holmgren
holmgren@xxxxxxxx
-----------------------------