# /macro

## Syntax

**/macro** ***filename*** **\[** ***param0*** **\[** ***param1*** **\[...]]]**

## Description

Starts running a macro. Optional parameters can be added to the end of the /macro line, and the parameters will be passed to Sub Main within that macro.

**Notes**

* Calling a macro from another macro will end the calling macro.
* \*\*Invoking a /macro from within a macro will cause the first line to be skipped in the new

  macro. Deal with it.\</span>\*\*

## Examples

```
/macro mymacro

/macro mymacro "water flask" "metal bits"
```

## See Also

* [Macros (about macros in general)](https://github.com/macroquest/docs/blob/master/documentation/macroquest-macros.md)
* [Macro (Top-Level Object)](/macroquest/data-types-and-top-level-objects/top-level-objects/tlo-macro.md)
* [DataType:Macro](/macroquest/data-types-and-top-level-objects/data-types/datatype-macro.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://macroquest.gitbook.io/macroquest/commands/slash-commands/macro.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
