|
Using CCA with Boxer/OS2 |
I, @Macarlo, registered user, am using Boxer from David Hammel to make my web site, on OS/2 and on Windows. On OS/2 the clipboard interactivity is not a problem: you can use CCA from Don Hawkinson. Photo above shows Boxer running as Home Page Publisher external editor on Warp 4.0.
![]()
![]()
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
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.
Command line Clipboard Access 1.1 Shareware registration $12 (US) from BMT Micro The Command line Clipboard Access (CCA) programs are a set of shareware programs that allow the OS/2 user to access the OS/2 clipboard from the command line in a full screen or windowed OS/2 session.
These programs do not make any changes to the OS/2 INI files or create any additional files on your hard drives. To install them, just copy the two executable files to a directory in your OS/2 search path.
The access to the OS/2 clipboard is limited to ONE process at a time. Thus you need to make certain that no other program is accessing the clipboard when you run either program. Also, you need to wait until they have completed until you try to access the clipboard with another program.
The shareware version of these programs are fully functional, but they add an identification line to the clipboard text.
When ToClip puts text into the OS/2 clipboard, it first inserts the following line.
"ToClip 1.1 Registration removes this line"
When FClip2 gets text into the OS/2 clipboard, it appends the following line to the end of the text.
"FClip2 1.1 Registration removes this line"
The registered versions do not add the lines.
Using CCA with Boxer/OS2
Program descriptions:
toclip.exe
Puts text into the OS/2 clipboard via redirection or a pipe from the command line. If it is executed without any arguments, it assumes you are going to type the text and will accept text until you enter a control-Z and a newline. If you enter a text string as a command line arugment, the string will be copied to the clipboard. If the string contains blanks, you must enclose it in quotation marks. The quotation marks will be stripped before the text is put into the OS/2 clipboard.
examples: dir /b | toclip toclip < file toclip "This line will be put into the OS/2 clipboard" fclip2.exe Gets text from the command OS/2 clipboard and routes it to stdout. Thus you can redirect or pipe the output of this utility.
examples:
fclip2 > file
fclip2 | program
pmclip.cb
A Brief macro to allow the OS/2 version of Brief to access the OS/2 clipboard.
boxer.txt
Boxer/OS2 macros to allow Boxer/OS2 to access the OS/2 clipboard.
CONTACT
You can download Boxer from
You can download CCA from
![]()
@Macarlo,
Inc.
@Macarlo's Shareware & Web
OS/2
Java
Lobby Member
Java Site
Accredited