---
title: "scriptWindow.set: Set Script Window Control — Motion kit command — Kition"
description: "Sets a control of a script window: `widget` (id or name) to `value` (text, number, bool, or a list item's index or text); `changing: true` sends a live update, as while dragging a slider."
canonical: "https://developer.kition.ai/docs/kits/motion/commands/scriptWindow.set"
---

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

# scriptWindow.set

**Set Script Window Control.** Sets a control of a script window: `widget` (id or name) to `value` (text, number, bool, or a list item's index or text); `changing: true` sends a live update, as while dragging a slider.

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

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `changing` | `boolean` | no | a live update: each keystroke / slider step; fires onChanging only |
| `value` | `string` | no | text \| number \| bool \| item index \| item text |
| `widget` | `any` | no |  |
| `window` | `integer` | no |  |

## Call through motion_run

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

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

## Result

The kit gives no result schema for this command.

## Parameter schema

```json
{
  "additionalProperties": false,
  "properties": {
    "changing": {
      "description": "a live update: each keystroke / slider step; fires onChanging only",
      "type": "boolean"
    },
    "value": {
      "description": "text | number | bool | item index | item text",
      "type": "string"
    },
    "widget": {},
    "window": {
      "type": "integer"
    }
  },
  "returns": "fires onChanging / onChange",
  "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).
