> 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/vscode/loading-programs-on-several-robots.md).

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

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

{% content-ref url="/pages/-M5NmrJb6XSWgG0F9tF0" %}
[Запуск 2D-модели в TRIK Studio из VSCode](/integrations/vscode/run-2d-from-vscode.md)
{% endcontent-ref %}

## Настройка

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

{% hint style="warning" %}
Инструкция протестирована на январском релизе 2020 года (version 1.42).\
Скачать VSCode можно на [официальном сайте](https://code.visualstudio.com/Download).
{% endhint %}

При первом запуске программы для установки соединения с роботом потребуется подтверждение от пользователя.

![](/files/-M290IhFU06XeTzCs3gN)

Чтобы разрешить соединение, введите в командной строке `Y` или `Yes`.

![](/files/-M290TE46pxYwWCFGIP9)

1\. Откройте папку с файлами, которые хотите отправить, в VSCode с помощью `File → Open Folder`.

2\. Вызовите `Terminal → Configure Tasks`.

![](/files/-M256yJEg2qAxD7sJmgO)

3\. Если ранее задач не было, то выберите в выпадающем меню `Create tasks.json file from template → Others`. Откроется файл `tasks.json`. Если tasks были созданы ранее, он откроется сразу после пункта 2.

![](/files/-M25723yFuYPBdcn_fSu)

4\. Удалите всё из этого файла и вставьте данный код:

```javascript
{
    "version": "2.0.0",
        "tasks": [ {
            "label": "Send files",
            "type": "shell",
            "windows": {
                "command": "C:\\TRIKStudio\\send_files.cmd  <path to scripts dir> <file with ip addresses>"
            },
            "group": "test",
            "presentation": {
                "reveal": "always",
                "panel": "new"
            }
        }]
}
```

Здесь:

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

5\. В строке, соответствующей полю `"windows": { "command"` укажите путь к файлу `send_files.cmd`. Файл с ip-адресами роботов должен находиться в той же папке, что и отправляемые программы. Например:

```javascript
"command": "C:\TRIKStudio\send_files.cmd C:\Users\Admin\myfiles ip_addr.txt"
```

![](/files/-M257UdbJQWMeCF6R9TY)

6\. Сохраните файл `tasks.json`.

7\. Теперь при нажатии `Terminal → Run Task` в выпадающем меню выбираем `Send files`, чтобы загрузить программы на роботов, или соответствующую комбинацию клавиш `Ctrl+Shift+B`.


---

# 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/vscode/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.
