:
:                               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
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
:
%2Mcompile %2%1
IF ERRORLEVEL 10 GOTO COMPERR
GOTO CompGood
:CompErr
ECHO                THE ABOVE ERROR OCCURRED DURING MACRO COMPILATION.          
ECHO ÿ
ECHO               Press any key to correct the error 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
