# How to run a macro file

The executable file TTPMACRO.EXE should be placed in the directory in which TTERMPRO.EXE exists.
There are two ways to run a macro file.

## 1) From Tera Term.

To start MACRO, select the [Control] Macro command and then the macro file in the Open Macro dialog box.

## 2) From MACRO.

The macro file can be specified as a parameter of the command line (shortcut link) of TTPMACRO.EXE. For example, if you want to run the macro file "DIALUP.TTL", specify the command line (shortcut link) like:

    TTPMACRO DIALUP.TTL

You can omit the file name extension ".TTL". If you omit the file name, the Open Macro dialog box appears. It's convenient to install icons (shortcuts) for the macro files you use frequently.

If you choose method 2), you can run Tera Term, after starting the MACRO, by using the "connect" command in the macro file.

While the macro is running, you can pause it, restart it, and stop it by pressing the appropriate buttons in the MACRO dialog box.

## Note: Running without displaying a window

To run without displaying a window, activate TTERMPRO.EXE or TTPMACRO.EXE with a command line option of "/V".
When TTERMPRO.EXE is run by using "connect" macro command, "/V" must be specified as an argument for it.
This option is required to run without logging in such as using a task.

## Note: Loading a macro file

A macro file is loaded into memory all at once, and the macro is interpreted. However, the macro command include always reads a specified macro file. When a macro file on the network file server is executed, the macro command include may fail if the network is down.