> For the complete documentation index, see [llms.txt](https://inscada.gitbook.io/ins/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://inscada.gitbook.io/ins/en-1/user-interface/development/scripts.md).

# Scripts

You can write macros in inSCADA in javascript language and you can have these scripts run periodically.  You can use the inSCADA APIs to interact with the inSCADA platform using your scripts. See [APIs...](https://inscada.gitbook.io/ins/v/en-1/programing/apis)

![Figure 1 : Developement-Scripts](/files/-LkbxgCmKLUzFuAVbS_m)

As shown in Figure 1, you can create scripts in inSCADA depending on your projects. To do this, press the button <img src="/files/-LkGYDI_EIdrwAfQhnyM" alt="" data-size="line"> in the upper right corner and the form in Figure 2 will open.

![Figure 2 : Script Add/Edit Form](/files/-LkbyXBwD8OOLg9JWGy_)

#### Project

You can select the project to which your script will be linked.

#### Name

Script Name.

#### Description

Script Description.

#### Period

When you schedule your script, you can enter the run period in the background. If you enter 1000 as a value, it will run for 1 sec.

{% hint style="info" %}
You should use the Control Panel to run your scripts automatically, i.e. to schedule them. Take a look at the Script section of the Control Panel.
{% endhint %}

#### Log

When you select Log, an information message about your script will be written in Logs.

#### Code

[See Flexible Forms](https://inscada.gitbook.io/ins/v/en-1/usefull-features)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://inscada.gitbook.io/ins/en-1/user-interface/development/scripts.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
