Command line

"/Applications/Tera Term Mac.app/Contents/MacOS/TeraMac" /M=<macro file> [<destination and options>...]

Run a macro with the /M= option of Tera Term Mac.
You can also run a macro by opening a .ttl file from the Finder or with the open command (How to run a macro file).

Options

/M=<macro file>
Macro filename.
If this value is not a full path, it is understood as a relative path from the current folder. '~' is the home folder.
If the name has no extension, ".TTL" (or ".ttl") is added.
The filename(path excluded) is stored in the system variable "param1" and "params[1]".
<destination and options>
A destination in the same format as the Tera Term Mac command line. If given, the connection is started and then the macro is run.

System variables

The following system variables are set.

params
String array of the parameters.
params[0] holds "the app executable and the macro file path", and params[1] holds the macro filename.
param1
Same as params[1]. The macro filename is stored.
param2 - param9
Always empty.
paramcnt
The number of parameters stored in params. Always 1 (the macro filename).

Each element of params and param1 - param9 are strings, so up to 511 characters can be stored.