home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 5 Edit
/
05-Edit.zip
/
epm603b.zip
/
EPMCSAMP.ZIP
/
EPMCSAMP
/
READ.ME
< prev
Wrap
Text File
|
1995-11-10
|
3KB
|
50 lines
This is a starter-kit for writing EPM macros in C. If you unpacked
EPMCSAMP.ZIP so that the directory structure was preserved, then the
layout should be as follows:
epmcsamp - This file and ETKE.INF
epmcsamp\src - The source for the sample code
epmcsamp\include - The E Toolkit include files
EPMCSAMP.C defines the following commands.
(You have to provide CSet and the OS/2 Toolkit.)
Each - Execute a given command against each file in the ring.
FindAll - Find a line containing all of the given space-delim. strings
FindAllC - As above, but case-insensitive.
Expunge - Delete all lines containing a given string. (The string is
a Locate command argument, so can use GREP, etc.)
FindDup - Find the next duplicated line.
QTS - Query the timestamp of the specified or current file.
SaveOld - Save a file and keep its timestamp unchanged.
test - Displays the first & last line in the file, to demonstrate
the use of the EtkAccessLowLevelData call.
Highlight- Highlight a given string. (The string is a Locate command
argument, so can use GREP, etc.)
UnHighlight-Remove all highlighting in the file matching a specified
color. Defaults to the same color used by the Highlight
command, but the color can be passed in as an argument (so,
for example, you can "UnHighlight 244" to remove the
highlighting added by the Workframe to show compiler errors).
To execute a command, you can enter:
dyna_cmd epmcsamp FindDup
or: dyna_cmd epmcsamp FindAll this that the_other
or: dyna_cmd epmcsamp Expunge /unwanted/wc
etc. Note that the name of the macro is case-sensitive. (This is
ideal for adding as a Toolbar item - place an asterisk ('*') in the
Function field, and the 'dyna_cmd ...' in the Parameters field.)
Note: After executing a dyna_cmd macro, the corresponding DLL will
be "locked" until EPM ends. If you're in the middle of developing
it, you can use the DynaFree command to free it sooner - e.g.,
dynafree epmcsamp
This package contains the online documentation & *.H from the ETKBBBS
package, version 6. It is available separately for the benefit of those
who wish to write EPM macros in C. Those wishing to make more advanced
use of the E Toolkit should get the entire package, which contains the
EPM Tool-Kit, the latest documentation, updated samples, and macros.
Use VIEW (part of OS/2) to read the ETKE.INF file.