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

> Macro (excerpt)
> 
> Enables you to add a button to the page when clicked on which the SIL script is called.

  


Note, ButtonScriptMacro is available starting with **version 2.0.0.** Now, you are able to call any SIL script in your Confluence just with one click or even integrate Confluence and Jira if you have Power Scripts installed for both instances.

## Example

Let’s say, you want to create an Issue in your Jira Project by clicking on the button on the Confluence page.

### 1. Writing the code in Jira

1. To create a script, go to **Jira** **Administration** → **Manage apps **→ ** cPrime Tools**,** **and click** SIL Manager.**
2. Click the **silprograms** folder and then **New **→** New file**.
3. Create a new SIL file and name it, for example, **Create_Issue.sil** like in the image below.
  
4. In the **Create_Issue****.sil** file that you created write the script for your future tickets. This script is stable and retrieves data you have to specify in Confluence. This is an example.  
Then click **Check** and **Save.**
5. 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. Configuring Remote Systems in Confluence

In this case, the Remote Systems option lets you connect Jira with Confluence and call sil scripts from Confluence page. 

1. To configure it, go to **Confluence** **Administration** → **Add-ons →  cPrime Tools** → **Remote Systems **and click **Add Remote.**
2. <span style="color: #333333">You are required to enter the following information:</span>  
  
> Macro (inline-media-image)
  Where:
  **Name** - is the name of the remote system, unique within other remote systems.  
**URL** - represents the URL (just the base URL, as shown above).  
**Username & Password** - to care about authentication.  
The timeout is optional, as well as the check result parameters. They control the underlying library responsible for performing REST calls. More information is [here](https://anovaapps.atlassian.net/wiki/spaces/SIL/pages/1829166/Remote+systems).

  


### 3. Writing the code in Confluence

1. To create a script, go to **Confluence** **Administration** → **Add-ons **→** cPrime Tools**,** **and click** SIL Manager.**
2. Click the **silprograms** folder → Test → and then **New **→** New file**.
3. Create a new SIL file and name it, for example, **Epic_issue.sil** like in the image below.
  
4. In the **Epic_issue.sil** file that you created, you have to specify the necessary parameters and add values for fields of your future issue. Also, it requests to add [call](https://anovaapps.atlassian.net/wiki/spaces/PSCONF/pages/1840062/call) routine to push your Sil script in Jira.
  Then click **Check** and **Save.**

  


### 4. Creating a ButtonScriptMacro

So, you have created the scripts, but before using them, you need to create a ButtonScriptMacro and associate the script with it.

1. To add a ButtonScriptMacro, go to the necessary Confluence page, click **Insert more content**, and select** ****Other macros**** → **** SIL button**.  
  
> Macro (inline-media-image)
2. In the displayed dialog, fill out the necessary fields:
  1. Enter the name for the **button**.
  2. Enter the script **name** that you created in Confluence. You have to specify the full path to the program being run (all folders after *silprograms* if any).
  3. Enter the **input** - space key and the page name where you want to display the button (optional).
  4. Check **Reuse **if you want the button to remain active after execution.
    
3. Click **Save** to create a ButtonScriptMacro.
  

### Result

When you click the button, Sil script will be called and an Issue will be created. Depending on settings, the button will stay active or be disabled after use.  
  
> Macro (inline-media-image)

  
  


  


> ℹ️ Note, it is possible to bind one button to one script per page. In other words, you are not able to have several ButtonScriptMacros are connected to the same script on the page.
> ℹ️ 
> ℹ️ If you have an issue pressing the button, do a hard page refresh of your browser.

  


## What's next?

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