home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Black Box 4
/
BlackBox.cdr
/
wordperf
/
macade41.arj
/
EDITMAC.BAT
< prev
next >
Wrap
DOS Batch File
|
1991-08-15
|
2KB
|
60 lines
:
: EditMac.Bat
: A Component of EditM.wpm System for Accessing an
: External Editor from Within WordPerfect
: for the Purpose of Editing Macros
:
: Copyright (c) 1991 by Jeffrey S. Kane, Ph.D.
:
:******************************************************************************
:
ECHO OFF
%2Macrolst %2%1 W
IF ERRORLEVEL 5 GOTO DoEdit
ECHO PLEASE NOTE THE ABOVE ERROR.
ECHO
ECHO When you're ready, press any key and you'll be returned to Wordperfect
PAUSE where you can make another effort to specify the macro name correctly.
GOTO CompGood
:DoEdit
:
: Change the line following this comment to reflect the command to invoke your
: text editor. Do NOT change the %2%1.LST part (which refers to the file to be
: edited and should be the same for all editors), but rather simply replace the
: "Q" with the command to start your editor. If your editor is not in your
: PATH, be sure to precede your editor command with its path specification.
: If you're using QEDIT you need not change the command line below unless
: Q.EXE is not in your path, in which case you'll need to add its path
: specification (e.g., C:\QEDIT\Q %2%1.LST).
:
:CompBad
Q %2%1.LST
:
IF NOT EXIST %2TildeChk.exe GOTO NoTilChk
%2TildeChk %2%1
IF ERRORLEVEL 11 GOTO CompErr1
IF ERRORLEVEL 10 GOTO CompErr2
:NoTilChk
%2Mcompile %2%1 S
IF ERRORLEVEL 10 GOTO CompErr3
GOTO CompGood
:CompErr1
ECHO A MISSING TILDE WAS FOUND AT THE LOCATION SPECIFIED ABOVE.
GOTO CompErr4
:CompErr2
ECHO MISSING TILDES WERE FOUND AT THE LOCATIONS SPECIFIED ABOVE.
GOTO CompErr4
:CompErr3
ECHO THE ABOVE ERROR(S) OCCURRED DURING MACRO COMPILATION.
:CompErr4
ECHO
ECHO Press any key to correct the error(s) using your editor,
ECHO -OR-
ECHO press CTRL-BREAK and then "Y" in response to the prompt
ECHO "Cancel batch job? (Y/N)"
ECHO to return to WordPerfect.
PAUSE :
GOTO CompBad
:CompGood
ECHO ON