home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 5 Edit
/
05-Edit.zip
/
cca_110.zip
/
BOXER.TXT
next >
Wrap
Text File
|
1998-06-16
|
3KB
|
66 lines
Using CCA with Boxer/OS2
Boxer/OS2 is a text mode application that does not provide
direct access to the OS/2 clipboard. However a combination of
Boxer/OS2 macros and CCA will allow users to copy text
to and from the OS/2 clipboard.
The following macros were written by:
Ryan Gray
scorpion@thuntek.net
http://www.thuntek.net/~scorpion
<macro=26><name=Copy>
<OS access>del<sp>c:\clip.txt<enter><enter>
<save block>c:\clip.txt<enter>
<OS access>toclip<left angle>c:\clip.txt<enter>
<enter><copy>
<macro=27><name=Cut>
<OS access>del<sp>c:\clip.txt<enter><enter>
<save block>c:\clip.txt<enter>
<OS access>toclip<left angle>c:\clip.txt<enter>
<enter><cut>
<macro=28><name=Paste>
<OS access>fclip2<right angle>c:\clip.txt<enter><enter>
<insert file>c:\clip.txt<enter>
Notes from Ryan Gray:
The user will probably not use the same macro numbers I have, and they
could also give them different names. Therefore, the macro is really
everything after the first line. The user uses a separate utility to
bind the macros to keys, otherwise the user can execute macros by name
or number. The user should not use these to replace the standard
copy/cut/paste functions for use within Boxer, due to limitations and
the overhead of this procedure. The OS calls to delete the clip file
are to avoid the conditional "overwrite?" prompt for copy and cut if
the file exists.
Q: Is there a section in the Boxer documentation that tells the user
how to use macros?
Yes. Chapters 20 and 28. The macros could be saved as-is in a file
with a .M extension, then the user can edit that file, and select
Macro -> Compile. This adds the macros to those in memory. Then
selecting Macro -> Save, and saving to the DEFAULT.MAC will then load
the new macros along with the default ones. Before executing the Macro
-> Compile, the user should use Macro -> List to see what macro numbers
are available and number the copy/cut/paste macros accordingly. Then,
the user can execute the macro from the list, via Macro -> Execute, or
refer to chapter 27 to use the RECONFIG utility to bind them to
keystrokes.
One thing about the macros I haven't solved yet is that the copy and
cut macros use the Boxer <copy> and <cut> codes at the end to echo the
operation in Boxer's clipboard (and to remove the text for the cut
macro), but if the user has their editor configured to remove the
marking after copy or cut, the cut macro doesn't cut the text since the
save block funciton unmarks the block before the <cut> code and other
text will likely get cut.