CLIPMAC Macro
CLIPMAC.TXT
documenting the [v.v:WRZ] macro
for the VDE Editor
as distributed in the compiled macro file
CLIPMAC.VDK
revised 23 March 2007
John Woodruff
desuetud@mail.onr.com
============================== INTRODUCTION ==============================
The [v.v:WRZ] macro below uses Horst Schaeffer's ClipText utility to provide
VDE with Clipboard access under Windows NT/2000/XP.
Downloading and installing ClipText:
http://home.mnet-online.de/horst.muc/wbat32.htm#cliptext
Put CLIPTEXT.EXE anywhere on your path. Please see the section,
"WINDOWS 2000 AND XP ENVIRONMENT" below.
After starting the macro, respond to the "? Esc!" prompt in the header by
pressing W, R, or Z:
[W]rite: Marked block in the current VDE file is the source:
Selected VDE text is APPENDED to file C:\V.V
CLIPTEXT then OVERWRITES the Clipboard with C:\V.V
Use [Z]ap before [W]rite IF ONLY the CURRENT marked
block should be copied into the Clipboard, not an
accumulation of entries.
[R]ead: The current VDE file is the target:
CLIPTEXT APPENDS the Clipboard contents to file C:\V.V
VDE then reads C:\V.V at the cursor and marks the
incoming text as a block.
Use [Z]ap before [R]ead IF ONLY the CURRENT Clipboard
contents should be pasted into VDE, not an
accumulation of entries.
[Z]ap: Erases file C:\V.V but does NOT access the Clipboard
=========================== [v.v:WRZ] MACRO ============================
[F01]<Esc >[v.v:WRZ]<N>
[Esc]:[Esc]!_
[Esc]W
^KW+C:\V.V[Enter]
[AltR]CLIPTEXT FROM C:\V.V /OEM[Enter][Esc][Esc]!]
[Esc]R^KS
[AltR]CLIPTEXT TO C:\V.V /APPEND /OEM[Enter][Esc]
^KB^KRC:\V.V[Enter]^QP^KK[Esc]!]
[Esc]Z
^KJC:\V.V[Enter]
================================ NOTES =================================
File C:\V.V is an arbitrary choice, but whatever file is used, it's
necessary to state the full path in the macro. Reason: The ^KW and ^KR path
is the path of the current file, whereas the [AltR] shell path is set when
the VDE session is started, subject to being changed later by other DOS
commands.
The ClipText /OEM option causes extended ASCII characters to be translated.
I've included it in both the [W]rite and [R]ead routines.
The initial ^KS in [R]ead is a safety feature, making it possible to use
^KL^F to status back from a Read/Only lockup in case of Graphics Overflow
due to too many different translatable extended ASCII characters in the
source text.
The macro is as useful for communicating among multiple VDE sessions as it
is between VDE and Windows applications, but since file C:\V.V accumulates
in both Write and Read, remember to Zap just before Read so that only one
copy (which will be the one in the Windows Clipboard) of the text from the
other VDE session will be pasted.
========================== USING A .VDK FILE ===========================
A .VDK file contains one compiled VDE macro. While using VDE, you can
install a macro from a .VDK file by simply loading it with VDE's AltU
command. It can be assigned to any function key you choose. If you wish you
can then save the complete macro set, including the new one, again using
VDE's AltU command.
Quoting from VINST.DOC:
VINST can use Function Key Definition files to store function-key sets,
which should have a file type of ".VDF". You can read in or write out such a
file, or edit the keys individually. During the editing process, you can
also read an individual key definition from or write it to a data file,
which should have a type of ".VDK"; thus you can move a single definition
from one set to another. (Note that the Quiet/No-repeat setting and label
are included in a .VDK file, but any Autoexec designation or alias is not.)
Quoting from VDE.DOC:
DATA FILES (AltU) - AltU allows you change various settings in VDE by Using
(loading or saving) data files containing options, function keys, graphics,
character widths, or printer drivers. VDF,K,G files can be loaded and
saved; .VDP,C,I files can be loaded. [VINST can also create these data
files; see VINST.DOC for further explanation of them.] If no directory is
specified with the filename, files must be in the current or VDE directory
(see DIRECTORIES).
At the prompt for a data file to load, you can also access the FILE
BROWSER with [Enter], wildcards, or a directory name. In this special case
the directory defaults to the VDE directory instead of the current one, and
the filespec to *.VD? instead of *.*.
DIRECTORIES - At any VDE filename prompt, you can always specify a
directory as well. Otherwise, the default directory assumed by the file
commands (^KL,^KR,^KE,^KF,^KJ; AltL) is that of the current file; when
editing multiple files, this can differ from one to the next. The directory
doesn't display in the header, but is shown by the AltK or ^KF commands.
The current DOS directory remains unchanged, and is shown by the AltR
command, for which it is the default directory. (It can be changed at the
AltR prompt.) You will return to this directory upon exiting VDE.
THE "VDE DIRECTORY": Sometimes other files associated with VDE need to
be located in order to perform certain functions: AltU (or ";" on the
command line) needs to be able to find .VDx data files; AltH,AltJ require
the speller overlay and dictionary files. Normally, all you need to do to
enable VDE to find these files is to keep them in the "VDE directory", the
same one from which VDE.EXE itself will be run. But here are the
additional details:
If you do specify a directory along with the .VDx filename, the file
will (only) be sought or put there.
You can use the "SET" command to define an environment variable "VDE"
designating a different VDE directory instead. For example:
C:\> SET VDE=C:\UTIL
(It's convenient to put this in your AUTOEXEC.BAT.) [but see below - jw]
If the file needed is not found in the VDE directory, it will be
sought as a last resort in the current DOS directory.
If you use AltU to SAVE a data file without specifying a directory,
the first file by that name found in the above search will be overwritten;
if no such file is found, a new one will be written to the VDE directory.
================== WINDOWS 2000 AND XP ENVIRONMENT ====================
The [v.v:WRZ] macro depends on the DOS path to find and run CLIPTEXT.EXE.
To adjust your path statement under Windows 2000 or XP:
1. Right Click on the icon "My Computer" on your desktop or Start Menu.
2. Select "Properties" after the context menu is exposed.
3. Within the resulting dialog box choose the "Advanced" tab.
4. Click the button "Environment Variables".
5. In the "System Variables" list box that appears, scroll until your path
statement is visible, then double click it.
6. Edit as needed.
7. Click "OK" as needed to save your changes and return to the desktop.
I recommend defining the environment variable "VDE" so that AltU will
default to a single directory for storing and retrieving *.VDK and other
*.VD? data files. The way to set this variable has changed under Windows
2000 and XP, and it's not (to me, anyway) intuitively obvious.
To set the VDE Directory system variable under Windows 2000 or XP:
1. Right Click on the icon "My Computer" on your desktop or Start Menu.
2. Select "Properties" after the context menu is exposed.
3. Within the resulting dialog box choose the "Advanced" tab.
4. Click the button "Environment Variables".
5. Under the "System Variables" list box that appears, click "New..."
6. In the resulting "New System Variable" dialog box:
for Variable Name, enter VDE
for Variable Value, enter the path where you
want VDE to store and retrieve *.VD? files by default; example: C:\VDE
7. Click "OK" as needed to save your entries and return to the desktop.
|
Go back to:
Top of page
Macro Viewer
Mostly VDE