---
title: "scriptWindow.get: Script Window Controls — Motion kit command — Kition"
description: "Returns a script window's controls (`window` id or title): its tree of controls with type, name, text, value, items, selection, bounds and enabled state."
canonical: "https://developer.kition.ai/docs/kits/motion/commands/scriptWindow.get"
---

> Canonical HTML: [https://developer.kition.ai/docs/kits/motion/commands/scriptWindow.get](https://developer.kition.ai/docs/kits/motion/commands/scriptWindow.get)

# scriptWindow.get

**Script Window Controls.** Returns a script window's controls (`window` id or title): its tree of controls with type, name, text, value, items, selection, bounds and enabled state.

- Kit: Motion 0.1.0 (.kmotion); reference: [Motion kit commands](https://developer.kition.ai/docs/kits/motion.md)
- Changes the document: no

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `views` | `integer` | no | read by the command beside its listed parameters |
| `window` | `integer` | no | id \| title |

## Call through motion_run

```text
motion_run {
  "path": "<file>.kmotion",
  "steps": [{ "command": "scriptWindow.get" }]
}
```

The required parameters, with placeholders for their types: not a tested example. Optional: `views`, `window`. motion_run answers the step’s result in `completed[i].result`.

## Result



```json
{
  "description": "{id, title, kind, root: {id, type, name, text, value, checked, items, selection, bounds, enabled, draw (onDraw paint list), children…}}"
}
```

## Parameter schema

```json
{
  "additionalProperties": false,
  "properties": {
    "views": {
      "description": "read by the command beside its listed parameters",
      "type": "integer"
    },
    "window": {
      "description": "id | title",
      "type": "integer"
    }
  },
  "returns": "{id, title, kind, root: {id, type, name, text, value, checked, items, selection, bounds, enabled, draw (onDraw paint list), children…}}",
  "type": "object"
}
```

Generated from the command list of @kition/motion-darwin-arm64@0.1.0 and the kit itself (motion_commands through @kition/cli@0.1.1, built from KitionAI/kition-motion@4719aa7).
