Contents - Index


Running a Macro from an External Program

 

 

Using the macro file capability, EES can be run from the Windows command line from the Macro Play button in EES, or it can be controlled from another program using Dynamic Data Exchange (DDE) commands.  The macro file name is placed after the EES executable file name.  For example, to start EES and have it run the commands in macro file myMac.emf stored in the C:\EES32 directory, you would enter:

 

C:\EES32\EES.EXE c:\EES32\myMac.emf

 

The .emf filename extension is required.   Otherwise EES will consider the file to be a normal EES file.

 

When EES is started with this command, it will remain hidden while it opens the macro file and executes each of the instructions in that file.  Provided that no errors are encountered, all of the instructions will be executed in the order in which they appear and then EES will quit.  EES writes an ASCII log file that indicates what instructions it has completed and any error messages.  By default, the log file name is EESMacro.log and it is placed in the same directory as the .emf file. However, the log file name can be specified by placing a LogFileName macro command anywhere in the macro file.

 

Related Topics: 

Macro Window

Macro commands 

Macros Menu

Using a Macro to Communicate with EXCEL or WORD

Using a Macro for Serial Port Communications

$Include Directive

$RunMacroBefore

$RunMacroAfter