# Script Functions

Script fonksiyonları, script/expression ile inSCADA platformunda scriptleri yönetmenizi sağlar. Bu fonksiyonlar ile scriptleri çalıştırabilir, durdurabilir ve durumlarını kontrol edebilirsiniz.

## Get Script Status

#### ins.getScriptStatus(String scriptName)

Bir script'in durumu hakkında bilgi verir.

scriptName : Script ismi.

Return Value : Script'in durumu hakkında string tipinde bilgi mesajı geri döndürür.

#### Syntax

```javascript
var status=ins.getScriptStatus("Script_01");
if (status==="Scheduled") {
    ins.notify("info","Script_01","Script_01 is scheduled");
}
```

## Activate a Script

#### ins.activateScript(String scriptName)

Bir scripti aktif duruma getirerek periyodik olarak sürekli çalışmasını sağlar. Script' i zamanlar.(Scheduled)

scriptName : Script ismi.

Return Value : Herhangi bir değer ger döndürmez.

#### Syntax

```javascript
ins.activateScript("Script_01");
```

## Deactivate a Script

#### ins.deactivateScript(String scriptName)

Bir scripti pasif duruma getirerek periyodik olarak sürekli çalışmasını durdurur.&#x20;

scriptName : Script ismi.

Return Value : Herhangi bir değer ger döndürmez.

#### Syntax

```javascript
ins.deactivateScript("Script_01");
```


---

# 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://inscada.gitbook.io/ins/inscada-version-2025/programlama/apis/script-functions.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.
