---
title: "ScriptMacro"
canonical: "https://support.appfire.com/space/PSCONF/15304937/ScriptMacro"
format: markdown
---
> Macro (aura-html)

  


  


> Macro (excerpt)
> 
> Enables you to display the [standard variables](https://appfire.atlassian.net/wiki/spaces/PSCONF/pages/15306098) for the predefined page.

## Example

In this example we'll show you how to display the [standard variables](https://anovaapps.atlassian.net/wiki/display/PSCONF/Standard+variables) of your page.

### 1. Writing the code

1. To create a script, go to **Confluence ****Administration** > **Add-ons > cPrime Tools**,** **and click** SIL Manager.**
2. Create a new SIL file. To do that, click the **silprograms** folder and then **New > New file**.
3. Name your new file, for example **PageStandardFields.sil** like in the image below.
  
4. In the **PageStandardFields.sil** file that you created, write the following code. It represents how the ScriptMacro uses the standard variables. The script takes the page title, ensures that the page actually exists, and returns basic standard variables.
5. Click **Check** and **Save.**

You can find more information about managing your SIL Scripts on the [SIL Manager page](https://anovaapps.atlassian.net/wiki/display/SIL/SIL+Manager).

### 2. Creating a ScriptMacro

So, you created a script, but before you can use it, you need to create a ScriptMacro and associate a script with it.

1. To add a ScriptMacro, go to the necessary Confluence page, click **Insert more content**, and select** ****Other macros**** ****>**** SIL script**.  
  
> Macro (inline-media-image)
2. In the displayed dialog, fill out the necessary fields:
  1. Enter the **name** of the script that you created. In our case it's **PageStandardFields.sil**.
  2. Enter the **input** - space key and the page name where you want to display the variables. In our case we used comma as a separator, and you can define another symbol. For instance, in cases where a page contains commas in the name, you might want to use period as a separator.
  3. Define the **separator** symbol.
  4. Select the data **output** - possible options are: *list*, *numbered list*, *table*, *transposed table*.
    
3. Click **Save** to create a ScriptMacro.

That's it. You have created **PageStandardFields.sil **script and a **ScriptMacro** that is associated with this script.

<span style="color: #bd5528">Result</span>

Every time you update a page, the macro will take the page title, ensure that the page actually exists, and return basic standard variables.

## See also

- [TableScriptMacro](https://appfire.atlassian.net/wiki/spaces/PSCONF/pages/15305171)
- [ConditionScriptMacro](https://appfire.atlassian.net/wiki/spaces/PSCONF/pages/15305133)
- [InlineScriptMacro](https://appfire.atlassian.net/wiki/spaces/PSCONF/pages/15306476)