> For the complete documentation index, see [llms.txt](https://help.trikset.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.trikset.com/integrations/sublime/loading-programs-on-several-robots.md).

# Загрузка программ на нескольких роботов ТРИК из Sublime Text

В данной статье рассматривается возможность одновременной загрузки программ на группу роботов с использованием внешнего текстового редактора **Sublime Text**. Статья является продолжением материала

{% content-ref url="/pages/-M-9r9lpF56YS-4Tt-H-" %}
[Запуск 2D-модели в TRIK Studio из Sublime Text](/integrations/sublime/run-2d-from-sublime.md)
{% endcontent-ref %}

## Настройка

Скачайте файл [send\_files.cmd](https://gist.github.com/anastasiia-kornilova/e1344f658a91449cf16217ec03147a18) для Windows и поместите его в папку, в которую установлена TRIK Studio.

{% hint style="warning" %}
Инструкция протестирована на Sublime Text 3 (Build 3211).\
Скачать Sublime Text можно на [официальном сайте](https://www.sublimetext.com/).
{% endhint %}

Перед первым запуском программы необходимо зайти на контроллер ТРИК через WinSCP. Инструкция о том, как это сделать, доступна по [ссылке](/studio/utilities/winscp.md). После этого WinSCP запомнит, что было разрешено устанавливать соединение с этим роботом и не будет требовать подтверждений. Это действие необходимо повторять при подключении каждого нового контроллера.

1\. Откройте Sublime Text.

2\. Выберите `Tools → Build System → New Build System`

![](/files/-M256_16md-PrAA3qsUw)

3\. Откроется окно с текстовым файлом. В нем необходимо всё стереть и вставить вместо этого следующий код:

```javascript
{
"cmd": ["D:\\TRIKStudio\\send_filesl.cmd", “<path to scripts dir>”, "<file with ip addresses>"],
"selector": "source.js"
}
```

Здесь:

* `<path to scripts dir>` — полный путь к папке с программами, которые необходимо загрузить на роботов, &#x20;
* `<file with ip addresses>` — название файла `.txt`, в котором содержатся ip-адреса роботов для загрузки файлов. Каждый ip-адрес на новой строке. Файл с ip-адресами роботов должен находиться в той же папке, что и отправляемые программы.

4\. Укажите свой путь к файлу `send_files.cmd` вместо указанного в коде. Например:

```javascript
"cmd": ["C:\\TRIKStudio\\send_files.cmd", "C:\\Users\\Admin\\myfiles", "ip_addr.txt"]
```

![](/files/-M256c_quDxxUm1XqIVL)

5\. Сохраните этот текстовый файл в предлагаемой директории `<папка с системными файлами>\Sublime Text 3\Packages\User` под именем `TRIK_SEND.sublime-build`.

6\. Выберите `Tools → Build System` и в открывшемся списке выберите `TRIK_send`.

![](/files/-M256hbb5D56Pm5yQWwu)

7\. Для начала отправки программ на роботов достаточно нажать `Tools → Build` или соответствующую комбинацию клавиш `Ctrl+B`. Для того чтобы вернуться к [запуску 2D-модели](/integrations/sublime/run-2d-from-sublime.md), необходимо выбрать `Tools → Build System` и в открывшемся списке выбрать `TRIK`.

![](/files/-M256qUuNXoo5j2HSCaP)


---

# 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://help.trikset.com/integrations/sublime/loading-programs-on-several-robots.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.
