go to rus guide (in progress)

dev-linux
Ivan Maslov 3 years ago
parent a63853915b
commit ace87c98aa

@ -1,5 +1,5 @@
#################################### ####################################
1. How to install 1. Первый запуск
#################################### ####################################
Are you ready to install the pyOpenRPA solution on your machine? Are you ready to install the pyOpenRPA solution on your machine?

@ -1,22 +0,0 @@
####################################
2. Roadmap
####################################
- Guide
- ENG - done 2021.03.11
- HTML `|OPEN GITLAB| <https://gitlab.com/UnicodeLabs/OpenRPA/-/tree/master/Wiki/ENG_Guide/html/index.html>`_
- MarkDown `|OPEN GITLAB| <https://gitlab.com/UnicodeLabs/OpenRPA/-/tree/master/Wiki/ENG_Guide/markdown/index.md>`_
- PDF `[|OPEN GITLAB|] <https://gitlab.com/UnicodeLabs/OpenRPA/-/tree/master/Wiki/ENG_Guide/pdf/pyOpenRPA_Guide_ENG.pdf>`_
- RUS - queue
- Tutorial
- ENG - queue
- RUS - in progress
- Article: Less cost - no paid RPA `|OPEN HABR| <https://habr.com/ru/post/506766/>`_
- Tutorial Desktop UI `|OPEN HABR| <https://habr.com/ru/post/509644/>`_; `|OPEN GITLAB| <https://gitlab.com/UnicodeLabs/OpenRPA/-/tree/master/Wiki/RUS_Tutorial/DesktopGUI_Habr/index.md>`_
- Tutorial Web UI `|OPEN HABR| <https://habr.com/ru/post/515310/>`_; `|OPEN GITLAB| <https://gitlab.com/UnicodeLabs/OpenRPA/-/tree/master/Wiki/RUS_Tutorial/WebGUI_Habr/readme.md>`_
- Article: RPA as a core of the IT automation - soon
- Leaflet
- ENG queue
- RUS done 2021.02.23
- RUS Leaflet pyOpenRPA v4.pdf `|OPEN GITLAB| <https://gitlab.com/UnicodeLabs/OpenRPA/-/tree/master/Wiki/RUS_Leaflet/RUS%20Leaflet%20pyOpenRPA%20v4.pdf>`_

@ -1,7 +1,7 @@
.. _3.-Copyrights-&-Contacts: .. _3.-Copyrights-&-Contacts:
#################################### ####################################
3. Copyrights & Contacts 2. Права & Контакты
#################################### ####################################
pyOpenRPA is created by Ivan Maslov (Russia). pyOpenRPA is created by Ivan Maslov (Russia).
@ -19,15 +19,26 @@ If you will find some issue in pyOpenRPA - write about it to me via e-mail/skype
Thank you! Thank you!
************************************************** **************************************************
Ivan Maslov (CEO & FOUNDER) Центр поддержки клиентов
************************************************** **************************************************
Our contacts:
- E-mail: Ivan.Maslov@pyOpenRPA.ru У вас остались вопросы? Мы вам поможем!
- Skype: MegaFinder
- Web: https://pyopenrpa.ru/ - Телефон/WhatsApp: +7 (995) 233-45-31
- Telegram: https://t.me/pyopenrpa - Почта: Support@pyOpenRPA.ru
- WhatsApp | Telegram: +7 906 722 39 25 | @IvanMaslov - Телеграм: @pyOpenRPA_support
- Портал: https://pyopenrpa.ru/
- Телеграм канал: @pyOpenRPA_support
**************************************************
Иван Маслов (Основатель & генеральный директор)
**************************************************
- Телефон/WhatsApp: +7 (906) 722-39-25
- Почта: Ivan.Maslov@pyOpenRPA.ru
- Телеграм: @IvanMaslov
- Портал: https://pyopenrpa.ru/
- Телеграм канал: @pyOpenRPA_support
************************************************** **************************************************

@ -1,5 +1,7 @@
.. _module.robot.description:
************************ ************************
1. Description 1. Описание
************************ ************************
pyOpenRPA Robot is the python package which allow you to create best RPA program. pyOpenRPA Robot is the python package which allow you to create best RPA program.

@ -1,5 +1,5 @@
#################################### ####################################
2. Defs 2. Функции
#################################### ####################################
Here you can find the functions description for interaction with desktop GUI applications Here you can find the functions description for interaction with desktop GUI applications

@ -1,5 +1,5 @@
#################################### ####################################
3. How to use 3. Как использовать?
#################################### ####################################
The Robot tool is the main module for production process automation. It has no graphic/console interface. All low-level actions to OS are perfoming by the Robot tool in pyOpenRPA. The Robot tool is the main module for production process automation. It has no graphic/console interface. All low-level actions to OS are perfoming by the Robot tool in pyOpenRPA.

@ -1,5 +1,5 @@
#################################### ####################################
4. Dependencies 4. Зависимости
#################################### ####################################
Python 3 x32 [psutil, pywinauto, wmi, PIL, keyboard, pyautogui, win32api (pywin32), selenium, openCV, tesseract, requests, lxml, PyMuPDF] Python 3 x32 [psutil, pywinauto, wmi, PIL, keyboard, pyautogui, win32api (pywin32), selenium, openCV, tesseract, requests, lxml, PyMuPDF]

@ -1,5 +1,7 @@
.. _module.studio.description:
************************ ************************
1. Description 1. Описание
************************ ************************
pyOpenRPA Studio is the executable process. pyOpenRPA Studio is the executable process.

@ -1,5 +1,5 @@
#################################### ####################################
2. How to use 2. Как использовать?
#################################### ####################################
Content Content

@ -13,18 +13,27 @@
import os import os
import sys import sys
import sphinx_rtd_theme import sphinx_rtd_theme
import pyOpenRPA
sys.path.insert(0, os.path.abspath(r'..')) sys.path.insert(0, os.path.abspath(r'..'))
import datetime
# -- Project information ----------------------------------------------------- # -- Project information -----------------------------------------------------
# The full version, including alpha/beta/rc tags
release = f'{pyOpenRPA.__version__}'
language = 'ru'
project = f'pyOpenRPA {pyOpenRPA.__version__}'
copyright = f'{datetime.datetime.now().year}, ООО "ОПЕН РПА"'
author = f'{pyOpenRPA.__author__}'
project = 'pyOpenRPA'
copyright = '2021, Ivan Maslov'
author = 'Ivan Maslov'
# The full version, including alpha/beta/rc tags
release = 'v1.2.0'
rst_epilog = """
.. |release| replace:: {release}
.. |author| replace:: {author}
""".format(
release = release,author = author,
)
# -- General configuration --------------------------------------------------- # -- General configuration ---------------------------------------------------

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 86 KiB

@ -4,83 +4,87 @@
contain the root `toctree` directive. contain the root `toctree` directive.
#################################### ####################################
Welcome to pyOpenRPA's wiki Портал документации pyOpenRPA
#################################### ####################################
.. image:: /img/ModalGuide.png .. image:: /img/ModalGuide.png
:alt: ModalGuide.png :alt: ModalGuide.png
*by Ivan Maslov (Russia)* - see :ref:`3.-Copyrights-&-Contacts`.
! ATTENTION ! pyOpenRPA works only on MS Windows 7+/Server 2008+. Guys from Unix/Mac - sorry. We will come to you soon :)
************************************************** **************************************************
About Дорогие коллеги!
************************************************** **************************************************
Dear RPA-tors. Let me congratulate you with great change in the RPA world. Since 2019 the first enterprise level open source RPA platform is here! Добро пожаловать на портал документации pyOpenRPA.
pyOpenRPA is absolutely open source commercial project. Hosted by LLC PYOPENRPA (RUSSIA) pyOpenRPA - это самое прогрессивное и технологичное RPA решение на рынке роботизации (открытый код). Наших роботов невозможно отключить принудительно - управлять ими будете только вы!
Вместе с pyOpenRPA стало возможно сочетать в рамках одного проекта все перспективные технологии, такие как:
The pyOpenRPA - free, fast and reliable * распознавание,
Powerful OpenSource RPA tool for business (based on python 3). Best performance and absolutely free! * искусственный интеллект,
* машинное обучение,
* большие данные,
* голосовые и чат-боты,
* речевая аналитика,
* компьютерное зрение.
The pyOpenRPA is based on Python and using well known OpenSource solutions such as Selenium, OpenCV, Win32, UI automation and others. Thanks to it we were able to create consolidated platform with all possible features. В компании pyOpenRPA LLC мы создаем стандарты вендора нового поколения. Предлагаем не просто платформу роботизации RPA, а уникальный набор услуг для каждого клиента в зависимости от решаемой задачи.
The pyOpenRPA is distributed under the PYOPENRPA open license. Мы знаем, что реальная ценность роботизации RPA для вас заключается не в каком-то софте. Софт - это лишь 1 из 3 компонентов. Остальные 2 компонента - это люди и вычислительные мощности (железо). Вам нужно комплексное и системное решение проблемы, и мы вам в этом поможем!
At the time of this writing the pyOpenRPA is successfully using in several big Russian companies. Companies in which it was decided to develop own RPA division with no dependencies on expensive licenses.
************************************************** Наша открытость и ряд стратегических инициатив позволяют с легкостью привлекать сотни новых специалистов и клиентов. Быть предельно прозрачными перед всеми участниками рынка. Предлагать индивидуальный набор услуг, нацеленный именно на решение проблем клиента.
Repo structure
**************************************************
The description of the each folder in GitLab repo is going below: С презентацией pyOpenRPA вы можете ознакомиться по ссылке: `[СМОТРЕТЬ PDF] <https://pyopenrpa.ru/Index/pyOpenRPA_product_service.pdf>`_ . Если возникнут вопросы, то вы всегда можете обратиться к нам (контакты см. в презентации).
pyOpenRPA - роботы вам помогут!
**Иван Маслов, основатель и генеральный директор pyOpenRPA LLC**
- **Agent**: template build for the pyOpenRPA.Agent component
- **Orchestrator**: template build for the pyOpenRPA.Orchestrator component
- **Resources**: 3rd party resources which is needed to provide pyOpenRPA encapsulation from the Operating System (OS) dependencies.
- **Robot**: template build for the robot
- **Sources**: pyOpenRPA python package sources + sphinx sources
- **Studio**: build for the pyOpenRPA.Studio which support Desktop UI (support x32 and x64 desktop UI apps)
- **Utils**: many additional good tools for the python developer
- **Wiki**: compiled wiki documentation
************************************************** **************************************************
The pyOpenRPA structure О портале
************************************************** **************************************************
The pyOpenRPA has 4 main tools: Портал состоит из следующих разделов:
############################################ ############################################
- Studio - ОБЩЕЕ
- Robot - МОДУЛЬ РОБОТ
- Orchestrator - МОДУЛЬ СТУДИЯ
- Agent - МОДУЛЬ ОРКЕСТРАТОР
- МОДУЛЬ АГЕНТ
- ИНСТРУМЕНТЫ
Studio ОБЩЕЕ
###################### ######################
The pyOpenRPA.Studio tool has been developed to help RPA-tors to create the robot algorythms. В разделе описание общие положения, такие как: Описание структуры портала, инструкция по развертыванию и запуску pyOpenRPA, информация о правообладателе, контакты.
**Features** МОДУЛЬ РОБОТ
######################
Модуль обеспечивает всю необходимую функциональность для создания любого программного робота RPA. Модуль робота поставляется в качестве библиотеки Python, что позволяет с легкостью интегрировать его в другие проекты перспективных технологий.
**Содержит**
- Run actions - уровень доступа к элементам локального (win32, UI automation) и веб приложения
- Create visual algorythms of the robot - уровень доступа к текстовым каналам передачи данных (клавиатура, буфер обмена)
- Desktop app: Analyze desktop app ui tree - уровень доступа к графическим каналам передачи данных (мышь, экран)
- Desktop app: Search desktop app ui by mouse
- Desktop app: Generate & edit the UIO Selector
Robot Подробное описание модуля: :ref:`module.robot.description`.
МОДУЛЬ СТУДИИ
###################### ######################
The pyOpenRPA.Robot package is the core of any action execution in the pyOpenRPA. All action from algorythms are perfoming by the Robot tool. It looks like a console process without graphic user interface. Модуль является инструментом для отладки проектируемых узлов программного робота RPA. Запускается в качестве обособленного приложения в веб-браузере.
**Features** **Основные возможности**
- Based on Python (killer feature) - Поиск и запуск доступных действий над UI элементом
- Support Win32 GUI framework (desktop app) - Чтение и запись атрибутов UI элемента
- Support UI automation framework (desktop app) - Визуальное прототипирование алгоритма
- Support Selenium (web app) - Редактирование UI селекторов
- Support PyAutoGUI (screen capture & mouse) - Поиск UI элементов по наведению мыши
- Support OpenCV (computer vision) - Поиск UI элементов в дереве UI объектов
- Автоматизированная генерация UI селекторов
Orchestrator Подробное описание модуля: :ref:`module.studio.description`.
МОДУЛЬ ОРКЕСТРАТОР
###################### ######################
The pyOpenRPA.Orchestrator package has been developed to maintain robot infrastructure (2+ robots algorythm). The pyOpenRPA.Orchestrator package has been developed to maintain robot infrastructure (2+ robots algorythm).
@ -104,6 +108,47 @@ The pyOpenRPA.Agent tool has been developed to maintain robot infrastructure (2+
- Get screenshots from the RPA GUI session - Get screenshots from the RPA GUI session
- Get the list of the running processes - Get the list of the running processes
**************************************************
Технические требования
**************************************************
ВЕРСИЯ |release|
*by Ivan Maslov (Russia)* - see
! ATTENTION ! pyOpenRPA works only on MS Windows 7+/Server 2008+. Guys from Unix/Mac - sorry. We will come to you soon :)
**************************************************
About
**************************************************
Dear RPA-tors. Let me congratulate you with great change in the RPA world. Since 2019 the first enterprise level open source RPA platform is here!
pyOpenRPA is absolutely open source commercial project. Hosted by LLC PYOPENRPA (RUSSIA)
The pyOpenRPA - free, fast and reliable
Powerful OpenSource RPA tool for business (based on python 3). Best performance and absolutely free!
The pyOpenRPA is based on Python and using well known OpenSource solutions such as Selenium, OpenCV, Win32, UI automation and others. Thanks to it we were able to create consolidated platform with all possible features.
The pyOpenRPA is distributed under the PYOPENRPA open license.
At the time of this writing the pyOpenRPA is successfully using in several big Russian companies. Companies in which it was decided to develop own RPA division with no dependencies on expensive licenses.
**************************************************
Repo structure
**************************************************
The description of the each folder in GitLab repo is going below:
- **Agent**: template build for the pyOpenRPA.Agent component
- **Orchestrator**: template build for the pyOpenRPA.Orchestrator component
- **Resources**: 3rd party resources which is needed to provide pyOpenRPA encapsulation from the Operating System (OS) dependencies.
- **Robot**: template build for the robot
- **Sources**: pyOpenRPA python package sources + sphinx sources
- **Studio**: build for the pyOpenRPA.Studio which support Desktop UI (support x32 and x64 desktop UI apps)
- **Utils**: many additional good tools for the python developer
- **Wiki**: compiled wiki documentation
************************************************** **************************************************
Wiki structure Wiki structure
************************************************** **************************************************
@ -118,48 +163,51 @@ In wiki you can use the following docs:
- RUS Tutorial Web UI `[|OPEN HABR|] <https://habr.com/ru/post/515310/>`_; `[|OPEN GITLAB|] <https://gitlab.com/UnicodeLabs/OpenRPA/-/tree/master/Wiki/RUS_Tutorial/WebGUI_Habr/readme.md>`_ - RUS Tutorial Web UI `[|OPEN HABR|] <https://habr.com/ru/post/515310/>`_; `[|OPEN GITLAB|] <https://gitlab.com/UnicodeLabs/OpenRPA/-/tree/master/Wiki/RUS_Tutorial/WebGUI_Habr/readme.md>`_
- RUS Leaflet pyOpenRPA v4.pdf `[|OPEN GITLAB|] <https://gitlab.com/UnicodeLabs/OpenRPA/-/tree/master/Wiki/RUS_Leaflet/RUS%20Leaflet%20pyOpenRPA%20v4.pdf>`_ - RUS Leaflet pyOpenRPA v4.pdf `[|OPEN GITLAB|] <https://gitlab.com/UnicodeLabs/OpenRPA/-/tree/master/Wiki/RUS_Leaflet/RUS%20Leaflet%20pyOpenRPA%20v4.pdf>`_
:ref:`3.-Copyrights-&-Contacts`.
************************************************** **************************************************
Guide content Guide content
************************************************** **************************************************
.. toctree:: .. toctree::
:maxdepth: 2 :maxdepth: 2
:caption: GENERAL :caption: ОБЩЕЕ
:glob: :glob:
Выбрать версию <https://pyopenrpa.ru/wiki/guide/index>
* *
.. toctree:: .. toctree::
:maxdepth: 2 :maxdepth: 2
:caption: ROBOT :caption: МОДУЛЬ РОБОТ
:glob: :glob:
Robot/* Robot/*
.. toctree:: .. toctree::
:maxdepth: 2 :maxdepth: 2
:caption: STUDIO :caption: МОДУЛЬ СТУДИЯ
:glob: :glob:
Studio/* Studio/*
.. toctree:: .. toctree::
:maxdepth: 3 :maxdepth: 3
:caption: ORCHESTRATOR :caption: МОДУЛЬ ОРКЕСТРАТОР
:glob: :glob:
Orchestrator/* Orchestrator/*
.. toctree:: .. toctree::
:maxdepth: 3 :maxdepth: 3
:caption: AGENT :caption: МОДУЛЬ АГЕНТ
:glob: :glob:
Agent/* Agent/*
.. toctree:: .. toctree::
:maxdepth: 2 :maxdepth: 2
:caption: TOOLS :caption: ИНСТРУМЕНТЫ
:glob: :glob:
Tools/* Tools/*

@ -0,0 +1,44 @@
cd %~dp0
@ECHO OFF
RD /S /Q "%~dp0..\..\Wiki\RUS_Guide\doctrees"
RD /S /Q "%~dp0..\..\Wiki\RUS_Guide\html"
RD /S /Q "%~dp0..\..\Wiki\RUS_Guide\markdown"
set PATH=%PATH%;%~dp0..\..\Resources\WPy64-3720\python-3.7.2.amd64\Scripts
set PYTHONPATH=%PYTHONPATH%;%~dp0..\..\Resources\WPy64-3720\python-3.7.2.amd64\Scripts
pushd %~dp0
REM Command file for Sphinx documentation
if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=%~dp0
set BUILDDIR=..\..\Wiki\RUS_Guide
%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.http://sphinx-doc.org/
exit /b 1
)
%SPHINXBUILD% -M html %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
%SPHINXBUILD% -M markdown %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
"..\..\Resources\WPy64-3720\python-3.7.2.amd64\python.exe" make_RUS_Guide_2.py
..\..\Wiki\RUS_Guide\html\index.html
goto end
:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
:end
popd
pause>nul

@ -0,0 +1,3 @@
cd %~dp0
"..\..\Resources\WPy64-3720\python-3.7.2.amd64\python.exe" make_RUS_Guide_2.py
pause>nul

@ -0,0 +1,49 @@
import os, shutil, subprocess
# Build dir
gSourceDirAbsPathStr = os.path.abspath("")
gBuildDirAbsPathStr = os.path.abspath("..\\..\\Wiki\\RUS_Guide")
gBuildDirHTMLAbsPathStr = os.path.join(gBuildDirAbsPathStr, "html")
gBuildDirMDAbsPathStr = os.path.join(gBuildDirAbsPathStr, "markdown")
# list all dir which have img folder
# Copy to md and html
for root, subFolder, files in os.walk(os.path.abspath("")):
for item in files:
if item.endswith(".png") :
fileNamePath = str(os.path.join(root,item))
#print(fileNamePath)
lFileItemBuildDirHTMLAbsPathStr = root.replace(gSourceDirAbsPathStr, gBuildDirHTMLAbsPathStr)
lFileItemBuildHTMLAbsPathStr = str(os.path.join(lFileItemBuildDirHTMLAbsPathStr,item))
if not os.path.exists(lFileItemBuildDirHTMLAbsPathStr):
os.mkdir(lFileItemBuildDirHTMLAbsPathStr)
shutil.copy2(fileNamePath, fileNamePath.replace(gSourceDirAbsPathStr, gBuildDirHTMLAbsPathStr))
lFileItemBuildDirMDAbsPathStr = root.replace(gSourceDirAbsPathStr, gBuildDirMDAbsPathStr)
lFileItemBuildMDAbsPathStr = str(os.path.join(lFileItemBuildDirMDAbsPathStr,item))
if not os.path.exists(lFileItemBuildDirMDAbsPathStr):
os.mkdir(lFileItemBuildDirMDAbsPathStr)
shutil.copy2(fileNamePath, fileNamePath.replace(gSourceDirAbsPathStr, gBuildDirMDAbsPathStr))
# Run PDF generation
"""
gHTML2PDFPathList = [
"index.html",
"01_HowToInstall.html",
"02_RoadMap.html",
"03_Copyrights_Contacts.html"
]
gWKHTMLtoPDFPath = "..\\..\\Resources\\wkhtmltopdf\\bin\\wkhtmltopdf.exe"
gCMDRunStr = f'{os.path.abspath(gWKHTMLtoPDFPath)} --javascript-delay 5000 --load-error-handling ignore --enable-local-file-access '
gPDFOutputAbsPath = os.path.join(gBuildDirAbsPathStr, "pyOpenRPA_Guide_ENG.pdf")
for lItemStr in gHTML2PDFPathList:
gCMDRunStr += f' {os.path.join(gBuildDirHTMLAbsPathStr, lItemStr)} '
gCMDRunStr += f' "{gPDFOutputAbsPath}" '
#os.system("cmd /c "+gCMDRunStr)
subprocess.call(gCMDRunStr.split(" "), shell=True)
print(gCMDRunStr)
"""

@ -0,0 +1,6 @@
cd %~dp0
RD /S /Q "%~dp0..\Wiki\RUS_Guide\doctrees"
RD /S /Q "%~dp0..\Wiki\RUS_Guide\html"
RD /S /Q "%~dp0..\Wiki\RUS_Guide\markdown"
GuideSphinx\make_RUS_Guide.bat html
pause >nul

@ -1,9 +1,9 @@
r""" r"""
The OpenRPA package (from UnicodeLabs) The pyOpenRPA package
""" """
__version__ = 'v1.2.12' __version__ = 'v1.2.12'
__all__ = [] __all__ = []
__author__ = 'Ivan Maslov <ivan.maslov@unicodelabs.ru>' __author__ = 'Ivan Maslov <ivan.maslov@pyopenrpa.ru>'
#from .Core import Robot #from .Core import Robot

@ -0,0 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: d9a414d4d4d7c1249f90ff5e50cb5408
tags: 645f666f9bcd5a90fca523b33c5a78b7

@ -0,0 +1,278 @@
<!DOCTYPE html>
<html class="writer-html5" lang="ru" >
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>1. Первый запуск &mdash; документация pyOpenRPA v1.2.12 v1.2.12</title>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="shortcut icon" href="_static/favicon.ico"/>
<!--[if lt IE 9]>
<script src="_static/js/html5shiv.min.js"></script>
<![endif]-->
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/translations.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<link rel="index" title="Алфавитный указатель" href="genindex.html" />
<link rel="search" title="Поиск" href="search.html" />
<link rel="next" title="2. Права &amp; Контакты" href="03_Copyrights_Contacts.html" />
<link rel="prev" title="Портал документации pyOpenRPA" href="index.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="index.html" class="icon icon-home"> pyOpenRPA v1.2.12
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Поиск в документации" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<p class="caption"><span class="caption-text">ОБЩЕЕ</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference external" href="https://pyopenrpa.ru/wiki/guide/index">Выбрать версию</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">1. Первый запуск</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#how-to-check-installation">How to check installation</a></li>
<li class="toctree-l2"><a class="reference internal" href="#system-requirements">System requirements</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="03_Copyrights_Contacts.html">2. Права &amp; Контакты</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ РОБОТ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="Robot/01_Robot.html">1. Описание</a></li>
<li class="toctree-l1"><a class="reference internal" href="Robot/02_Defs.html">2. Функции</a></li>
<li class="toctree-l1"><a class="reference internal" href="Robot/03_HowToUse.html">3. Как использовать?</a></li>
<li class="toctree-l1"><a class="reference internal" href="Robot/04_Dependencies.html">4. Зависимости</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ СТУДИЯ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="Studio/01_Studio.html">1. Описание</a></li>
<li class="toctree-l1"><a class="reference internal" href="Studio/02_HowToUse.html">2. Как использовать?</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ ОРКЕСТРАТОР</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="Orchestrator/01_Orchestrator.html">1. Description</a></li>
<li class="toctree-l1"><a class="reference internal" href="Orchestrator/02_Defs.html">2. Defs</a></li>
<li class="toctree-l1"><a class="reference internal" href="Orchestrator/03_gSettingsTemplate.html">3. gSettings Template</a></li>
<li class="toctree-l1"><a class="reference internal" href="Orchestrator/04_HowToUse.html">4. How to use</a></li>
<li class="toctree-l1"><a class="reference internal" href="Orchestrator/05_UAC.html">5. UAC - User Access Control</a></li>
<li class="toctree-l1"><a class="reference internal" href="Orchestrator/06_Defs%20Managers.html">6. Defs Managers</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ АГЕНТ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="Agent/02_Defs.html">2. Defs</a></li>
</ul>
<p class="caption"><span class="caption-text">ИНСТРУМЕНТЫ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="Tools/02_Defs.html">2. Defs StopSafe</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">pyOpenRPA v1.2.12</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html" class="icon icon-home"></a> &raquo;</li>
<li>1. Первый запуск</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/01_HowToInstall.rst.txt" rel="nofollow"> Просмотреть исходный код страницы</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="id1">
<h1>1. Первый запуск<a class="headerlink" href="#id1" title="Ссылка на этот заголовок"></a></h1>
<p>Are you ready to install the pyOpenRPA solution on your machine?</p>
<p>Ok, we start.
<strong>Do the following operations:</strong></p>
<ul class="simple">
<li><p>Download the pyOpenRPA package from master branch on GitLab [Download ZIP](<a class="reference external" href="https://gitlab.com/UnicodeLabs/OpenRPA/-/archive/master/OpenRPA-master.zip">https://gitlab.com/UnicodeLabs/OpenRPA/-/archive/master/OpenRPA-master.zip</a>)</p></li>
<li><p>Unzip the package</p></li>
</ul>
<p><strong>Installation has been completed :)</strong></p>
<div class="section" id="how-to-check-installation">
<h2>How to check installation<a class="headerlink" href="#how-to-check-installation" title="Ссылка на этот заголовок"></a></h2>
<ul class="simple">
<li><p>Run portable python (built in the pyOpenRPA)</p>
<ul>
<li><p>x32 python (GIT\Resources\WPy32-3720\python-3.7.2\python.exe)</p></li>
<li><p>x64 python (GIT\Resources\WPy64-3720\python-3.7.2.amd64\python.exe)</p></li>
</ul>
</li>
</ul>
<p><strong>The pyOpenRPA has been successfully installed if the portable python 3.7.2 was started without any exceptions (see screenshot).</strong></p>
<img alt="cb5dec8cecafa7d64f6cd14b2672acce.png" src="_images/cb5dec8cecafa7d64f6cd14b2672acce.png" />
</div>
<div class="section" id="system-requirements">
<h2>System requirements<a class="headerlink" href="#system-requirements" title="Ссылка на этот заголовок"></a></h2>
<ul class="simple">
<li><p>OS Windows 7+. <em>Need Windows package KB2999226 if use windows Vista/7/8/8.1/Server 2008/Server 2012 (https://support.microsoft.com/ru-ru/help/2999226)</em></p></li>
<li><p>For OpenCV: OS Windows 7/8/8/10 only (no Windows Server)</p></li>
</ul>
<p> .. v1.2.12 replace:: v1.2.12
.. <a href="#id2"><span class="problematic" id="id3">|author|</span></a> replace:: Ivan Maslov &lt;<a class="reference external" href="mailto:ivan&#46;maslov&#37;&#52;&#48;unicodelabs&#46;ru">ivan<span>&#46;</span>maslov<span>&#64;</span>unicodelabs<span>&#46;</span>ru</a>&gt;</p>
<p></p>
</div>
</div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="03_Copyrights_Contacts.html" class="btn btn-neutral float-right" title="2. Права &amp; Контакты" accesskey="n" rel="next">Следующая <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
<a href="index.html" class="btn btn-neutral float-left" title="Портал документации pyOpenRPA" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Предыдущая</a>
</div>
<hr/>
<div role="contentinfo">
<p>
&#169; Copyright 2022, ООО &#34;ОПЕН РПА&#34;.
</p>
</div>
Собрано при помощи <a href="https://www.sphinx-doc.org/">Sphinx</a> с использованием
<a href="https://github.com/readthedocs/sphinx_rtd_theme">темы,</a>
предоставленной <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>

@ -0,0 +1,283 @@
<!DOCTYPE html>
<html class="writer-html5" lang="ru" >
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>2. Права &amp; Контакты &mdash; документация pyOpenRPA v1.2.12 v1.2.12</title>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="shortcut icon" href="_static/favicon.ico"/>
<!--[if lt IE 9]>
<script src="_static/js/html5shiv.min.js"></script>
<![endif]-->
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/translations.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<link rel="index" title="Алфавитный указатель" href="genindex.html" />
<link rel="search" title="Поиск" href="search.html" />
<link rel="next" title="1. Описание" href="Robot/01_Robot.html" />
<link rel="prev" title="1. Первый запуск" href="01_HowToInstall.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="index.html" class="icon icon-home"> pyOpenRPA v1.2.12
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Поиск в документации" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<p class="caption"><span class="caption-text">ОБЩЕЕ</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference external" href="https://pyopenrpa.ru/wiki/guide/index">Выбрать версию</a></li>
<li class="toctree-l1"><a class="reference internal" href="01_HowToInstall.html">1. Первый запуск</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">2. Права &amp; Контакты</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#ivan-maslov-ceo-founder">Ivan Maslov (CEO &amp; FOUNDER)</a></li>
<li class="toctree-l2"><a class="reference internal" href="#rd-party-components-license-dependencies">3-rd party components license dependencies</a></li>
</ul>
</li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ РОБОТ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="Robot/01_Robot.html">1. Описание</a></li>
<li class="toctree-l1"><a class="reference internal" href="Robot/02_Defs.html">2. Функции</a></li>
<li class="toctree-l1"><a class="reference internal" href="Robot/03_HowToUse.html">3. Как использовать?</a></li>
<li class="toctree-l1"><a class="reference internal" href="Robot/04_Dependencies.html">4. Зависимости</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ СТУДИЯ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="Studio/01_Studio.html">1. Описание</a></li>
<li class="toctree-l1"><a class="reference internal" href="Studio/02_HowToUse.html">2. Как использовать?</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ ОРКЕСТРАТОР</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="Orchestrator/01_Orchestrator.html">1. Description</a></li>
<li class="toctree-l1"><a class="reference internal" href="Orchestrator/02_Defs.html">2. Defs</a></li>
<li class="toctree-l1"><a class="reference internal" href="Orchestrator/03_gSettingsTemplate.html">3. gSettings Template</a></li>
<li class="toctree-l1"><a class="reference internal" href="Orchestrator/04_HowToUse.html">4. How to use</a></li>
<li class="toctree-l1"><a class="reference internal" href="Orchestrator/05_UAC.html">5. UAC - User Access Control</a></li>
<li class="toctree-l1"><a class="reference internal" href="Orchestrator/06_Defs%20Managers.html">6. Defs Managers</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ АГЕНТ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="Agent/02_Defs.html">2. Defs</a></li>
</ul>
<p class="caption"><span class="caption-text">ИНСТРУМЕНТЫ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="Tools/02_Defs.html">2. Defs StopSafe</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">pyOpenRPA v1.2.12</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html" class="icon icon-home"></a> &raquo;</li>
<li>2. Права &amp; Контакты</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/03_Copyrights_Contacts.rst.txt" rel="nofollow"> Просмотреть исходный код страницы</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="copyrights-contacts">
<span id="id1"></span><h1>2. Права &amp; Контакты<a class="headerlink" href="#copyrights-contacts" title="Ссылка на этот заголовок"></a></h1>
<p>pyOpenRPA is created by Ivan Maslov (Russia).
Hosted by PYOPENRPA LLC (Russia)</p>
<p>My purpose is to create #IT4Business models in the companies.
I can help you to create the new #IT4Business in your company.
#IT4Business homepage - <a class="reference external" href="https://www.facebook.com/RU.IT4Business">https://www.facebook.com/RU.IT4Business</a>
#IT4Busines is the methodology which is created for build compact fast and reliable IT function in company.
If you has many IT specialists, very long deadlines for the IT tasks, many bugs in IT software - #IT4Business is for you :)</p>
<p>If you need some IT help - feel free to contact me (prefer e-mail or skype).
If you will find some issue in pyOpenRPA - write about it to me via e-mail/skype/gitlab issue.</p>
<p>Thank you!</p>
<div class="section" id="ivan-maslov-ceo-founder">
<h2>Ivan Maslov (CEO &amp; FOUNDER)<a class="headerlink" href="#ivan-maslov-ceo-founder" title="Ссылка на этот заголовок"></a></h2>
<p>Our contacts:</p>
<ul class="simple">
<li><p>E-mail: <a class="reference external" href="mailto:Ivan&#46;Maslov&#37;&#52;&#48;pyOpenRPA&#46;ru">Ivan<span>&#46;</span>Maslov<span>&#64;</span>pyOpenRPA<span>&#46;</span>ru</a></p></li>
<li><p>Skype: MegaFinder</p></li>
<li><p>Web: <a class="reference external" href="https://pyopenrpa.ru/">https://pyopenrpa.ru/</a></p></li>
<li><p>Telegram: <a class="reference external" href="https://t.me/pyopenrpa">https://t.me/pyopenrpa</a></p></li>
<li><p>WhatsApp | Telegram: +7 906 722 39 25 | &#64;IvanMaslov</p></li>
</ul>
</div>
<div class="section" id="rd-party-components-license-dependencies">
<h2>3-rd party components license dependencies<a class="headerlink" href="#rd-party-components-license-dependencies" title="Ссылка на этот заголовок"></a></h2>
<ul class="simple">
<li><p>WinPython 3.7.1 32-bit &amp; 64-bit, license MIT (<a class="reference external" href="https://github.com/winpython/winpython">https://github.com/winpython/winpython</a>)</p></li>
<li><p>Selenium v…, license Apache 2.0</p></li>
<li><p>pywinauto 0.6.5, license BSD 3-Clause (<a class="reference external" href="https://github.com/pywinauto/pywinauto">https://github.com/pywinauto/pywinauto</a>)</p></li>
<li><p>Semantic UI …, license MIT (<a class="reference external" href="https://github.com/Semantic-Org/Semantic-UI">https://github.com/Semantic-Org/Semantic-UI</a>)</p></li>
<li><p>PyAutoGUI …, license BSD 3-Clause (<a class="reference external" href="https://github.com/asweigart/pyautogui">https://github.com/asweigart/pyautogui</a>)</p></li>
<li><p>keyboard …, license MIT (<a class="reference external" href="https://github.com/boppreh/keyboard">https://github.com/boppreh/keyboard</a>)</p></li>
<li><p>pywin32 …, Python Software Foundation License (PSF) (<a class="reference external" href="https://github.com/mhammond/pywin32">https://github.com/mhammond/pywin32</a>)</p></li>
</ul>
<p> .. v1.2.12 replace:: v1.2.12
.. <a href="#id2"><span class="problematic" id="id3">|author|</span></a> replace:: Ivan Maslov &lt;<a class="reference external" href="mailto:ivan&#46;maslov&#37;&#52;&#48;unicodelabs&#46;ru">ivan<span>&#46;</span>maslov<span>&#64;</span>unicodelabs<span>&#46;</span>ru</a>&gt;</p>
<p></p>
</div>
</div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="Robot/01_Robot.html" class="btn btn-neutral float-right" title="1. Описание" accesskey="n" rel="next">Следующая <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
<a href="01_HowToInstall.html" class="btn btn-neutral float-left" title="1. Первый запуск" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Предыдущая</a>
</div>
<hr/>
<div role="contentinfo">
<p>
&#169; Copyright 2022, ООО &#34;ОПЕН РПА&#34;.
</p>
</div>
Собрано при помощи <a href="https://www.sphinx-doc.org/">Sphinx</a> с использованием
<a href="https://github.com/readthedocs/sphinx_rtd_theme">темы,</a>
предоставленной <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>

@ -0,0 +1,410 @@
<!DOCTYPE html>
<html class="writer-html5" lang="ru" >
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>2. Defs &mdash; документация pyOpenRPA v1.2.12 v1.2.12</title>
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="shortcut icon" href="../_static/favicon.ico"/>
<!--[if lt IE 9]>
<script src="../_static/js/html5shiv.min.js"></script>
<![endif]-->
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js"></script>
<script src="../_static/translations.js"></script>
<script type="text/javascript" src="../_static/js/theme.js"></script>
<link rel="index" title="Алфавитный указатель" href="../genindex.html" />
<link rel="search" title="Поиск" href="../search.html" />
<link rel="next" title="2. Defs StopSafe" href="../Tools/02_Defs.html" />
<link rel="prev" title="6. Defs Managers" href="../Orchestrator/06_Defs%20Managers.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../index.html" class="icon icon-home"> pyOpenRPA v1.2.12
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="Поиск в документации" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<p class="caption"><span class="caption-text">ОБЩЕЕ</span></p>
<ul>
<li class="toctree-l1"><a class="reference external" href="https://pyopenrpa.ru/wiki/guide/index">Выбрать версию</a></li>
<li class="toctree-l1"><a class="reference internal" href="../01_HowToInstall.html">1. Первый запуск</a></li>
<li class="toctree-l1"><a class="reference internal" href="../03_Copyrights_Contacts.html">2. Права &amp; Контакты</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ РОБОТ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Robot/01_Robot.html">1. Описание</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Robot/02_Defs.html">2. Функции</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Robot/03_HowToUse.html">3. Как использовать?</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Robot/04_Dependencies.html">4. Зависимости</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ СТУДИЯ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Studio/01_Studio.html">1. Описание</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Studio/02_HowToUse.html">2. Как использовать?</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ ОРКЕСТРАТОР</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/01_Orchestrator.html">1. Description</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/02_Defs.html">2. Defs</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/03_gSettingsTemplate.html">3. gSettings Template</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/04_HowToUse.html">4. How to use</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/05_UAC.html">5. UAC - User Access Control</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/06_Defs%20Managers.html">6. Defs Managers</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ АГЕНТ</span></p>
<ul class="current">
<li class="toctree-l1 current"><a class="current reference internal" href="#">2. Defs</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#module-pyOpenRPA.Agent.__Agent__">pyOpenRPA.Agent.__Agent__</a></li>
<li class="toctree-l2"><a class="reference internal" href="#references">References</a></li>
</ul>
</li>
</ul>
<p class="caption"><span class="caption-text">ИНСТРУМЕНТЫ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Tools/02_Defs.html">2. Defs StopSafe</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../index.html">pyOpenRPA v1.2.12</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="../index.html" class="icon icon-home"></a> &raquo;</li>
<li>2. Defs</li>
<li class="wy-breadcrumbs-aside">
<a href="../_sources/Agent/02_Defs.rst.txt" rel="nofollow"> Просмотреть исходный код страницы</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="defs">
<h1>2. Defs<a class="headerlink" href="#defs" title="Ссылка на этот заголовок"></a></h1>
<div class="section" id="module-pyOpenRPA.Agent.__Agent__">
<span id="pyopenrpa-agent-agent"></span><h2>pyOpenRPA.Agent.__Agent__<a class="headerlink" href="#module-pyOpenRPA.Agent.__Agent__" title="Ссылка на этот заголовок"></a></h2>
<p><strong>Functions:</strong></p>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Agent.__Agent__.OSCMD" title="pyOpenRPA.Agent.__Agent__.OSCMD"><code class="xref py py-obj docutils literal notranslate"><span class="pre">OSCMD</span></code></a>(inCMDStr[, inRunAsyncBool, …])</p></td>
<td><p>Execute CMD on the Agent daemonic process</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Agent.__Agent__.OSFileBinaryDataBase64StrAppend" title="pyOpenRPA.Agent.__Agent__.OSFileBinaryDataBase64StrAppend"><code class="xref py py-obj docutils literal notranslate"><span class="pre">OSFileBinaryDataBase64StrAppend</span></code></a>(…[, …])</p></td>
<td><p>Create binary file by the base64 string (safe for JSON transmition)</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Agent.__Agent__.OSFileBinaryDataBase64StrCreate" title="pyOpenRPA.Agent.__Agent__.OSFileBinaryDataBase64StrCreate"><code class="xref py py-obj docutils literal notranslate"><span class="pre">OSFileBinaryDataBase64StrCreate</span></code></a>(…[, …])</p></td>
<td><p>Create binary file by the base64 string (safe for JSON transmition)</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Agent.__Agent__.OSFileBinaryDataBase64StrReceive" title="pyOpenRPA.Agent.__Agent__.OSFileBinaryDataBase64StrReceive"><code class="xref py py-obj docutils literal notranslate"><span class="pre">OSFileBinaryDataBase64StrReceive</span></code></a>(inFilePathStr)</p></td>
<td><p>Read binary file and encode in base64 to transmit (safe for JSON transmition)</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Agent.__Agent__.OSFileMTimeGet" title="pyOpenRPA.Agent.__Agent__.OSFileMTimeGet"><code class="xref py py-obj docutils literal notranslate"><span class="pre">OSFileMTimeGet</span></code></a>(inFilePathStr)</p></td>
<td><p>Read file modification time timestamp format (float)</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Agent.__Agent__.OSFileTextDataStrCreate" title="pyOpenRPA.Agent.__Agent__.OSFileTextDataStrCreate"><code class="xref py py-obj docutils literal notranslate"><span class="pre">OSFileTextDataStrCreate</span></code></a>(inFilePathStr, …)</p></td>
<td><p>Create text file in the agent GUI session</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Agent.__Agent__.OSFileTextDataStrReceive" title="pyOpenRPA.Agent.__Agent__.OSFileTextDataStrReceive"><code class="xref py py-obj docutils literal notranslate"><span class="pre">OSFileTextDataStrReceive</span></code></a>(inFilePathStr[, …])</p></td>
<td><p>Read text file in the agent GUI session</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Agent.__Agent__.ProcessWOExeUpperUserListGet" title="pyOpenRPA.Agent.__Agent__.ProcessWOExeUpperUserListGet"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ProcessWOExeUpperUserListGet</span></code></a>()</p></td>
<td><p>Return the process list only for the current user (where Agent is running) without .EXE in upper case.</p></td>
</tr>
</tbody>
</table>
<dl class="py function">
<dt id="pyOpenRPA.Agent.__Agent__.OSCMD">
<code class="sig-prename descclassname">pyOpenRPA.Agent.__Agent__.</code><code class="sig-name descname">OSCMD</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inCMDStr</span></em>, <em class="sig-param"><span class="n">inRunAsyncBool</span><span class="o">=</span><span class="default_value">True</span></em>, <em class="sig-param"><span class="n">inGSettings</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">inSendOutputToOrchestratorLogsBool</span><span class="o">=</span><span class="default_value">True</span></em>, <em class="sig-param"><span class="n">inCMDEncodingStr</span><span class="o">=</span><span class="default_value">'cp1251'</span></em>, <em class="sig-param"><span class="n">inCaptureBool</span><span class="o">=</span><span class="default_value">True</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Agent/__Agent__.html#OSCMD"><span class="viewcode-link">[исходный код]</span></a><a class="headerlink" href="#pyOpenRPA.Agent.__Agent__.OSCMD" title="Ссылка на это определение"></a></dt>
<dd><p>Execute CMD on the Agent daemonic process</p>
<dl class="field-list simple">
<dt class="field-odd">Параметры</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>inCMDStr</strong> command to execute on the Agent session</p></li>
<li><p><strong>inRunAsyncBool</strong> True - Agent processor dont wait execution; False - Agent processor wait cmd execution</p></li>
<li><p><strong>inGSettings</strong> Agent global settings dict</p></li>
<li><p><strong>inSendOutputToOrchestratorLogsBool</strong> True - catch cmd execution output and send it to the Orchestrator logs; Flase - else case; Default True</p></li>
<li><p><strong>inCMDEncodingStr</strong> Set the encoding of the DOS window on the Agent server session. Windows is beautiful :) . Default is «cp1251» early was «cp866» - need test</p></li>
<li><p><strong>inCaptureBool</strong> !ATTENTION! If you need to start absolutely encapsulated app - set this flag as False. If you set True - the app output will come to Agent</p></li>
</ul>
</dd>
<dt class="field-even">Результат</dt>
<dd class="field-even"><p></p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="pyOpenRPA.Agent.__Agent__.OSFileBinaryDataBase64StrAppend">
<code class="sig-prename descclassname">pyOpenRPA.Agent.__Agent__.</code><code class="sig-name descname">OSFileBinaryDataBase64StrAppend</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inFilePathStr</span></em>, <em class="sig-param"><span class="n">inFileDataBase64Str</span></em>, <em class="sig-param"><span class="n">inGSettings</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Agent/__Agent__.html#OSFileBinaryDataBase64StrAppend"><span class="viewcode-link">[исходный код]</span></a><a class="headerlink" href="#pyOpenRPA.Agent.__Agent__.OSFileBinaryDataBase64StrAppend" title="Ссылка на это определение"></a></dt>
<dd><p>Create binary file by the base64 string (safe for JSON transmition)</p>
</dd></dl>
<dl class="py function">
<dt id="pyOpenRPA.Agent.__Agent__.OSFileBinaryDataBase64StrCreate">
<code class="sig-prename descclassname">pyOpenRPA.Agent.__Agent__.</code><code class="sig-name descname">OSFileBinaryDataBase64StrCreate</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inFilePathStr</span></em>, <em class="sig-param"><span class="n">inFileDataBase64Str</span></em>, <em class="sig-param"><span class="n">inGSettings</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Agent/__Agent__.html#OSFileBinaryDataBase64StrCreate"><span class="viewcode-link">[исходный код]</span></a><a class="headerlink" href="#pyOpenRPA.Agent.__Agent__.OSFileBinaryDataBase64StrCreate" title="Ссылка на это определение"></a></dt>
<dd><p>Create binary file by the base64 string (safe for JSON transmition)</p>
</dd></dl>
<dl class="py function">
<dt id="pyOpenRPA.Agent.__Agent__.OSFileBinaryDataBase64StrReceive">
<code class="sig-prename descclassname">pyOpenRPA.Agent.__Agent__.</code><code class="sig-name descname">OSFileBinaryDataBase64StrReceive</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inFilePathStr</span></em>, <em class="sig-param"><span class="n">inGSettings</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Agent/__Agent__.html#OSFileBinaryDataBase64StrReceive"><span class="viewcode-link">[исходный код]</span></a><a class="headerlink" href="#pyOpenRPA.Agent.__Agent__.OSFileBinaryDataBase64StrReceive" title="Ссылка на это определение"></a></dt>
<dd><p>Read binary file and encode in base64 to transmit (safe for JSON transmition)</p>
<dl class="field-list simple">
<dt class="field-odd">Параметры</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>inFilePathStr</strong> File path to read</p></li>
<li><p><strong>inGSettings</strong> global settings of the Agent (singleton)</p></li>
</ul>
</dd>
<dt class="field-even">Результат</dt>
<dd class="field-even"><p>File content in string base64 format (use base64.b64decode to decode data). Return None if file is not exist</p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="pyOpenRPA.Agent.__Agent__.OSFileMTimeGet">
<code class="sig-prename descclassname">pyOpenRPA.Agent.__Agent__.</code><code class="sig-name descname">OSFileMTimeGet</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inFilePathStr</span><span class="p">:</span> <span class="n">str</span></em><span class="sig-paren">)</span> &#x2192; float<a class="reference internal" href="../_modules/pyOpenRPA/Agent/__Agent__.html#OSFileMTimeGet"><span class="viewcode-link">[исходный код]</span></a><a class="headerlink" href="#pyOpenRPA.Agent.__Agent__.OSFileMTimeGet" title="Ссылка на это определение"></a></dt>
<dd><p>Read file modification time timestamp format (float)</p>
<dl class="field-list simple">
<dt class="field-odd">Параметры</dt>
<dd class="field-odd"><p><strong>inFilePathStr</strong> File path to read</p>
</dd>
<dt class="field-even">Результат</dt>
<dd class="field-even"><p>timestamp (float) Return None if file is not exist</p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="pyOpenRPA.Agent.__Agent__.OSFileTextDataStrCreate">
<code class="sig-prename descclassname">pyOpenRPA.Agent.__Agent__.</code><code class="sig-name descname">OSFileTextDataStrCreate</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inFilePathStr</span></em>, <em class="sig-param"><span class="n">inFileDataStr</span></em>, <em class="sig-param"><span class="n">inEncodingStr</span><span class="o">=</span><span class="default_value">'utf-8'</span></em>, <em class="sig-param"><span class="n">inGSettings</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Agent/__Agent__.html#OSFileTextDataStrCreate"><span class="viewcode-link">[исходный код]</span></a><a class="headerlink" href="#pyOpenRPA.Agent.__Agent__.OSFileTextDataStrCreate" title="Ссылка на это определение"></a></dt>
<dd><p>Create text file in the agent GUI session</p>
<dl class="field-list simple">
<dt class="field-odd">Параметры</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>inFilePathStr</strong> File abs path</p></li>
<li><p><strong>inFileDataStr</strong> File data text content</p></li>
<li><p><strong>inEncodingStr</strong> Write file encoding</p></li>
<li><p><strong>inGSettings</strong> global settings of the Agent (singleton)</p></li>
</ul>
</dd>
<dt class="field-even">Результат</dt>
<dd class="field-even"><p></p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="pyOpenRPA.Agent.__Agent__.OSFileTextDataStrReceive">
<code class="sig-prename descclassname">pyOpenRPA.Agent.__Agent__.</code><code class="sig-name descname">OSFileTextDataStrReceive</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inFilePathStr</span></em>, <em class="sig-param"><span class="n">inEncodingStr</span><span class="o">=</span><span class="default_value">'utf-8'</span></em>, <em class="sig-param"><span class="n">inGSettings</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Agent/__Agent__.html#OSFileTextDataStrReceive"><span class="viewcode-link">[исходный код]</span></a><a class="headerlink" href="#pyOpenRPA.Agent.__Agent__.OSFileTextDataStrReceive" title="Ссылка на это определение"></a></dt>
<dd><p>Read text file in the agent GUI session</p>
<dl class="field-list simple">
<dt class="field-odd">Параметры</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>inFilePathStr</strong> File abs path</p></li>
<li><p><strong>inEncodingStr</strong> Read file encoding. Default utf-8</p></li>
<li><p><strong>inGSettings</strong> global settings of the Agent (singleton)</p></li>
</ul>
</dd>
<dt class="field-even">Результат</dt>
<dd class="field-even"><p>File text content in string format (use base64.b64decode to decode data). Return None if file is not exist</p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="pyOpenRPA.Agent.__Agent__.ProcessWOExeUpperUserListGet">
<code class="sig-prename descclassname">pyOpenRPA.Agent.__Agent__.</code><code class="sig-name descname">ProcessWOExeUpperUserListGet</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Agent/__Agent__.html#ProcessWOExeUpperUserListGet"><span class="viewcode-link">[исходный код]</span></a><a class="headerlink" href="#pyOpenRPA.Agent.__Agent__.ProcessWOExeUpperUserListGet" title="Ссылка на это определение"></a></dt>
<dd><p>Return the process list only for the current user (where Agent is running) without .EXE in upper case. Can use in ActivityItem from Orchestrator to Agent</p>
<dl class="field-list simple">
<dt class="field-odd">Параметры</dt>
<dd class="field-odd"><p><strong>inProcessNameWOExeList</strong> </p>
</dd>
<dt class="field-even">Результат</dt>
<dd class="field-even"><p>list of the agent user process in upper case without .EXE. Example [«NOTEPAD»,»…»],</p>
</dd>
</dl>
</dd></dl>
</div>
<div class="section" id="references">
<h2>References<a class="headerlink" href="#references" title="Ссылка на этот заголовок"></a></h2>
<p><a class="reference external" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> <a class="footnote-reference brackets" href="#id3" id="id4">1</a></p>
<dl class="footnote brackets">
<dt class="label" id="id3"><span class="brackets"><a class="fn-backref" href="#id4">1</a></span></dt>
<dd><p><a class="reference external" href="http://docutils.sourceforge.net/rst.html">http://docutils.sourceforge.net/rst.html</a></p>
</dd>
</dl>
<p> .. v1.2.12 replace:: v1.2.12
.. <a href="#id1"><span class="problematic" id="id2">|author|</span></a> replace:: Ivan Maslov &lt;<a class="reference external" href="mailto:ivan&#46;maslov&#37;&#52;&#48;unicodelabs&#46;ru">ivan<span>&#46;</span>maslov<span>&#64;</span>unicodelabs<span>&#46;</span>ru</a>&gt;</p>
<p></p>
</div>
</div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="../Tools/02_Defs.html" class="btn btn-neutral float-right" title="2. Defs StopSafe" accesskey="n" rel="next">Следующая <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
<a href="../Orchestrator/06_Defs%20Managers.html" class="btn btn-neutral float-left" title="6. Defs Managers" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Предыдущая</a>
</div>
<hr/>
<div role="contentinfo">
<p>
&#169; Copyright 2022, ООО &#34;ОПЕН РПА&#34;.
</p>
</div>
Собрано при помощи <a href="https://www.sphinx-doc.org/">Sphinx</a> с использованием
<a href="https://github.com/readthedocs/sphinx_rtd_theme">темы,</a>
предоставленной <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>

@ -0,0 +1,321 @@
<!DOCTYPE html>
<html class="writer-html5" lang="ru" >
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>1. Description &mdash; документация pyOpenRPA v1.2.12 v1.2.12</title>
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="shortcut icon" href="../_static/favicon.ico"/>
<!--[if lt IE 9]>
<script src="../_static/js/html5shiv.min.js"></script>
<![endif]-->
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js"></script>
<script src="../_static/translations.js"></script>
<script type="text/javascript" src="../_static/js/theme.js"></script>
<link rel="index" title="Алфавитный указатель" href="../genindex.html" />
<link rel="search" title="Поиск" href="../search.html" />
<link rel="next" title="2. Defs" href="02_Defs.html" />
<link rel="prev" title="2. Как использовать?" href="../Studio/02_HowToUse.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../index.html" class="icon icon-home"> pyOpenRPA v1.2.12
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="Поиск в документации" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<p class="caption"><span class="caption-text">ОБЩЕЕ</span></p>
<ul>
<li class="toctree-l1"><a class="reference external" href="https://pyopenrpa.ru/wiki/guide/index">Выбрать версию</a></li>
<li class="toctree-l1"><a class="reference internal" href="../01_HowToInstall.html">1. Первый запуск</a></li>
<li class="toctree-l1"><a class="reference internal" href="../03_Copyrights_Contacts.html">2. Права &amp; Контакты</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ РОБОТ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Robot/01_Robot.html">1. Описание</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Robot/02_Defs.html">2. Функции</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Robot/03_HowToUse.html">3. Как использовать?</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Robot/04_Dependencies.html">4. Зависимости</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ СТУДИЯ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Studio/01_Studio.html">1. Описание</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Studio/02_HowToUse.html">2. Как использовать?</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ ОРКЕСТРАТОР</span></p>
<ul class="current">
<li class="toctree-l1 current"><a class="current reference internal" href="#">1. Description</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#global-settings-dict-concept">Global settings dict concept</a></li>
<li class="toctree-l2"><a class="reference internal" href="#orchestrator-how-to-configure">Orchestrator how to configure</a></li>
<li class="toctree-l2"><a class="reference internal" href="#orchestrator-architecture">Orchestrator architecture</a></li>
<li class="toctree-l2"><a class="reference internal" href="#component-processor">Component Processor</a></li>
<li class="toctree-l2"><a class="reference internal" href="#references">References</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="02_Defs.html">2. Defs</a></li>
<li class="toctree-l1"><a class="reference internal" href="03_gSettingsTemplate.html">3. gSettings Template</a></li>
<li class="toctree-l1"><a class="reference internal" href="04_HowToUse.html">4. How to use</a></li>
<li class="toctree-l1"><a class="reference internal" href="05_UAC.html">5. UAC - User Access Control</a></li>
<li class="toctree-l1"><a class="reference internal" href="06_Defs%20Managers.html">6. Defs Managers</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ АГЕНТ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Agent/02_Defs.html">2. Defs</a></li>
</ul>
<p class="caption"><span class="caption-text">ИНСТРУМЕНТЫ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Tools/02_Defs.html">2. Defs StopSafe</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../index.html">pyOpenRPA v1.2.12</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="../index.html" class="icon icon-home"></a> &raquo;</li>
<li>1. Description</li>
<li class="wy-breadcrumbs-aside">
<a href="../_sources/Orchestrator/01_Orchestrator.rst.txt" rel="nofollow"> Просмотреть исходный код страницы</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="description">
<h1>1. Description<a class="headerlink" href="#description" title="Ссылка на этот заголовок"></a></h1>
<p>pyOpenRPA Orchestrator is the executable process.</p>
<p>The features of the orchestrator is:
- Centralized/decentralized user control interface (applicable and for business users and for technical users). Web based, support desktop, tablet, phone.
- Automatized robots control (customized algorithms, robots scheduling)
- Source code mega flexibility: Light Orchestrator architecture is good for own customization</p>
<div class="section" id="global-settings-dict-concept">
<h2>Global settings dict concept<a class="headerlink" href="#global-settings-dict-concept" title="Ссылка на этот заголовок"></a></h2>
<p>pyOpenRPA project is complex tool which consist of several executable modules such as Robot, Orchestrator, Studio,</p>
<p>Because of module compexity, we use 1 init arg - inGSettings
inGSettings is a complex dictionary which has all reqired parameters for the module execution.</p>
<p>The description of the GSettings you can find in executable module details.</p>
</div>
<div class="section" id="orchestrator-how-to-configure">
<h2>Orchestrator how to configure<a class="headerlink" href="#orchestrator-how-to-configure" title="Ссылка на этот заголовок"></a></h2>
<p>To init pyOpenRPA Orchestrator instance use script:</p>
<p>from pyOpenRPA import Orchestrator # Import orchestrator main
gSettings = SettingsTemplate.Create(inModeStr=»BASIC») # Create GSettings with basic configuration
Orchestrator.Orchestrator(inGSettings=gSettings) # Call the orchestrator def</p>
<p>gSettings structure</p>
</div>
<div class="section" id="orchestrator-architecture">
<h2>Orchestrator architecture<a class="headerlink" href="#orchestrator-architecture" title="Ссылка на этот заголовок"></a></h2>
<p>Orchestrator has several source code components:
- User/robot activity consolidated queue single thread (Processor)
- User/robot activity asynchonus many threads (Processor)
- Scheduler single thread (main)
- RDP keep active many thread
- Autocleaner single thread
- GUI keep active single thread
- HTTP web server single thread (create user socket threads)
-</p>
<p>Below you can find more information about all of the component.</p>
</div>
<div class="section" id="component-processor">
<h2>Component Processor<a class="headerlink" href="#component-processor" title="Ссылка на этот заголовок"></a></h2>
<p>Sync - Append activity list to consolidated processor queue. Execution goes sequency by the activity list order</p>
<p>Async - Create New thread to execute the activity list</p>
<ul class="simple">
<li><p>Activity list</p></li>
</ul>
<p>List of the activity item</p>
<ul class="simple">
<li><p>Activity item</p></li>
</ul>
<p>Activity item is universal mechanism to execute different algorythms from any sources.
The core feature of the Activity is to call python defs with args and kwargs.
If you need to init do some activity you can write some python def, then create Activity item with current def.
ATTENTION: In some cases (such as web transmition), when you cant transmit python def as object you can use symbolic names for python defs. It is apply you to init all of you want from the web UI.</p>
<p>?Why i cant transmit python def from the web
Because the WEB space is not the Python executable space. Interaction between it spaces create by JSON protocol. So, we know than JSON apply int, float, str, bool, None, list, dict - that is all.</p>
<div class="admonition note">
<p class="admonition-title">Примечание</p>
<p>Example
{</p>
<blockquote>
<div><p>«Def»:»DefAliasTest», # def link or def alias (look gSettings[«Processor»][«AliasDefDict»])
«ArgList»:[1,2,3], # Args list
«ArgDict»:{«ttt»:1,»222»:2,»dsd»:3}, # Args dictionary
«ArgGSettings»: None # Name of GSettings attribute: str (ArgDict) or index (for ArgList)
«ArgLogger»: None # Name of GSettings attribute: str (ArgDict) or index (for ArgList)</p>
</div></blockquote>
<p>}# Pay attention! Do not left comma symbol after the end of the dict - it can be interpretated like a turple..</p>
</div>
</div>
<div class="section" id="references">
<h2>References<a class="headerlink" href="#references" title="Ссылка на этот заголовок"></a></h2>
<p><a href="#id3"><span class="problematic" id="id4">`Python-sphinx`_</span></a></p>
<p> .. v1.2.12 replace:: v1.2.12
.. <a href="#id1"><span class="problematic" id="id2">|author|</span></a> replace:: Ivan Maslov &lt;<a class="reference external" href="mailto:ivan&#46;maslov&#37;&#52;&#48;unicodelabs&#46;ru">ivan<span>&#46;</span>maslov<span>&#64;</span>unicodelabs<span>&#46;</span>ru</a>&gt;</p>
<p></p>
</div>
</div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="02_Defs.html" class="btn btn-neutral float-right" title="2. Defs" accesskey="n" rel="next">Следующая <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
<a href="../Studio/02_HowToUse.html" class="btn btn-neutral float-left" title="2. Как использовать?" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Предыдущая</a>
</div>
<hr/>
<div role="contentinfo">
<p>
&#169; Copyright 2022, ООО &#34;ОПЕН РПА&#34;.
</p>
</div>
Собрано при помощи <a href="https://www.sphinx-doc.org/">Sphinx</a> с использованием
<a href="https://github.com/readthedocs/sphinx_rtd_theme">темы,</a>
предоставленной <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>

File diff suppressed because it is too large Load Diff

@ -0,0 +1,612 @@
<!DOCTYPE html>
<html class="writer-html5" lang="ru" >
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>3. gSettings Template &mdash; документация pyOpenRPA v1.2.12 v1.2.12</title>
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="shortcut icon" href="../_static/favicon.ico"/>
<!--[if lt IE 9]>
<script src="../_static/js/html5shiv.min.js"></script>
<![endif]-->
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js"></script>
<script src="../_static/translations.js"></script>
<script type="text/javascript" src="../_static/js/theme.js"></script>
<link rel="index" title="Алфавитный указатель" href="../genindex.html" />
<link rel="search" title="Поиск" href="../search.html" />
<link rel="next" title="4. How to use" href="04_HowToUse.html" />
<link rel="prev" title="2. Defs" href="02_Defs.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../index.html" class="icon icon-home"> pyOpenRPA v1.2.12
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="Поиск в документации" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<p class="caption"><span class="caption-text">ОБЩЕЕ</span></p>
<ul>
<li class="toctree-l1"><a class="reference external" href="https://pyopenrpa.ru/wiki/guide/index">Выбрать версию</a></li>
<li class="toctree-l1"><a class="reference internal" href="../01_HowToInstall.html">1. Первый запуск</a></li>
<li class="toctree-l1"><a class="reference internal" href="../03_Copyrights_Contacts.html">2. Права &amp; Контакты</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ РОБОТ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Robot/01_Robot.html">1. Описание</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Robot/02_Defs.html">2. Функции</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Robot/03_HowToUse.html">3. Как использовать?</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Robot/04_Dependencies.html">4. Зависимости</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ СТУДИЯ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Studio/01_Studio.html">1. Описание</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Studio/02_HowToUse.html">2. Как использовать?</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ ОРКЕСТРАТОР</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="01_Orchestrator.html">1. Description</a></li>
<li class="toctree-l1"><a class="reference internal" href="02_Defs.html">2. Defs</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">3. gSettings Template</a></li>
<li class="toctree-l1"><a class="reference internal" href="04_HowToUse.html">4. How to use</a></li>
<li class="toctree-l1"><a class="reference internal" href="05_UAC.html">5. UAC - User Access Control</a></li>
<li class="toctree-l1"><a class="reference internal" href="06_Defs%20Managers.html">6. Defs Managers</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ АГЕНТ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Agent/02_Defs.html">2. Defs</a></li>
</ul>
<p class="caption"><span class="caption-text">ИНСТРУМЕНТЫ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Tools/02_Defs.html">2. Defs StopSafe</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../index.html">pyOpenRPA v1.2.12</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="../index.html" class="icon icon-home"></a> &raquo;</li>
<li>3. gSettings Template</li>
<li class="wy-breadcrumbs-aside">
<a href="../_sources/Orchestrator/03_gSettingsTemplate.rst.txt" rel="nofollow"> Просмотреть исходный код страницы</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="gsettings-template">
<h1>3. gSettings Template<a class="headerlink" href="#gsettings-template" title="Ссылка на этот заголовок"></a></h1>
<p>gSettings structure</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">os</span><span class="o">,</span> <span class="nn">logging</span><span class="o">,</span> <span class="nn">datetime</span><span class="o">,</span> <span class="nn">sys</span>
<span class="kn">import</span> <span class="nn">schedule</span> <span class="c1"># https://schedule.readthedocs.io/en/stable/examples.html</span>
<span class="c1"># Technical def - return GSettings structure with examples</span>
<span class="k">def</span> <span class="nf">__Create__</span><span class="p">():</span>
<span class="k">return</span> <span class="p">{</span>
<span class="s2">&quot;VersionStr&quot;</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span> <span class="c1"># Will be filled in orchestrator,</span>
<span class="s2">&quot;Autocleaner&quot;</span><span class="p">:</span> <span class="p">{</span>
<span class="c1"># Some gurbage is collecting in g settings. So you can configure autocleaner to periodically clear gSettings</span>
<span class="s2">&quot;IntervalSecFloat&quot;</span><span class="p">:</span> <span class="mf">3600.0</span><span class="p">,</span> <span class="c1"># Sec float to periodically clear gsettings</span>
<span class="s2">&quot;AgentActivityReturnLifetimeSecFloat&quot;</span><span class="p">:</span> <span class="mf">300.0</span> <span class="c1"># Time in seconds to life for activity result recieved from the agent</span>
<span class="p">},</span>
<span class="s2">&quot;Client&quot;</span><span class="p">:</span> <span class="p">{</span> <span class="c1"># Settings about client web orchestrator</span>
<span class="s2">&quot;Session&quot;</span><span class="p">:</span> <span class="p">{</span>
<span class="c1"># Settings about web session. Session algorythms works only for special requests (URL in ServerSettings)</span>
<span class="s2">&quot;LifetimeSecFloat&quot;</span><span class="p">:</span> <span class="mf">600.0</span><span class="p">,</span>
<span class="c1"># Client Session lifetime in seconds. after this time server will forget about this client session</span>
<span class="s2">&quot;LifetimeRequestSecFloat&quot;</span><span class="p">:</span> <span class="mf">120.0</span><span class="p">,</span> <span class="c1"># 1 client request lifetime in server in seconds</span>
<span class="s2">&quot;ControlPanelRefreshIntervalSecFloat&quot;</span><span class="p">:</span> <span class="mf">2.0</span><span class="p">,</span> <span class="c1"># Interval to refresh control panels for session,</span>
<span class="s2">&quot;TechnicalSessionGUIDCache&quot;</span><span class="p">:</span> <span class="p">{</span> <span class="c1"># TEchnical cache. Fills when web browser is requesting</span>
<span class="c1"># &quot;SessionGUIDStr&quot;:{ # Session with some GUID str. On client session guid stored in cookie &quot;SessionGUIDStr&quot;</span>
<span class="c1"># &quot;InitDatetime&quot;: None, # Datetime when session GUID was created</span>
<span class="c1"># &quot;DatasetLast&quot;: {</span>
<span class="c1"># &quot;ControlPanel&quot;: {</span>
<span class="c1"># &quot;Data&quot;: None, # Struct to check with new iterations. None if starts</span>
<span class="c1"># &quot;ReturnBool&quot;: False # flag to return, close request and return data as json</span>
<span class="c1"># }</span>
<span class="c1"># },</span>
<span class="c1"># &quot;ClientRequestHandler&quot;: None, # Last client request handler</span>
<span class="c1"># &quot;UserADStr&quot;: None, # User, who connect. None if user is not exists</span>
<span class="c1"># &quot;DomainADStr&quot;: None, # Domain of the user who connect. None if user is not exists</span>
<span class="c1"># }</span>
<span class="p">},</span>
<span class="p">},</span>
<span class="c1"># # # # # # Client... # # # # # # # #</span>
<span class="s2">&quot;DumpLogListRefreshIntervalSecFloat&quot;</span><span class="p">:</span> <span class="mf">3.0</span><span class="p">,</span> <span class="c1"># Duration between updates for the Client</span>
<span class="s2">&quot;DumpLogListCountInt&quot;</span><span class="p">:</span> <span class="mi">100</span><span class="p">,</span> <span class="c1"># Set the max row for the dump</span>
<span class="s2">&quot;DumpLogList&quot;</span><span class="p">:</span> <span class="p">[],</span> <span class="c1"># Will be filled automatically</span>
<span class="s2">&quot;DumpLogListHashStr&quot;</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span> <span class="c1"># Will be filled automatically</span>
<span class="c1"># # # # # # # # # # # # # # # # # #</span>
<span class="p">},</span>
<span class="s2">&quot;ServerDict&quot;</span><span class="p">:</span> <span class="p">{</span>
<span class="s2">&quot;ControlPanelDict&quot;</span><span class="p">:</span> <span class="p">{</span>
<span class="c1"># &quot;CPKey&quot;: &lt;Managers.ControlPanel instance&gt;</span>
<span class="p">},</span>
<span class="s2">&quot;URLIndexStr&quot;</span><span class="p">:</span><span class="s2">&quot;/&quot;</span><span class="p">,</span> <span class="c1"># The index html page for the orchestrator control panel. Default is /</span>
<span class="s2">&quot;AgentLimitLogSizeBytesInt&quot;</span><span class="p">:</span> <span class="mi">300</span><span class="p">,</span> <span class="c1"># Don&#39;t show body if json body of transmition is more than</span>
<span class="s2">&quot;ServerThread&quot;</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span> <span class="c1"># Server thread is there</span>
<span class="s2">&quot;AgentActivityLifetimeSecFloat&quot;</span><span class="p">:</span> <span class="mf">1200.0</span><span class="p">,</span> <span class="c1"># Time in seconds to life for activity for the agent</span>
<span class="s2">&quot;AgentConnectionLifetimeSecFloat&quot;</span><span class="p">:</span> <span class="mf">300.0</span><span class="p">,</span> <span class="c1"># Time in seconds to handle the open connection to the Agent</span>
<span class="s2">&quot;AgentLoopSleepSecFloat&quot;</span><span class="p">:</span> <span class="mf">2.0</span><span class="p">,</span> <span class="c1"># Time in seconds to sleep between loops when check to send some activity to the agent</span>
<span class="s2">&quot;AgentFileChunkBytesSizeInt&quot;</span><span class="p">:</span> <span class="mi">50000000</span><span class="p">,</span> <span class="c1"># size of the each chunk for the agent transmition</span>
<span class="s2">&quot;AgentFileChunkCheckIntervalSecFloat&quot;</span><span class="p">:</span> <span class="mf">0.2</span><span class="p">,</span> <span class="c1"># The interval for check last activity item was successfully sent</span>
<span class="s2">&quot;WorkingDirectoryPathStr&quot;</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span> <span class="c1"># Will be filled automatically</span>
<span class="s2">&quot;RequestTimeoutSecFloat&quot;</span><span class="p">:</span> <span class="mi">300</span><span class="p">,</span> <span class="c1"># Time to handle request in seconds,</span>
<span class="s2">&quot;ListenDict&quot;</span><span class="p">:</span> <span class="p">{</span> <span class="c1"># Prototype</span>
<span class="c1">#&quot;Default&quot;:{</span>
<span class="c1"># &quot;AddressStr&quot;:&quot;&quot;,</span>
<span class="c1"># &quot;PortInt&quot;:80,</span>
<span class="c1"># &quot;CertFilePEMPathStr&quot;:None,</span>
<span class="c1"># &quot;KeyFilePathStr&quot;:None,</span>
<span class="c1"># &quot;ServerInstance&quot;: None</span>
<span class="c1">#}</span>
<span class="p">},</span>
<span class="s2">&quot;AccessUsers&quot;</span><span class="p">:</span> <span class="p">{</span> <span class="c1"># Default - all URL is blocked</span>
<span class="s2">&quot;FlagCredentialsAsk&quot;</span><span class="p">:</span> <span class="kc">True</span><span class="p">,</span> <span class="c1"># Turn on Authentication</span>
<span class="s2">&quot;RuleDomainUserDict&quot;</span><span class="p">:</span> <span class="p">{</span>
<span class="c1"># (&quot;DOMAIN&quot;, &quot;USER&quot;): { !!!!! only in upper case !!!!</span>
<span class="c1"># &quot;MethodMatchURLBeforeList&quot;: [</span>
<span class="c1"># {</span>
<span class="c1"># &quot;Method&quot;:&quot;GET|POST&quot;,</span>
<span class="c1"># &quot;MatchType&quot;:&quot;BeginWith|Contains|Equal|EqualCase&quot;,</span>
<span class="c1"># &quot;URL&quot;:&quot;&quot;,</span>
<span class="c1"># &quot;FlagAccessDefRequestGlobalAuthenticate&quot;: None, #Return bool</span>
<span class="c1"># &quot;FlagAccess&quot;: True</span>
<span class="c1"># }</span>
<span class="c1"># ],</span>
<span class="c1"># &quot;ControlPanelKeyAllowedList&quot;:[], # If empty - all is allowed</span>
<span class="c1"># &quot;RoleHierarchyAllowedDict&quot;: {</span>
<span class="c1"># &quot;Orchestrator&quot;:{</span>
<span class="c1"># &quot;Controls&quot;: {</span>
<span class="c1"># &quot;RestartOrchestrator&quot;: {}, # Feature to restart orchestrator on virtual machine</span>
<span class="c1"># &quot;LookMachineScreenshots&quot;: {} # Feature to look machina screenshots</span>
<span class="c1"># },</span>
<span class="c1"># &quot;RDPActive&quot;: { # Robot RDP active module</span>
<span class="c1"># &quot;ListRead&quot;: {} # Access to read RDP session list</span>
<span class="c1"># }</span>
<span class="c1"># }</span>
<span class="c1"># }</span>
<span class="c1"># }</span>
<span class="p">},</span>
<span class="s2">&quot;RuleMethodMatchURLBeforeList&quot;</span><span class="p">:</span> <span class="p">[</span> <span class="c1"># General MethodMatchURL list (no domain/user)</span>
<span class="c1"># {</span>
<span class="c1"># &quot;Method&quot;:&quot;GET|POST&quot;,</span>
<span class="c1"># &quot;MatchType&quot;:&quot;BeginWith|Contains|Equal|EqualCase&quot;,</span>
<span class="c1"># &quot;URL&quot;:&quot;&quot;,</span>
<span class="c1"># &quot;FlagAccessDefRequestGlobalAuthenticate&quot;: None, #Return bool</span>
<span class="c1"># &quot;FlagAccess&quot;: True</span>
<span class="c1"># }</span>
<span class="p">],</span>
<span class="s2">&quot;AuthTokensDict&quot;</span><span class="p">:</span> <span class="p">{</span>
<span class="c1"># &quot;&lt;AuthToken&gt;&quot;:{&quot;User&quot;:&quot;&quot;, &quot;Domain&quot;:&quot;&quot;, &quot;TokenDatetime&quot;:&lt;Datetime&gt;, &quot;FlagDoNotExpire&quot;:True}</span>
<span class="p">}</span>
<span class="p">},</span>
<span class="s2">&quot;URLList&quot;</span><span class="p">:</span> <span class="p">[</span> <span class="c1"># List of available URLs with the orchestrator server</span>
<span class="c1"># {</span>
<span class="c1"># &quot;Method&quot;:&quot;GET|POST&quot;,</span>
<span class="c1"># &quot;URL&quot;: &quot;/index&quot;, #URL of the request</span>
<span class="c1"># &quot;MatchType&quot;: &quot;&quot;, #&quot;BeginWith|Contains|Equal|EqualCase&quot;,</span>
<span class="c1"># &quot;ResponseFilePath&quot;: &quot;&quot;, #Absolute or relative path</span>
<span class="c1"># &quot;ResponseFolderPath&quot;: &quot;&quot;, #Absolute or relative path</span>
<span class="c1"># &quot;ResponseContentType&quot;: &quot;&quot;, #HTTP Content-type</span>
<span class="c1"># &quot;ResponseDefRequestGlobal&quot;: None ,#Function with str result</span>
<span class="c1"># &quot;UACBool&quot;: True # True - check user access before do this URL item. None - get Server flag if ask user</span>
<span class="c1"># }</span>
<span class="c1">#{</span>
<span class="c1"># &quot;Method&quot;: &quot;GET&quot;,</span>
<span class="c1"># &quot;URL&quot;: &quot;/test/&quot;, # URL of the request</span>
<span class="c1"># &quot;MatchType&quot;: &quot;BeginWith&quot;, # &quot;BeginWith|Contains|Equal|EqualCase&quot;,</span>
<span class="c1"># # &quot;ResponseFilePath&quot;: &quot;&quot;, #Absolute or relative path</span>
<span class="c1"># &quot;ResponseFolderPath&quot;: &quot;C:\Abs\Archive\scopeSrcUL\OpenRPA\Orchestrator\Settings&quot;,</span>
<span class="c1"># # Absolute or relative path</span>
<span class="c1"># # &quot;ResponseContentType&quot;: &quot;&quot;, #HTTP Content-type</span>
<span class="c1"># # &quot;ResponseDefRequestGlobal&quot;: None #Function with str result</span>
<span class="c1"># # &quot;UACBool&quot;: True # True - check user access before do this URL item</span>
<span class="c1">#}</span>
<span class="p">],</span>
<span class="p">},</span>
<span class="s2">&quot;OrchestratorStart&quot;</span><span class="p">:</span> <span class="p">{</span>
<span class="s2">&quot;DefSettingsUpdatePathList&quot;</span><span class="p">:</span> <span class="p">[],</span>
<span class="c1"># List of the .py files which should be loaded before init the algorythms</span>
<span class="s2">&quot;ActivityList&quot;</span><span class="p">:</span> <span class="p">[]</span>
<span class="p">},</span>
<span class="s2">&quot;SchedulerDict&quot;</span><span class="p">:</span> <span class="p">{</span>
<span class="s2">&quot;Schedule&quot;</span><span class="p">:</span> <span class="n">schedule</span><span class="p">,</span> <span class="c1"># https://schedule.readthedocs.io/en/stable/examples.html</span>
<span class="s2">&quot;CheckIntervalSecFloat&quot;</span><span class="p">:</span> <span class="mf">5.0</span><span class="p">,</span> <span class="c1"># Check interval in seconds</span>
<span class="s2">&quot;ActivityTimeList&quot;</span><span class="p">:</span> <span class="p">[</span>
<span class="c1"># {</span>
<span class="c1"># &quot;TimeHH:MMStr&quot;: &quot;22:23&quot;, # Time [HH:MM] to trigger activity</span>
<span class="c1"># &quot;WeekdayList&quot;: [0, 1, 2, 3, 4, 5, 6], #List of the weekday index when activity is applicable, Default [0,1,2,3,4,5,6]</span>
<span class="c1"># &quot;ActivityList&quot;: [</span>
<span class="c1"># # {</span>
<span class="c1"># # &quot;Def&quot;:&quot;DefAliasTest&quot;, # def link or def alias (look gSettings[&quot;Processor&quot;][&quot;AliasDefDict&quot;])</span>
<span class="c1"># # &quot;ArgList&quot;:[1,2,3], # Args list</span>
<span class="c1"># # &quot;ArgDict&quot;:{&quot;ttt&quot;:1,&quot;222&quot;:2,&quot;dsd&quot;:3} # Args dictionary</span>
<span class="c1"># # &quot;ArgGSettings&quot;: # Name of GSettings attribute: str (ArgDict) or index (for ArgList)</span>
<span class="c1"># # &quot;ArgLogger&quot;: None # Name of GSettings attribute: str (ArgDict) or index (for ArgList)</span>
<span class="c1"># # &quot;GUIDStr&quot;: ..., # GUID of the activity</span>
<span class="c1"># # },</span>
<span class="c1"># ],</span>
<span class="c1"># &quot;GUID&quot;: None # Will be filled in Orchestrator automatically - is needed for detect activity completion</span>
<span class="c1"># },</span>
<span class="p">],</span>
<span class="p">},</span>
<span class="s2">&quot;ManagersProcessDict&quot;</span><span class="p">:{},</span> <span class="c1"># The key of the Process is (mAgentHostNameStr.upper(), mAgentUserNameStr.upper(), mProcessNameWOExeStr.upper())</span>
<span class="s2">&quot;ManagersGitDict&quot;</span><span class="p">:{},</span> <span class="c1"># The key of the Git instance is (mAgentHostNameStr.upper(), mAgentUserNameStr.upper(), mAbsPathUpperStr.upper())</span>
<span class="s2">&quot;ProcessorDict&quot;</span><span class="p">:</span> <span class="p">{</span> <span class="c1"># Has been changed. New general processor (one threaded) v.1.2.0</span>
<span class="s2">&quot;ActivityList&quot;</span><span class="p">:</span> <span class="p">[</span> <span class="c1"># List of the activities</span>
<span class="c1"># {</span>
<span class="c1"># &quot;Def&quot;:&quot;DefAliasTest&quot;, # def link or def alias (look gSettings[&quot;Processor&quot;][&quot;AliasDefDict&quot;])</span>
<span class="c1"># &quot;ArgList&quot;:[1,2,3], # Args list</span>
<span class="c1"># &quot;ArgDict&quot;:{&quot;ttt&quot;:1,&quot;222&quot;:2,&quot;dsd&quot;:3} # Args dictionary</span>
<span class="c1"># &quot;ArgGSettings&quot;: # Name of GSettings attribute: str (ArgDict) or index (for ArgList)</span>
<span class="c1"># &quot;ArgLogger&quot;: None # Name of GSettings attribute: str (ArgDict) or index (for ArgList)</span>
<span class="c1"># &quot;GUIDStr&quot;: ..., # GUID of the activity</span>
<span class="c1"># },</span>
<span class="p">],</span>
<span class="s2">&quot;ActivityItemNowDict&quot;</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span> <span class="c1"># Activity Item which is executing now</span>
<span class="s2">&quot;AliasDefDict&quot;</span><span class="p">:</span> <span class="p">{},</span> <span class="c1"># Storage for def with Str alias. To use it see pyOpenRPA.Orchestrator.ControlPanel</span>
<span class="s2">&quot;CheckIntervalSecFloat&quot;</span><span class="p">:</span> <span class="mf">1.0</span><span class="p">,</span> <span class="c1"># Interval for check gSettings in ProcessorDict &gt; ActivityList</span>
<span class="s2">&quot;ExecuteBool&quot;</span><span class="p">:</span> <span class="kc">True</span><span class="p">,</span> <span class="c1"># Flag to execute thread processor</span>
<span class="s2">&quot;ThreadIdInt&quot;</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span> <span class="c1"># Technical field - will be setup when processor init</span>
<span class="s2">&quot;WarningExecutionMoreThanSecFloat&quot;</span><span class="p">:</span> <span class="mf">60.0</span> <span class="c1"># Push warning if execution more than n seconds</span>
<span class="p">},</span>
<span class="c1"># # # # # # # # # # # # # #</span>
<span class="s2">&quot;RobotRDPActive&quot;</span><span class="p">:</span> <span class="p">{</span>
<span class="s2">&quot;RecoveryDict&quot;</span><span class="p">:</span> <span class="p">{</span>
<span class="s2">&quot;CatchPeriodSecFloat&quot;</span><span class="p">:</span> <span class="mi">1200</span><span class="p">,</span> <span class="c1"># Catch last 10 minutes</span>
<span class="s2">&quot;TriggerCountInt&quot;</span><span class="p">:</span> <span class="mi">10</span><span class="p">,</span> <span class="c1"># Activate trigger if for the period orch will catch the reconnect RDP n times</span>
<span class="s2">&quot;DoDict&quot;</span><span class="p">:</span> <span class="p">{</span>
<span class="s2">&quot;OSRemotePCRestart&quot;</span><span class="p">:</span> <span class="kc">True</span> <span class="c1"># Do powershell remote restart</span>
<span class="p">},</span>
<span class="s2">&quot;__StatisticsDict__&quot;</span><span class="p">:</span> <span class="p">{</span>
<span class="c1"># RDPSessionKeyStr : [time.time(), time.time()],</span>
<span class="p">}</span>
<span class="p">},</span>
<span class="s2">&quot;RDPList&quot;</span><span class="p">:</span> <span class="p">{</span>
<span class="c1"># &quot;RDPSessionKey&quot;:{</span>
<span class="c1"># &quot;Host&quot;: &quot;77.77.22.22&quot;, # Host address</span>
<span class="c1"># &quot;Port&quot;: &quot;3389&quot;, # RDP Port</span>
<span class="c1"># &quot;Login&quot;: &quot;test&quot;, # Login</span>
<span class="c1"># &quot;Password&quot;: &quot;test&quot;, # Password</span>
<span class="c1"># &quot;Screen&quot;: {</span>
<span class="c1"># &quot;Width&quot;: 1680, # Width of the remote desktop in pixels</span>
<span class="c1"># &quot;Height&quot;: 1050, # Height of the remote desktop in pixels</span>
<span class="c1"># # &quot;640x480&quot; or &quot;1680x1050&quot; or &quot;FullScreen&quot;. If Resolution not exists set full screen</span>
<span class="c1"># &quot;FlagUseAllMonitors&quot;: False, # True or False</span>
<span class="c1"># &quot;DepthBit&quot;: &quot;32&quot; # &quot;32&quot; or &quot;24&quot; or &quot;16&quot; or &quot;15&quot;</span>
<span class="c1"># },</span>
<span class="c1"># &quot;SharedDriveList&quot;: [&quot;c&quot;], # List of the Root sesion hard drives</span>
<span class="c1"># ###### Will updated in program ############</span>
<span class="c1"># &quot;SessionHex&quot;: &quot;&quot;, # Hex is created when robot runs</span>
<span class="c1"># &quot;SessionIsWindowExistBool&quot;: False, # Flag if the RDP window is exist, old name &quot;FlagSessionIsActive&quot;. Check every n seconds</span>
<span class="c1"># &quot;SessionIsWindowResponsibleBool&quot;: False, # Flag if RDP window is responsible (recieve commands). Check every nn seconds. If window is Responsible - window is Exist too</span>
<span class="c1"># &quot;SessionIsIgnoredBool&quot;: False # Flag to ignore RDP window False - dont ignore, True - ignore</span>
<span class="c1"># }</span>
<span class="p">},</span>
<span class="s2">&quot;ResponsibilityCheckIntervalSec&quot;</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
<span class="c1"># Seconds interval when Robot check the RDP responsibility. if None - dont check</span>
<span class="s2">&quot;FullScreenRDPSessionKeyStr&quot;</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
<span class="c1"># RDPSessionKeyStr of the current session which is full screened, None is no session in fullscreen</span>
<span class="s2">&quot;ActivityList&quot;</span><span class="p">:</span> <span class="p">[</span>
<span class="c1"># Technical Activity list for RobotRDPActive thread - equal to Main activity list, apply only RDP activity</span>
<span class="c1"># {</span>
<span class="c1"># &quot;DefNameStr&quot;:&quot;test&quot;, # Function name in RobotRDPActive.Processor</span>
<span class="c1"># &quot;ArgList&quot;:[1,2,3], # Args list</span>
<span class="c1"># &quot;ArgDict&quot;:{&quot;ttt&quot;:1,&quot;222&quot;:2,&quot;dsd&quot;:3} # Args dictionary</span>
<span class="c1"># },</span>
<span class="c1"># {</span>
<span class="c1"># &quot;DefNameStr&quot;: &quot;RDPSessionConnect&quot;, # Function name in RobotRDPActive.Processor</span>
<span class="c1"># &quot;ArgList&quot;: [], # Args list</span>
<span class="c1"># &quot;ArgDict&quot;: {&quot;inRDPSessionKeyStr&quot;: &quot;TestRDP&quot;, &quot;inHostStr&quot;: &quot;77.44.33.22&quot;, &quot;inPortStr&quot;: &quot;3389&quot;,</span>
<span class="c1"># &quot;inLoginStr&quot;: &quot;login&quot;, &quot;inPasswordStr&quot;: &quot;pass&quot;} # Args dictionary</span>
<span class="c1"># },</span>
<span class="c1"># {</span>
<span class="c1"># &quot;DefNameStr&quot;: &quot;RDPSessionDisconnect&quot;, # Disconnect the RDP session without logoff. Function name in RobotRDPActive.Processor</span>
<span class="c1"># &quot;ArgList&quot;: [], # Args list</span>
<span class="c1"># &quot;ArgDict&quot;: {&quot;inRDPSessionKeyStr&quot;: &quot;TestRDP&quot;}</span>
<span class="c1"># },</span>
<span class="c1"># {</span>
<span class="c1"># &quot;DefNameStr&quot;: &quot;RDPSessionReconnect&quot;, # Disconnect the RDP session without logoff. Function name in RobotRDPActive.Processor</span>
<span class="c1"># &quot;ArgList&quot;: [], # Args list</span>
<span class="c1"># &quot;ArgDict&quot;: {&quot;inRDPSessionKeyStr&quot;: &quot;TestRDP&quot;}</span>
<span class="c1"># }</span>
<span class="p">]</span>
<span class="p">},</span>
<span class="c1"># # # # # # # # # # # # # #</span>
<span class="s2">&quot;FileManager&quot;</span><span class="p">:</span> <span class="p">{</span>
<span class="s2">&quot;FileURLFilePathDict_help&quot;</span><span class="p">:</span> <span class="s2">&quot;https://localhost:8081/filemanager/&lt;file URL&gt;. All FileURL s must be set in lowercase&quot;</span><span class="p">,</span>
<span class="s2">&quot;FileURLFilePathDict&quot;</span><span class="p">:</span> <span class="p">{</span>
<span class="c1">#&quot;r01/report.xlsx&quot;: &quot;C:\\RPA\\R01_IntegrationOrderOut\\Data\\Reestr_otgruzok.xlsx&quot;</span>
<span class="p">}</span>
<span class="p">},</span>
<span class="s2">&quot;Logger&quot;</span><span class="p">:</span> <span class="n">logging</span><span class="o">.</span><span class="n">getLogger</span><span class="p">(</span><span class="s2">&quot;Orchestrator&quot;</span><span class="p">),</span>
<span class="s2">&quot;StorageDict&quot;</span><span class="p">:</span> <span class="p">{</span>
<span class="s2">&quot;Robot_R01_help&quot;</span><span class="p">:</span> <span class="s2">&quot;Robot data storage in orchestrator env&quot;</span><span class="p">,</span>
<span class="s2">&quot;Robot_R01&quot;</span><span class="p">:</span> <span class="p">{},</span>
<span class="s2">&quot;R01_OrchestratorToRobot&quot;</span><span class="p">:</span> <span class="p">{</span><span class="s2">&quot;Test2&quot;</span><span class="p">:</span> <span class="s2">&quot;Test2&quot;</span><span class="p">}</span>
<span class="p">},</span>
<span class="s2">&quot;AgentDict&quot;</span><span class="p">:</span> <span class="p">{</span> <span class="c1"># Will be filled when program runs</span>
<span class="c1">#(&quot;HostNameUpperStr&quot;, &quot;UserUpperStr&quot;): { &quot;IsListenBool&quot;: True, &quot;QueueList&quot;: [] }</span>
<span class="p">},</span>
<span class="s2">&quot;AgentActivityReturnDict&quot;</span><span class="p">:</span> <span class="p">{</span> <span class="c1"># Will be filled when programs run - fill result of the Activity execution on the agent</span>
<span class="c1"># Key - Activity Item GUID str, Value {&quot;Return&quot;: ..., &quot;ReturnedByDatetime&quot;: datetime.datetime}</span>
<span class="c1"># If key exists - def has been completed</span>
<span class="p">}</span>
<span class="c1"># &quot;HiddenIsOrchestratorInitialized&quot; - will be inited when orchestrator will be initialized</span>
<span class="p">}</span>
<span class="c1"># Create full configuration for</span>
<span class="k">def</span> <span class="nf">__AgentDictItemCreate__</span><span class="p">():</span>
<span class="k">return</span> <span class="p">{</span><span class="s2">&quot;IsListenBool&quot;</span><span class="p">:</span><span class="kc">False</span><span class="p">,</span> <span class="s2">&quot;ConnectionCountInt&quot;</span><span class="p">:</span><span class="mi">0</span><span class="p">,</span> <span class="s2">&quot;ConnectionFirstQueueItemCountInt&quot;</span><span class="p">:</span><span class="mi">0</span><span class="p">,</span> <span class="s2">&quot;ActivityList&quot;</span><span class="p">:[]}</span>
<span class="c1"># Create full configuration for AgentActivityReturnDict</span>
<span class="k">def</span> <span class="nf">__AgentActivityReturnDictItemCreate__</span><span class="p">(</span><span class="n">inReturn</span><span class="p">):</span>
<span class="k">return</span> <span class="p">{</span><span class="s2">&quot;Return&quot;</span><span class="p">:</span> <span class="n">inReturn</span><span class="p">,</span> <span class="s2">&quot;ReturnedByDatetime&quot;</span><span class="p">:</span> <span class="n">datetime</span><span class="o">.</span><span class="n">datetime</span><span class="o">.</span><span class="n">now</span><span class="p">()}</span>
<span class="c1"># Create full configuration for</span>
<span class="k">def</span> <span class="nf">__UACClientAdminCreate__</span><span class="p">():</span>
<span class="n">lResultDict</span> <span class="o">=</span> <span class="p">{</span>
<span class="s2">&quot;pyOpenRPADict&quot;</span><span class="p">:{</span>
<span class="s2">&quot;CPKeyDict&quot;</span><span class="p">:{</span> <span class="c1"># Empty dict - all access</span>
<span class="c1"># &quot;CPKeyStr&quot;{</span>
<span class="c1"># }</span>
<span class="p">},</span>
<span class="s2">&quot;RDPKeyDict&quot;</span><span class="p">:{</span> <span class="c1"># Empty dict - all access</span>
<span class="c1">#&quot;RDPKeyStr&quot;{</span>
<span class="c1"># &quot;FullscreenBool&quot;: True,</span>
<span class="c1"># &quot;IgnoreBool&quot;:True,</span>
<span class="c1"># &quot;ReconnectBool&quot;: True</span>
<span class="c1"># &quot;NothingBool&quot;: True # USe option if you dont want to give some access to the RDP controls</span>
<span class="c1"># }</span>
<span class="p">},</span>
<span class="s2">&quot;AgentKeyDict&quot;</span><span class="p">:</span> <span class="p">{</span> <span class="c1"># Empty dict - all access</span>
<span class="c1"># &quot;AgentKeyStr&quot;{</span>
<span class="c1"># }</span>
<span class="p">},</span>
<span class="s2">&quot;AdminDict&quot;</span><span class="p">:{</span> <span class="c1"># Empty dict - all access</span>
<span class="s2">&quot;LogViewerBool&quot;</span><span class="p">:</span><span class="kc">True</span><span class="p">,</span> <span class="c1"># Show log viewer on the web page</span>
<span class="s2">&quot;CMDInputBool&quot;</span><span class="p">:</span><span class="kc">True</span><span class="p">,</span> <span class="c1"># Execute CMD on the server side and result to the logs</span>
<span class="s2">&quot;ScreenshotViewerBool&quot;</span><span class="p">:</span><span class="kc">True</span><span class="p">,</span> <span class="c1"># Show button to look screenshots</span>
<span class="s2">&quot;RestartOrchestratorBool&quot;</span><span class="p">:</span> <span class="kc">True</span><span class="p">,</span> <span class="c1"># Restart orchestrator activity</span>
<span class="s2">&quot;RestartOrchestratorGITPullBool&quot;</span><span class="p">:</span> <span class="kc">True</span><span class="p">,</span> <span class="c1"># Turn off (RDP remember) orc + git pull + Turn on (rdp remember)</span>
<span class="s2">&quot;RestartPCBool&quot;</span><span class="p">:</span> <span class="kc">True</span><span class="p">,</span> <span class="c1"># Send CMD to restart pc</span>
<span class="s2">&quot;NothingBool&quot;</span><span class="p">:</span><span class="kc">True</span><span class="p">,</span> <span class="c1"># USe option if you dont want to give some access to the RDP controls</span>
<span class="s2">&quot;Debugging&quot;</span><span class="p">:</span><span class="kc">True</span> <span class="c1"># Debugging tool</span>
<span class="p">},</span>
<span class="s2">&quot;ActivityDict&quot;</span><span class="p">:</span> <span class="p">{</span> <span class="c1"># Empty dict - all access</span>
<span class="s2">&quot;ActivityListExecuteBool&quot;</span><span class="p">:</span> <span class="kc">True</span><span class="p">,</span> <span class="c1"># Execute activity at the current thread</span>
<span class="s2">&quot;ActivityListAppendProcessorQueueBool&quot;</span><span class="p">:</span> <span class="kc">True</span> <span class="c1"># Append activity to the processor queue</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="k">return</span> <span class="n">lResultDict</span>
<span class="c1"># Init the log dump to WEB</span>
<span class="c1"># import pdb; pdb.set_trace()</span>
<span class="c1">############################################</span>
<span class="k">def</span> <span class="nf">LoggerDumpLogHandlerAdd</span><span class="p">(</span><span class="n">inLogger</span><span class="p">,</span> <span class="n">inGSettingsClientDict</span><span class="p">):</span>
<span class="n">lL</span> <span class="o">=</span> <span class="n">inLogger</span>
<span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">lL</span><span class="o">.</span><span class="n">handlers</span><span class="p">)</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span>
<span class="n">mRobotLoggerFormatter</span> <span class="o">=</span> <span class="n">logging</span><span class="o">.</span><span class="n">Formatter</span><span class="p">(</span><span class="s1">&#39;</span><span class="si">%(asctime)s</span><span class="s1"> - </span><span class="si">%(levelname)s</span><span class="s1"> - </span><span class="si">%(message)s</span><span class="s1">&#39;</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">mRobotLoggerFormatter</span> <span class="o">=</span> <span class="n">lL</span><span class="o">.</span><span class="n">handlers</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">formatter</span>
<span class="n">mHandlerDumpLogList</span> <span class="o">=</span> <span class="n">LoggerHandlerDumpLogList</span><span class="o">.</span><span class="n">LoggerHandlerDumpLogList</span><span class="p">(</span><span class="n">inDict</span><span class="o">=</span><span class="n">inGSettingsClientDict</span><span class="p">,</span>
<span class="n">inKeyStr</span><span class="o">=</span><span class="s2">&quot;DumpLogList&quot;</span><span class="p">,</span> <span class="n">inHashKeyStr</span><span class="o">=</span><span class="s2">&quot;DumpLogListHashStr&quot;</span><span class="p">,</span> <span class="n">inRowCountInt</span><span class="o">=</span><span class="n">inGSettingsClientDict</span><span class="p">[</span>
<span class="s2">&quot;DumpLogListCountInt&quot;</span><span class="p">])</span>
<span class="n">mHandlerDumpLogList</span><span class="o">.</span><span class="n">setFormatter</span><span class="p">(</span><span class="n">mRobotLoggerFormatter</span><span class="p">)</span>
<span class="n">lL</span><span class="o">.</span><span class="n">addHandler</span><span class="p">(</span><span class="n">mHandlerDumpLogList</span><span class="p">)</span>
<span class="c1"># inModeStr:</span>
<span class="c1"># &quot;BASIC&quot; - create standart configuration</span>
<span class="kn">from</span> <span class="nn">pyOpenRPA.Orchestrator.Utils</span> <span class="kn">import</span> <span class="n">LoggerHandlerDumpLogList</span>
<span class="k">def</span> <span class="nf">Create</span><span class="p">(</span><span class="n">inModeStr</span><span class="o">=</span><span class="s2">&quot;BASIC&quot;</span><span class="p">,</span> <span class="n">inLoggerLevel</span> <span class="o">=</span> <span class="kc">None</span><span class="p">):</span>
<span class="k">if</span> <span class="n">inModeStr</span><span class="o">==</span><span class="s2">&quot;BASIC&quot;</span><span class="p">:</span>
<span class="n">lResult</span> <span class="o">=</span> <span class="n">__Create__</span><span class="p">()</span> <span class="c1"># Create settings</span>
<span class="c1"># Создать файл логирования</span>
<span class="c1"># add filemode=&quot;w&quot; to overwrite</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">exists</span><span class="p">(</span><span class="s2">&quot;Reports&quot;</span><span class="p">):</span>
<span class="n">os</span><span class="o">.</span><span class="n">makedirs</span><span class="p">(</span><span class="s2">&quot;Reports&quot;</span><span class="p">)</span>
<span class="c1">##########################</span>
<span class="c1"># Подготовка логгера Robot</span>
<span class="c1">#########################</span>
<span class="k">if</span> <span class="n">inLoggerLevel</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span> <span class="n">inLoggerLevel</span><span class="o">=</span><span class="n">logging</span><span class="o">.</span><span class="n">INFO</span>
<span class="n">lL</span> <span class="o">=</span> <span class="n">lResult</span><span class="p">[</span><span class="s2">&quot;Logger&quot;</span><span class="p">]</span>
<span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">lL</span><span class="o">.</span><span class="n">handlers</span><span class="p">)</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span>
<span class="n">lL</span><span class="o">.</span><span class="n">setLevel</span><span class="p">(</span><span class="n">logging</span><span class="o">.</span><span class="n">INFO</span><span class="p">)</span>
<span class="c1"># create the logging file handler</span>
<span class="n">mRobotLoggerFH</span> <span class="o">=</span> <span class="n">logging</span><span class="o">.</span><span class="n">FileHandler</span><span class="p">(</span>
<span class="s2">&quot;Reports</span><span class="se">\\</span><span class="s2">&quot;</span> <span class="o">+</span> <span class="n">datetime</span><span class="o">.</span><span class="n">datetime</span><span class="o">.</span><span class="n">now</span><span class="p">()</span><span class="o">.</span><span class="n">strftime</span><span class="p">(</span><span class="s2">&quot;%Y_%m_</span><span class="si">%d</span><span class="s2">&quot;</span><span class="p">)</span> <span class="o">+</span> <span class="s2">&quot;.log&quot;</span><span class="p">)</span>
<span class="n">mRobotLoggerFormatter</span> <span class="o">=</span> <span class="n">logging</span><span class="o">.</span><span class="n">Formatter</span><span class="p">(</span><span class="s1">&#39;</span><span class="si">%(asctime)s</span><span class="s1"> - </span><span class="si">%(levelname)s</span><span class="s1"> - </span><span class="si">%(message)s</span><span class="s1">&#39;</span><span class="p">)</span>
<span class="n">mRobotLoggerFH</span><span class="o">.</span><span class="n">setFormatter</span><span class="p">(</span><span class="n">mRobotLoggerFormatter</span><span class="p">)</span>
<span class="c1"># add handler to logger object</span>
<span class="n">lL</span><span class="o">.</span><span class="n">addHandler</span><span class="p">(</span><span class="n">mRobotLoggerFH</span><span class="p">)</span>
<span class="c1">####################Add console output</span>
<span class="n">handler</span> <span class="o">=</span> <span class="n">logging</span><span class="o">.</span><span class="n">StreamHandler</span><span class="p">(</span><span class="n">sys</span><span class="o">.</span><span class="n">stdout</span><span class="p">)</span>
<span class="n">handler</span><span class="o">.</span><span class="n">setFormatter</span><span class="p">(</span><span class="n">mRobotLoggerFormatter</span><span class="p">)</span>
<span class="n">lL</span><span class="o">.</span><span class="n">addHandler</span><span class="p">(</span><span class="n">handler</span><span class="p">)</span>
<span class="c1">############################################</span>
<span class="n">LoggerDumpLogHandlerAdd</span><span class="p">(</span><span class="n">inLogger</span><span class="o">=</span><span class="n">lL</span><span class="p">,</span> <span class="n">inGSettingsClientDict</span><span class="o">=</span><span class="n">lResult</span><span class="p">[</span><span class="s2">&quot;Client&quot;</span><span class="p">])</span>
<span class="c1">#mHandlerDumpLogList = LoggerHandlerDumpLogList.LoggerHandlerDumpLogList(inDict=lResult[&quot;Client&quot;],</span>
<span class="c1"># inKeyStr=&quot;DumpLogList&quot;,</span>
<span class="c1"># inHashKeyStr=&quot;DumpLogListHashStr&quot;,</span>
<span class="c1"># inRowCountInt=lResult[&quot;Client&quot;][</span>
<span class="c1"># &quot;DumpLogListCountInt&quot;])</span>
<span class="c1">#mHandlerDumpLogList.setFormatter(mRobotLoggerFormatter)</span>
<span class="c1">#mRobotLogger.addHandler(mHandlerDumpLogList)</span>
<span class="k">else</span><span class="p">:</span>
<span class="k">if</span> <span class="n">lL</span><span class="p">:</span> <span class="n">lL</span><span class="o">.</span><span class="n">warning</span><span class="p">(</span><span class="s2">&quot;Pay attention! Your code has been call SettingsTemplate.Create - since pyOpenRPA v1.2.7 GSettings is creating automatically&quot;</span><span class="p">)</span>
<span class="k">return</span> <span class="n">lResult</span> <span class="c1"># return the result dict</span>
</pre></div>
</div>
<p> .. v1.2.12 replace:: v1.2.12
.. <a href="#id1"><span class="problematic" id="id2">|author|</span></a> replace:: Ivan Maslov &lt;<a class="reference external" href="mailto:ivan&#46;maslov&#37;&#52;&#48;unicodelabs&#46;ru">ivan<span>&#46;</span>maslov<span>&#64;</span>unicodelabs<span>&#46;</span>ru</a>&gt;</p>
<p></p>
</div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="04_HowToUse.html" class="btn btn-neutral float-right" title="4. How to use" accesskey="n" rel="next">Следующая <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
<a href="02_Defs.html" class="btn btn-neutral float-left" title="2. Defs" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Предыдущая</a>
</div>
<hr/>
<div role="contentinfo">
<p>
&#169; Copyright 2022, ООО &#34;ОПЕН РПА&#34;.
</p>
</div>
Собрано при помощи <a href="https://www.sphinx-doc.org/">Sphinx</a> с использованием
<a href="https://github.com/readthedocs/sphinx_rtd_theme">темы,</a>
предоставленной <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>

@ -0,0 +1,295 @@
<!DOCTYPE html>
<html class="writer-html5" lang="ru" >
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>4. How to use &mdash; документация pyOpenRPA v1.2.12 v1.2.12</title>
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="shortcut icon" href="../_static/favicon.ico"/>
<!--[if lt IE 9]>
<script src="../_static/js/html5shiv.min.js"></script>
<![endif]-->
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js"></script>
<script src="../_static/translations.js"></script>
<script type="text/javascript" src="../_static/js/theme.js"></script>
<link rel="index" title="Алфавитный указатель" href="../genindex.html" />
<link rel="search" title="Поиск" href="../search.html" />
<link rel="next" title="5. UAC - User Access Control" href="05_UAC.html" />
<link rel="prev" title="3. gSettings Template" href="03_gSettingsTemplate.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../index.html" class="icon icon-home"> pyOpenRPA v1.2.12
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="Поиск в документации" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<p class="caption"><span class="caption-text">ОБЩЕЕ</span></p>
<ul>
<li class="toctree-l1"><a class="reference external" href="https://pyopenrpa.ru/wiki/guide/index">Выбрать версию</a></li>
<li class="toctree-l1"><a class="reference internal" href="../01_HowToInstall.html">1. Первый запуск</a></li>
<li class="toctree-l1"><a class="reference internal" href="../03_Copyrights_Contacts.html">2. Права &amp; Контакты</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ РОБОТ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Robot/01_Robot.html">1. Описание</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Robot/02_Defs.html">2. Функции</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Robot/03_HowToUse.html">3. Как использовать?</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Robot/04_Dependencies.html">4. Зависимости</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ СТУДИЯ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Studio/01_Studio.html">1. Описание</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Studio/02_HowToUse.html">2. Как использовать?</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ ОРКЕСТРАТОР</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="01_Orchestrator.html">1. Description</a></li>
<li class="toctree-l1"><a class="reference internal" href="02_Defs.html">2. Defs</a></li>
<li class="toctree-l1"><a class="reference internal" href="03_gSettingsTemplate.html">3. gSettings Template</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">4. How to use</a></li>
<li class="toctree-l1"><a class="reference internal" href="05_UAC.html">5. UAC - User Access Control</a></li>
<li class="toctree-l1"><a class="reference internal" href="06_Defs%20Managers.html">6. Defs Managers</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ АГЕНТ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Agent/02_Defs.html">2. Defs</a></li>
</ul>
<p class="caption"><span class="caption-text">ИНСТРУМЕНТЫ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Tools/02_Defs.html">2. Defs StopSafe</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../index.html">pyOpenRPA v1.2.12</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="../index.html" class="icon icon-home"></a> &raquo;</li>
<li>4. How to use</li>
<li class="wy-breadcrumbs-aside">
<a href="../_sources/Orchestrator/04_HowToUse.rst.txt" rel="nofollow"> Просмотреть исходный код страницы</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="how-to-use">
<h1>4. How to use<a class="headerlink" href="#how-to-use" title="Ссылка на этот заголовок"></a></h1>
<p>You need to run orchestrator process?</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="k">if</span> <span class="vm">__name__</span> <span class="o">==</span> <span class="s2">&quot;__main__&quot;</span><span class="p">:</span> <span class="c1"># New init way - allow run as module -m PyOpenRPA.Orchestrator</span>
<span class="kn">from</span> <span class="nn">pyOpenRPA</span> <span class="kn">import</span> <span class="n">Orchestrator</span> <span class="c1"># Import orchestrator main</span>
<span class="n">gSettings</span> <span class="o">=</span> <span class="n">SettingsTemplate</span><span class="o">.</span><span class="n">Create</span><span class="p">(</span><span class="n">inModeStr</span><span class="o">=</span><span class="s2">&quot;BASIC&quot;</span><span class="p">)</span> <span class="c1"># Create GSettings with basic configuration - no more config is available from the box - you can create own</span>
<span class="c1"># Call the orchestrator main def</span>
<span class="n">Orchestrator</span><span class="o">.</span><span class="n">Orchestrator</span><span class="p">(</span><span class="n">inGSettings</span><span class="o">=</span><span class="n">gSettings</span><span class="p">)</span>
</pre></div>
</div>
<p>If you need more configurations - so you can see here:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">psutil</span><span class="o">,</span> <span class="nn">datetime</span><span class="o">,</span> <span class="nn">logging</span><span class="o">,</span> <span class="nn">os</span><span class="o">,</span> <span class="nn">sys</span>
<span class="c1"># Config settings</span>
<span class="n">lPyOpenRPASourceFolderPathStr</span> <span class="o">=</span> <span class="sa">r</span><span class="s2">&quot;..\Sources&quot;</span> <span class="c1"># Path for test pyOpenRPA package</span>
<span class="c1"># Operations</span>
<span class="k">if</span> <span class="n">lPyOpenRPASourceFolderPathStr</span> <span class="o">!=</span> <span class="s2">&quot;&quot;</span><span class="p">:</span> <span class="n">sys</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">insert</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">abspath</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">lPyOpenRPASourceFolderPathStr</span><span class="p">)))</span> <span class="c1"># Path for test pyOpenRPA package</span>
<span class="c1"># Start import after config the pyOpenRPA folder</span>
<span class="kn">from</span> <span class="nn">pyOpenRPA.Orchestrator</span> <span class="kn">import</span> <span class="n">SettingsTemplate</span> <span class="c1"># Import functionallity</span>
<span class="kn">from</span> <span class="nn">pyOpenRPA</span> <span class="kn">import</span> <span class="n">Orchestrator</span> <span class="c1"># Import orchestrator main</span>
<span class="c1">#Run as administrator</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">Orchestrator</span><span class="o">.</span><span class="n">OrchestratorIsAdmin</span><span class="p">():</span>
<span class="n">Orchestrator</span><span class="o">.</span><span class="n">OrchestratorRerunAsAdmin</span><span class="p">()</span>
<span class="nb">print</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;Orchestrator will be run as administrator!&quot;</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">gSettings</span> <span class="o">=</span> <span class="n">Orchestrator</span><span class="o">.</span><span class="n">GSettingsGet</span><span class="p">()</span>
<span class="c1">#gSettings = SettingsTemplate.Create(inModeStr=&quot;BASIC&quot;) # Create GSettings with basic configuration - no more config is available from the box - you can create own</span>
<span class="n">Orchestrator</span><span class="o">.</span><span class="n">OrchestratorLoggerGet</span><span class="p">()</span><span class="o">.</span><span class="n">setLevel</span><span class="p">(</span><span class="n">logging</span><span class="o">.</span><span class="n">INFO</span><span class="p">)</span>
<span class="c1"># TEST Add User ND - Add Login ND to superuser of the Orchestrator</span>
<span class="n">lUACClientDict</span> <span class="o">=</span> <span class="n">SettingsTemplate</span><span class="o">.</span><span class="n">__UACClientAdminCreate__</span><span class="p">()</span>
<span class="n">Orchestrator</span><span class="o">.</span><span class="n">UACUpdate</span><span class="p">(</span><span class="n">inGSettings</span><span class="o">=</span><span class="n">gSettings</span><span class="p">,</span> <span class="n">inADLoginStr</span><span class="o">=</span><span class="s2">&quot;ND&quot;</span><span class="p">,</span> <span class="n">inADStr</span><span class="o">=</span><span class="s2">&quot;&quot;</span><span class="p">,</span> <span class="n">inADIsDefaultBool</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> <span class="n">inURLList</span><span class="o">=</span><span class="p">[],</span> <span class="n">inRoleHierarchyAllowedDict</span><span class="o">=</span><span class="n">lUACClientDict</span><span class="p">)</span>
<span class="c1"># TEST Add User IMaslov - Add Login IMaslov to superuser of the Orchestrator</span>
<span class="n">Orchestrator</span><span class="o">.</span><span class="n">UACUpdate</span><span class="p">(</span><span class="n">inGSettings</span><span class="o">=</span><span class="n">gSettings</span><span class="p">,</span> <span class="n">inADLoginStr</span><span class="o">=</span><span class="s2">&quot;IMaslov&quot;</span><span class="p">,</span> <span class="n">inADStr</span><span class="o">=</span><span class="s2">&quot;&quot;</span><span class="p">,</span> <span class="n">inADIsDefaultBool</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> <span class="n">inURLList</span><span class="o">=</span><span class="p">[])</span>
<span class="c1"># TEST Add Supertoken for the all access between robots</span>
<span class="n">Orchestrator</span><span class="o">.</span><span class="n">UACSuperTokenUpdate</span><span class="p">(</span><span class="n">inGSettings</span><span class="o">=</span><span class="n">gSettings</span><span class="p">,</span> <span class="n">inSuperTokenStr</span><span class="o">=</span><span class="s2">&quot;1992-04-03-0643-ru-b4ff-openrpa52zzz&quot;</span><span class="p">)</span>
<span class="c1"># Add first interface!</span>
<span class="n">Orchestrator</span><span class="o">.</span><span class="n">WebListenCreate</span><span class="p">(</span><span class="n">inGSettings</span><span class="o">=</span><span class="n">gSettings</span><span class="p">)</span>
<span class="c1"># Restore DUMP</span>
<span class="n">Orchestrator</span><span class="o">.</span><span class="n">OrchestratorSessionRestore</span><span class="p">(</span><span class="n">inGSettings</span><span class="o">=</span><span class="n">gSettings</span><span class="p">)</span>
<span class="c1"># Autoinit control panels starts with CP_</span>
<span class="n">lPyModules</span> <span class="o">=</span> <span class="n">Orchestrator</span><span class="o">.</span><span class="n">OrchestratorPySearchInit</span><span class="p">(</span><span class="n">inGlobPatternStr</span><span class="o">=</span><span class="s2">&quot;ControlPanel</span><span class="se">\\</span><span class="s2">CP_*.py&quot;</span><span class="p">,</span> <span class="n">inDefStr</span><span class="o">=</span><span class="s2">&quot;SettingsUpdate&quot;</span><span class="p">,</span> <span class="n">inDefArgNameGSettingsStr</span><span class="o">=</span><span class="s2">&quot;inGSettings&quot;</span><span class="p">,</span> <span class="n">inAsyncInitBool</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
<span class="c1"># Call the orchestrator def</span>
<span class="n">Orchestrator</span><span class="o">.</span><span class="n">Orchestrator</span><span class="p">(</span><span class="n">inGSettings</span><span class="o">=</span><span class="n">gSettings</span><span class="p">,</span> <span class="n">inDumpRestoreBool</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
</pre></div>
</div>
<p> .. v1.2.12 replace:: v1.2.12
.. <a href="#id1"><span class="problematic" id="id2">|author|</span></a> replace:: Ivan Maslov &lt;<a class="reference external" href="mailto:ivan&#46;maslov&#37;&#52;&#48;unicodelabs&#46;ru">ivan<span>&#46;</span>maslov<span>&#64;</span>unicodelabs<span>&#46;</span>ru</a>&gt;</p>
<p></p>
</div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="05_UAC.html" class="btn btn-neutral float-right" title="5. UAC - User Access Control" accesskey="n" rel="next">Следующая <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
<a href="03_gSettingsTemplate.html" class="btn btn-neutral float-left" title="3. gSettings Template" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Предыдущая</a>
</div>
<hr/>
<div role="contentinfo">
<p>
&#169; Copyright 2022, ООО &#34;ОПЕН РПА&#34;.
</p>
</div>
Собрано при помощи <a href="https://www.sphinx-doc.org/">Sphinx</a> с использованием
<a href="https://github.com/readthedocs/sphinx_rtd_theme">темы,</a>
предоставленной <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>

@ -0,0 +1,296 @@
<!DOCTYPE html>
<html class="writer-html5" lang="ru" >
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>5. UAC - User Access Control &mdash; документация pyOpenRPA v1.2.12 v1.2.12</title>
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="shortcut icon" href="../_static/favicon.ico"/>
<!--[if lt IE 9]>
<script src="../_static/js/html5shiv.min.js"></script>
<![endif]-->
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js"></script>
<script src="../_static/translations.js"></script>
<script type="text/javascript" src="../_static/js/theme.js"></script>
<link rel="index" title="Алфавитный указатель" href="../genindex.html" />
<link rel="search" title="Поиск" href="../search.html" />
<link rel="next" title="6. Defs Managers" href="06_Defs%20Managers.html" />
<link rel="prev" title="4. How to use" href="04_HowToUse.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../index.html" class="icon icon-home"> pyOpenRPA v1.2.12
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="Поиск в документации" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<p class="caption"><span class="caption-text">ОБЩЕЕ</span></p>
<ul>
<li class="toctree-l1"><a class="reference external" href="https://pyopenrpa.ru/wiki/guide/index">Выбрать версию</a></li>
<li class="toctree-l1"><a class="reference internal" href="../01_HowToInstall.html">1. Первый запуск</a></li>
<li class="toctree-l1"><a class="reference internal" href="../03_Copyrights_Contacts.html">2. Права &amp; Контакты</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ РОБОТ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Robot/01_Robot.html">1. Описание</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Robot/02_Defs.html">2. Функции</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Robot/03_HowToUse.html">3. Как использовать?</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Robot/04_Dependencies.html">4. Зависимости</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ СТУДИЯ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Studio/01_Studio.html">1. Описание</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Studio/02_HowToUse.html">2. Как использовать?</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ ОРКЕСТРАТОР</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="01_Orchestrator.html">1. Description</a></li>
<li class="toctree-l1"><a class="reference internal" href="02_Defs.html">2. Defs</a></li>
<li class="toctree-l1"><a class="reference internal" href="03_gSettingsTemplate.html">3. gSettings Template</a></li>
<li class="toctree-l1"><a class="reference internal" href="04_HowToUse.html">4. How to use</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">5. UAC - User Access Control</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#about">About</a></li>
<li class="toctree-l2"><a class="reference internal" href="#uac-dict-for-orchestrator-web-ui-rights">UAC Dict for Orchestrator WEB UI rights</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="06_Defs%20Managers.html">6. Defs Managers</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ АГЕНТ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Agent/02_Defs.html">2. Defs</a></li>
</ul>
<p class="caption"><span class="caption-text">ИНСТРУМЕНТЫ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Tools/02_Defs.html">2. Defs StopSafe</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../index.html">pyOpenRPA v1.2.12</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="../index.html" class="icon icon-home"></a> &raquo;</li>
<li>5. UAC - User Access Control</li>
<li class="wy-breadcrumbs-aside">
<a href="../_sources/Orchestrator/05_UAC.rst.txt" rel="nofollow"> Просмотреть исходный код страницы</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="uac-user-access-control">
<h1>5. UAC - User Access Control<a class="headerlink" href="#uac-user-access-control" title="Ссылка на этот заголовок"></a></h1>
<div class="section" id="about">
<h2>About<a class="headerlink" href="#about" title="Ссылка на этот заголовок"></a></h2>
<p>Orchestrator has mega feature - user access control (UAC). This feature allow you to manipulate access of the web UI for the all users!</p>
<p>If you need to give admin rights - you dont customize UAC dict.</p>
<p>If you need to give some little rights for user only for one robot in orchestrator web panel - you can set the following properties in UAC dict.</p>
<p>To work with UAC you can use defs <code class="docutils literal notranslate"><span class="pre">Orchestrator.UAC</span></code> group.</p>
<p>!!!ATTENTION!!!</p>
<p>Need practice example to work with UAC! - too hard to understand</p>
</div>
<div class="section" id="uac-dict-for-orchestrator-web-ui-rights">
<h2>UAC Dict for Orchestrator WEB UI rights<a class="headerlink" href="#uac-dict-for-orchestrator-web-ui-rights" title="Ссылка на этот заголовок"></a></h2>
<p>UAC Dict for pyOpenRPA Orchestrator WEB UI rights.</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="s2">&quot;pyOpenRPADict&quot;</span><span class="p">:{</span>
<span class="s2">&quot;CPKeyDict&quot;</span><span class="p">:{</span> <span class="c1"># Empty dict - all access</span>
<span class="c1"># &quot;CPKeyStr&quot;{</span>
<span class="c1"># }</span>
<span class="p">},</span>
<span class="s2">&quot;RDPKeyDict&quot;</span><span class="p">:{</span> <span class="c1"># Empty dict - all access</span>
<span class="c1">#&quot;RDPKeyStr&quot;{</span>
<span class="c1"># &quot;FullscreenBool&quot;: True,</span>
<span class="c1"># &quot;IgnoreBool&quot;:True,</span>
<span class="c1"># &quot;ReconnectBool&quot;: True</span>
<span class="c1"># &quot;NothingBool&quot;: True # USe option if you dont want to give some access to the RDP controls</span>
<span class="c1"># }</span>
<span class="p">},</span>
<span class="s2">&quot;AgentKeyDict&quot;</span><span class="p">:</span> <span class="p">{</span> <span class="c1"># Empty dict - all access</span>
<span class="c1"># &quot;AgentKeyStr&quot;{</span>
<span class="c1"># }</span>
<span class="p">},</span>
<span class="s2">&quot;AdminDict&quot;</span><span class="p">:{</span> <span class="c1"># Empty dict - all access</span>
<span class="s2">&quot;LogViewerBool&quot;</span><span class="p">:</span><span class="kc">True</span><span class="p">,</span> <span class="c1"># Show log viewer on the web page</span>
<span class="s2">&quot;CMDInputBool&quot;</span><span class="p">:</span><span class="kc">True</span><span class="p">,</span> <span class="c1"># Execute CMD on the server side and result to the logs</span>
<span class="s2">&quot;ScreenshotViewerBool&quot;</span><span class="p">:</span><span class="kc">True</span><span class="p">,</span> <span class="c1"># Show button to look screenshots</span>
<span class="s2">&quot;RestartOrchestratorBool&quot;</span><span class="p">:</span> <span class="kc">True</span><span class="p">,</span> <span class="c1"># Restart orchestrator activity</span>
<span class="s2">&quot;RestartOrchestratorGITPullBool&quot;</span><span class="p">:</span> <span class="kc">True</span><span class="p">,</span> <span class="c1"># Turn off (RDP remember) orc + git pull + Turn on (rdp remember)</span>
<span class="s2">&quot;RestartPCBool&quot;</span><span class="p">:</span> <span class="kc">True</span><span class="p">,</span> <span class="c1"># Send CMD to restart pc</span>
<span class="s2">&quot;NothingBool&quot;</span><span class="p">:</span><span class="kc">True</span> <span class="c1"># USe option if you dont want to give some access to the RDP controls</span>
<span class="p">},</span>
<span class="s2">&quot;ActivityDict&quot;</span><span class="p">:</span> <span class="p">{</span> <span class="c1"># Empty dict - all access</span>
<span class="s2">&quot;ActivityListExecuteBool&quot;</span><span class="p">:</span> <span class="kc">True</span><span class="p">,</span> <span class="c1"># Execute activity at the current thread</span>
<span class="s2">&quot;ActivityListAppendProcessorQueueBool&quot;</span><span class="p">:</span> <span class="kc">True</span> <span class="c1"># Append activity to the processor queue</span>
<span class="p">}</span>
<span class="p">}</span>
</pre></div>
</div>
<p> .. v1.2.12 replace:: v1.2.12
.. <a href="#id1"><span class="problematic" id="id2">|author|</span></a> replace:: Ivan Maslov &lt;<a class="reference external" href="mailto:ivan&#46;maslov&#37;&#52;&#48;unicodelabs&#46;ru">ivan<span>&#46;</span>maslov<span>&#64;</span>unicodelabs<span>&#46;</span>ru</a>&gt;</p>
<p></p>
</div>
</div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="06_Defs%20Managers.html" class="btn btn-neutral float-right" title="6. Defs Managers" accesskey="n" rel="next">Следующая <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
<a href="04_HowToUse.html" class="btn btn-neutral float-left" title="4. How to use" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Предыдущая</a>
</div>
<hr/>
<div role="contentinfo">
<p>
&#169; Copyright 2022, ООО &#34;ОПЕН РПА&#34;.
</p>
</div>
Собрано при помощи <a href="https://www.sphinx-doc.org/">Sphinx</a> с использованием
<a href="https://github.com/readthedocs/sphinx_rtd_theme">темы,</a>
предоставленной <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>

File diff suppressed because it is too large Load Diff

@ -0,0 +1,261 @@
<!DOCTYPE html>
<html class="writer-html5" lang="ru" >
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>1. Описание &mdash; документация pyOpenRPA v1.2.12 v1.2.12</title>
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="shortcut icon" href="../_static/favicon.ico"/>
<!--[if lt IE 9]>
<script src="../_static/js/html5shiv.min.js"></script>
<![endif]-->
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js"></script>
<script src="../_static/translations.js"></script>
<script type="text/javascript" src="../_static/js/theme.js"></script>
<link rel="index" title="Алфавитный указатель" href="../genindex.html" />
<link rel="search" title="Поиск" href="../search.html" />
<link rel="next" title="2. Функции" href="02_Defs.html" />
<link rel="prev" title="2. Права &amp; Контакты" href="../03_Copyrights_Contacts.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../index.html" class="icon icon-home"> pyOpenRPA v1.2.12
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="Поиск в документации" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<p class="caption"><span class="caption-text">ОБЩЕЕ</span></p>
<ul>
<li class="toctree-l1"><a class="reference external" href="https://pyopenrpa.ru/wiki/guide/index">Выбрать версию</a></li>
<li class="toctree-l1"><a class="reference internal" href="../01_HowToInstall.html">1. Первый запуск</a></li>
<li class="toctree-l1"><a class="reference internal" href="../03_Copyrights_Contacts.html">2. Права &amp; Контакты</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ РОБОТ</span></p>
<ul class="current">
<li class="toctree-l1 current"><a class="current reference internal" href="#">1. Описание</a></li>
<li class="toctree-l1"><a class="reference internal" href="02_Defs.html">2. Функции</a></li>
<li class="toctree-l1"><a class="reference internal" href="03_HowToUse.html">3. Как использовать?</a></li>
<li class="toctree-l1"><a class="reference internal" href="04_Dependencies.html">4. Зависимости</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ СТУДИЯ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Studio/01_Studio.html">1. Описание</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Studio/02_HowToUse.html">2. Как использовать?</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ ОРКЕСТРАТОР</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/01_Orchestrator.html">1. Description</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/02_Defs.html">2. Defs</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/03_gSettingsTemplate.html">3. gSettings Template</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/04_HowToUse.html">4. How to use</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/05_UAC.html">5. UAC - User Access Control</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/06_Defs%20Managers.html">6. Defs Managers</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ АГЕНТ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Agent/02_Defs.html">2. Defs</a></li>
</ul>
<p class="caption"><span class="caption-text">ИНСТРУМЕНТЫ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Tools/02_Defs.html">2. Defs StopSafe</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../index.html">pyOpenRPA v1.2.12</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="../index.html" class="icon icon-home"></a> &raquo;</li>
<li>1. Описание</li>
<li class="wy-breadcrumbs-aside">
<a href="../_sources/Robot/01_Robot.rst.txt" rel="nofollow"> Просмотреть исходный код страницы</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="id1">
<h1>1. Описание<a class="headerlink" href="#id1" title="Ссылка на этот заголовок"></a></h1>
<p>pyOpenRPA Robot is the python package which allow you to create best RPA program.</p>
<p>The description of the functions you can find page „Defs“ (see menu)</p>
<p>Here is the example of the pyOpenRPA usage.</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="c1"># EXAMPLE 1</span>
<span class="kn">from</span> <span class="nn">pyOpenRPA.Robot</span> <span class="kn">import</span> <span class="n">UIDesktop</span>
<span class="n">lNotepadOKButton</span> <span class="o">=</span> <span class="n">UIDesktop</span><span class="o">.</span><span class="n">UIOSelector_Get_UIO</span><span class="p">(</span>
<span class="n">inSpecificationList</span><span class="o">=</span><span class="p">[</span>
<span class="p">{</span><span class="s2">&quot;title&quot;</span><span class="p">:</span><span class="s2">&quot;notepad.exe&quot;</span><span class="p">},{</span><span class="s2">&quot;title&quot;</span><span class="p">:</span><span class="s2">&quot;OK&quot;</span><span class="p">}],</span>
<span class="n">inElement</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
<span class="n">inFlagRaiseException</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
<span class="n">lNotepadOKButton</span><span class="o">.</span><span class="n">click</span><span class="p">()</span>
</pre></div>
</div>
<p> .. v1.2.12 replace:: v1.2.12
.. <a href="#id2"><span class="problematic" id="id3">|author|</span></a> replace:: Ivan Maslov &lt;<a class="reference external" href="mailto:ivan&#46;maslov&#37;&#52;&#48;unicodelabs&#46;ru">ivan<span>&#46;</span>maslov<span>&#64;</span>unicodelabs<span>&#46;</span>ru</a>&gt;</p>
<p></p>
</div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="02_Defs.html" class="btn btn-neutral float-right" title="2. Функции" accesskey="n" rel="next">Следующая <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
<a href="../03_Copyrights_Contacts.html" class="btn btn-neutral float-left" title="2. Права &amp; Контакты" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Предыдущая</a>
</div>
<hr/>
<div role="contentinfo">
<p>
&#169; Copyright 2022, ООО &#34;ОПЕН РПА&#34;.
</p>
</div>
Собрано при помощи <a href="https://www.sphinx-doc.org/">Sphinx</a> с использованием
<a href="https://github.com/readthedocs/sphinx_rtd_theme">темы,</a>
предоставленной <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>

@ -0,0 +1,704 @@
<!DOCTYPE html>
<html class="writer-html5" lang="ru" >
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>2. Функции &mdash; документация pyOpenRPA v1.2.12 v1.2.12</title>
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="shortcut icon" href="../_static/favicon.ico"/>
<!--[if lt IE 9]>
<script src="../_static/js/html5shiv.min.js"></script>
<![endif]-->
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js"></script>
<script src="../_static/translations.js"></script>
<script type="text/javascript" src="../_static/js/theme.js"></script>
<link rel="index" title="Алфавитный указатель" href="../genindex.html" />
<link rel="search" title="Поиск" href="../search.html" />
<link rel="next" title="3. Как использовать?" href="03_HowToUse.html" />
<link rel="prev" title="1. Описание" href="01_Robot.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../index.html" class="icon icon-home"> pyOpenRPA v1.2.12
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="Поиск в документации" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<p class="caption"><span class="caption-text">ОБЩЕЕ</span></p>
<ul>
<li class="toctree-l1"><a class="reference external" href="https://pyopenrpa.ru/wiki/guide/index">Выбрать версию</a></li>
<li class="toctree-l1"><a class="reference internal" href="../01_HowToInstall.html">1. Первый запуск</a></li>
<li class="toctree-l1"><a class="reference internal" href="../03_Copyrights_Contacts.html">2. Права &amp; Контакты</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ РОБОТ</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="01_Robot.html">1. Описание</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">2. Функции</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#references">References</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="03_HowToUse.html">3. Как использовать?</a></li>
<li class="toctree-l1"><a class="reference internal" href="04_Dependencies.html">4. Зависимости</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ СТУДИЯ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Studio/01_Studio.html">1. Описание</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Studio/02_HowToUse.html">2. Как использовать?</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ ОРКЕСТРАТОР</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/01_Orchestrator.html">1. Description</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/02_Defs.html">2. Defs</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/03_gSettingsTemplate.html">3. gSettings Template</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/04_HowToUse.html">4. How to use</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/05_UAC.html">5. UAC - User Access Control</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/06_Defs%20Managers.html">6. Defs Managers</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ АГЕНТ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Agent/02_Defs.html">2. Defs</a></li>
</ul>
<p class="caption"><span class="caption-text">ИНСТРУМЕНТЫ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Tools/02_Defs.html">2. Defs StopSafe</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../index.html">pyOpenRPA v1.2.12</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="../index.html" class="icon icon-home"></a> &raquo;</li>
<li>2. Функции</li>
<li class="wy-breadcrumbs-aside">
<a href="../_sources/Robot/02_Defs.rst.txt" rel="nofollow"> Просмотреть исходный код страницы</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="id1">
<h1>2. Функции<a class="headerlink" href="#id1" title="Ссылка на этот заголовок"></a></h1>
<p>Here you can find the functions description for interaction with desktop GUI applications</p>
<p>How to use both x32 and x64 python processes (it can be helpfully, if another app GUI is on another bitness than your app)</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">pyOpenRPA.Robot</span> <span class="kn">import</span> <span class="n">UIDesktop</span>
<span class="c1">#Section for robot init</span>
<span class="n">lPyOpenRPA_SettingsDict</span> <span class="o">=</span> <span class="p">{</span>
<span class="s2">&quot;Python32FullPath&quot;</span><span class="p">:</span> <span class="s2">&quot;..</span><span class="se">\\</span><span class="s2">Resources</span><span class="se">\\</span><span class="s2">WPy32-3720</span><span class="se">\\</span><span class="s2">python-3.7.2</span><span class="se">\\</span><span class="s2">python.exe&quot;</span><span class="p">,</span> <span class="c1">#Set from user: &quot;..\\Resources\\WPy32-3720\\python-3.7.2\\OpenRPARobotGUIx32.exe&quot;</span>
<span class="s2">&quot;Python64FullPath&quot;</span><span class="p">:</span> <span class="s2">&quot;..</span><span class="se">\\</span><span class="s2">Resources</span><span class="se">\\</span><span class="s2">WPy64-3720</span><span class="se">\\</span><span class="s2">python-3.7.2.amd64</span><span class="se">\\</span><span class="s2">python.exe&quot;</span><span class="p">,</span> <span class="c1">#Set from user</span>
<span class="s2">&quot;Python32ProcessName&quot;</span><span class="p">:</span> <span class="s2">&quot;pyOpenRPA_UIDesktopX32.exe&quot;</span><span class="p">,</span> <span class="c1">#Config set once</span>
<span class="s2">&quot;Python64ProcessName&quot;</span><span class="p">:</span> <span class="s2">&quot;pyOpenRPA_UIDesktopX64.exe&quot;</span> <span class="c1">#Config set once</span>
<span class="p">}</span>
<span class="c1"># Init the pyOpenRPA configuration</span>
<span class="n">UIDesktop</span><span class="o">.</span><span class="n">Utils</span><span class="o">.</span><span class="n">ProcessBitness</span><span class="o">.</span><span class="n">SettingsInit</span><span class="p">(</span><span class="n">lPyOpenRPA_SettingsDict</span><span class="p">)</span>
<span class="c1"># Now you can use pyOpenRPA with both bitness.</span>
</pre></div>
</div>
<span class="target" id="module-pyOpenRPA.Robot.UIDesktop"></span><p><strong>Functions:</strong></p>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Robot.UIDesktop.Get_OSBitnessInt" title="pyOpenRPA.Robot.UIDesktop.Get_OSBitnessInt"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Get_OSBitnessInt</span></code></a>()</p></td>
<td><p>Detect OS bitness.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Robot.UIDesktop.PWASpecification_Get_PWAApplication" title="pyOpenRPA.Robot.UIDesktop.PWASpecification_Get_PWAApplication"><code class="xref py py-obj docutils literal notranslate"><span class="pre">PWASpecification_Get_PWAApplication</span></code></a>(…)</p></td>
<td><p>#Backend selection - attribute «backend» («win32» || «uia») in 1-st list element</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Robot.UIDesktop.PWASpecification_Get_UIO" title="pyOpenRPA.Robot.UIDesktop.PWASpecification_Get_UIO"><code class="xref py py-obj docutils literal notranslate"><span class="pre">PWASpecification_Get_UIO</span></code></a>(…)</p></td>
<td><p>#Backend def selection - attribute «backend» («win32» || «uia») in 1-st list element #old name - GetControl</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Robot.UIDesktop.UIOSelectorSecs_WaitAppear_Bool" title="pyOpenRPA.Robot.UIDesktop.UIOSelectorSecs_WaitAppear_Bool"><code class="xref py py-obj docutils literal notranslate"><span class="pre">UIOSelectorSecs_WaitAppear_Bool</span></code></a>(…)</p></td>
<td><p>Wait for UI object will appear in GUI for inWaitSecs seconds.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Robot.UIDesktop.UIOSelectorSecs_WaitDisappear_Bool" title="pyOpenRPA.Robot.UIDesktop.UIOSelectorSecs_WaitDisappear_Bool"><code class="xref py py-obj docutils literal notranslate"><span class="pre">UIOSelectorSecs_WaitDisappear_Bool</span></code></a>(…)</p></td>
<td><p>Wait for UI object will disappear in GUI for inWaitSecs seconds.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Robot.UIDesktop.UIOSelectorUIOActivity_Run_Dict" title="pyOpenRPA.Robot.UIDesktop.UIOSelectorUIOActivity_Run_Dict"><code class="xref py py-obj docutils literal notranslate"><span class="pre">UIOSelectorUIOActivity_Run_Dict</span></code></a>(…[, …])</p></td>
<td><p>Run the activity in UIO (UI Object)</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Robot.UIDesktop.UIOSelector_Exist_Bool" title="pyOpenRPA.Robot.UIDesktop.UIOSelector_Exist_Bool"><code class="xref py py-obj docutils literal notranslate"><span class="pre">UIOSelector_Exist_Bool</span></code></a>(inUIOSelector)</p></td>
<td><p>Check if object is exist by the UIO selector.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Robot.UIDesktop.UIOSelector_FocusHighlight" title="pyOpenRPA.Robot.UIDesktop.UIOSelector_FocusHighlight"><code class="xref py py-obj docutils literal notranslate"><span class="pre">UIOSelector_FocusHighlight</span></code></a>(inUIOSelector)</p></td>
<td><p>Set focus and highlight (draw outline) the element (in app) by the UIO selector.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Robot.UIDesktop.UIOSelector_GetChildList_UIOList" title="pyOpenRPA.Robot.UIDesktop.UIOSelector_GetChildList_UIOList"><code class="xref py py-obj docutils literal notranslate"><span class="pre">UIOSelector_GetChildList_UIOList</span></code></a>([…])</p></td>
<td><p>Get list of child UIOs by the parent UIOSelector</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_BitnessInt" title="pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_BitnessInt"><code class="xref py py-obj docutils literal notranslate"><span class="pre">UIOSelector_Get_BitnessInt</span></code></a>(inSpecificationList)</p></td>
<td><p>Detect process bitness by the UI Object UIO Selector.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_BitnessStr" title="pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_BitnessStr"><code class="xref py py-obj docutils literal notranslate"><span class="pre">UIOSelector_Get_BitnessStr</span></code></a>(inSpecificationList)</p></td>
<td><p>Detect process bitness by the UI Object UIO Selector.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_UIO" title="pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_UIO"><code class="xref py py-obj docutils literal notranslate"><span class="pre">UIOSelector_Get_UIO</span></code></a>(inSpecificationList[, …])</p></td>
<td><p>Get the pywinauto object by the UIO selector.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_UIOActivityList" title="pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_UIOActivityList"><code class="xref py py-obj docutils literal notranslate"><span class="pre">UIOSelector_Get_UIOActivityList</span></code></a>(inUIOSelector)</p></td>
<td><p>Get the list of the UI object activities</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_UIOInfo" title="pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_UIOInfo"><code class="xref py py-obj docutils literal notranslate"><span class="pre">UIOSelector_Get_UIOInfo</span></code></a>(inUIOSelector)</p></td>
<td><p>Get the UIO dict of the attributes</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_UIOList" title="pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_UIOList"><code class="xref py py-obj docutils literal notranslate"><span class="pre">UIOSelector_Get_UIOList</span></code></a>(inSpecificationList)</p></td>
<td><p>Get the UIO list by the selector</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Robot.UIDesktop.UIOSelector_Highlight" title="pyOpenRPA.Robot.UIDesktop.UIOSelector_Highlight"><code class="xref py py-obj docutils literal notranslate"><span class="pre">UIOSelector_Highlight</span></code></a>(inUIOSelector)</p></td>
<td><p>Highlight (draw outline) the element (in app) by the UIO selector.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Robot.UIDesktop.UIOSelector_SafeOtherGet_Process" title="pyOpenRPA.Robot.UIDesktop.UIOSelector_SafeOtherGet_Process"><code class="xref py py-obj docutils literal notranslate"><span class="pre">UIOSelector_SafeOtherGet_Process</span></code></a>(inUIOSelector)</p></td>
<td><p>Safe get other process or None if destination app is the other/same bitness</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Robot.UIDesktop.UIOSelector_SearchChildByMouse_UIO" title="pyOpenRPA.Robot.UIDesktop.UIOSelector_SearchChildByMouse_UIO"><code class="xref py py-obj docutils literal notranslate"><span class="pre">UIOSelector_SearchChildByMouse_UIO</span></code></a>(…)</p></td>
<td><p>UIOSelector (see description on the top of the document) #old name - AutomationSearchMouseElement</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Robot.UIDesktop.UIOSelector_SearchChildByMouse_UIOTree" title="pyOpenRPA.Robot.UIDesktop.UIOSelector_SearchChildByMouse_UIOTree"><code class="xref py py-obj docutils literal notranslate"><span class="pre">UIOSelector_SearchChildByMouse_UIOTree</span></code></a>(…)</p></td>
<td><p>!!!!Safe call is included (you can set activity and UIDesktop will choose the bitness and return the result)!!!!!</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Robot.UIDesktop.UIOSelector_TryRestore_Dict" title="pyOpenRPA.Robot.UIDesktop.UIOSelector_TryRestore_Dict"><code class="xref py py-obj docutils literal notranslate"><span class="pre">UIOSelector_TryRestore_Dict</span></code></a>(inSpecificationList)</p></td>
<td><p>Try to restore (maximize) window, if its minimized.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Robot.UIDesktop.UIOSelectorsSecs_WaitAppear_List" title="pyOpenRPA.Robot.UIDesktop.UIOSelectorsSecs_WaitAppear_List"><code class="xref py py-obj docutils literal notranslate"><span class="pre">UIOSelectorsSecs_WaitAppear_List</span></code></a>(…[, …])</p></td>
<td><p>Wait for many UI object will appear in GUI for inWaitSecs seconds.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Robot.UIDesktop.UIOSelectorsSecs_WaitDisappear_List" title="pyOpenRPA.Robot.UIDesktop.UIOSelectorsSecs_WaitDisappear_List"><code class="xref py py-obj docutils literal notranslate"><span class="pre">UIOSelectorsSecs_WaitDisappear_List</span></code></a>(…[, …])</p></td>
<td><p>Wait for many UI object will disappear in GUI for inWaitSecs seconds.</p></td>
</tr>
</tbody>
</table>
<dl class="py function">
<dt id="pyOpenRPA.Robot.UIDesktop.Get_OSBitnessInt">
<code class="sig-prename descclassname">pyOpenRPA.Robot.UIDesktop.</code><code class="sig-name descname">Get_OSBitnessInt</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Robot/UIDesktop.html#Get_OSBitnessInt"><span class="viewcode-link">[исходный код]</span></a><a class="headerlink" href="#pyOpenRPA.Robot.UIDesktop.Get_OSBitnessInt" title="Ссылка на это определение"></a></dt>
<dd><p>Detect OS bitness.</p>
<dl class="field-list simple">
<dt class="field-odd">Результат</dt>
<dd class="field-odd"><p>int 32 or int 64</p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="pyOpenRPA.Robot.UIDesktop.PWASpecification_Get_PWAApplication">
<code class="sig-prename descclassname">pyOpenRPA.Robot.UIDesktop.</code><code class="sig-name descname">PWASpecification_Get_PWAApplication</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inControlSpecificationArray</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Robot/UIDesktop.html#PWASpecification_Get_PWAApplication"><span class="viewcode-link">[исходный код]</span></a><a class="headerlink" href="#pyOpenRPA.Robot.UIDesktop.PWASpecification_Get_PWAApplication" title="Ссылка на это определение"></a></dt>
<dd><p>#Backend selection - attribute «backend» («win32» || «uia») in 1-st list element</p>
<dl class="field-list simple">
<dt class="field-odd">Параметры</dt>
<dd class="field-odd"><p><strong>inControlSpecificationArray</strong> List of dict, dict in pywinauto.find_windows notation</p>
</dd>
<dt class="field-even">Результат</dt>
<dd class="field-even"><p>process application object</p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="pyOpenRPA.Robot.UIDesktop.PWASpecification_Get_UIO">
<code class="sig-prename descclassname">pyOpenRPA.Robot.UIDesktop.</code><code class="sig-name descname">PWASpecification_Get_UIO</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inControlSpecificationArray</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Robot/UIDesktop.html#PWASpecification_Get_UIO"><span class="viewcode-link">[исходный код]</span></a><a class="headerlink" href="#pyOpenRPA.Robot.UIDesktop.PWASpecification_Get_UIO" title="Ссылка на это определение"></a></dt>
<dd><p>#Backend def selection - attribute «backend» («win32» || «uia») in 1-st list element
#old name - GetControl</p>
<dl class="field-list simple">
<dt class="field-odd">Параметры</dt>
<dd class="field-odd"><p><strong>inControlSpecificationArray</strong> List of dict, dict in pywinauto.find_windows notation</p>
</dd>
<dt class="field-even">Результат</dt>
<dd class="field-even"><p>list of UIO object</p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="pyOpenRPA.Robot.UIDesktop.UIOSelectorSecs_WaitAppear_Bool">
<code class="sig-prename descclassname">pyOpenRPA.Robot.UIDesktop.</code><code class="sig-name descname">UIOSelectorSecs_WaitAppear_Bool</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inSpecificationList</span></em>, <em class="sig-param"><span class="n">inWaitSecs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Robot/UIDesktop.html#UIOSelectorSecs_WaitAppear_Bool"><span class="viewcode-link">[исходный код]</span></a><a class="headerlink" href="#pyOpenRPA.Robot.UIDesktop.UIOSelectorSecs_WaitAppear_Bool" title="Ссылка на это определение"></a></dt>
<dd><p>Wait for UI object will appear in GUI for inWaitSecs seconds.</p>
<dl class="field-list simple">
<dt class="field-odd">Параметры</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>inSpecificationList</strong> UIOSelector. Example: [{«title»:»notepad»},{«title»:»OK»}]</p></li>
<li><p><strong>inWaitSecs</strong> Float value (seconds) for wait UI element appear in GUI</p></li>
</ul>
</dd>
<dt class="field-even">Результат</dt>
<dd class="field-even"><p>True - UI object will appear. False - else case</p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="pyOpenRPA.Robot.UIDesktop.UIOSelectorSecs_WaitDisappear_Bool">
<code class="sig-prename descclassname">pyOpenRPA.Robot.UIDesktop.</code><code class="sig-name descname">UIOSelectorSecs_WaitDisappear_Bool</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inSpecificationList</span></em>, <em class="sig-param"><span class="n">inWaitSecs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Robot/UIDesktop.html#UIOSelectorSecs_WaitDisappear_Bool"><span class="viewcode-link">[исходный код]</span></a><a class="headerlink" href="#pyOpenRPA.Robot.UIDesktop.UIOSelectorSecs_WaitDisappear_Bool" title="Ссылка на это определение"></a></dt>
<dd><p>Wait for UI object will disappear in GUI for inWaitSecs seconds.</p>
<dl class="field-list simple">
<dt class="field-odd">Параметры</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>inSpecificationList</strong> UIOSelector.
Example: [{«title»:»notepad»},{«title»:»OK»}]</p></li>
<li><p><strong>inWaitSecs</strong> Float value (seconds) for wait UI element disappear in GUI</p></li>
</ul>
</dd>
<dt class="field-even">Результат</dt>
<dd class="field-even"><p>True - UI object will disappear. False - else case</p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="pyOpenRPA.Robot.UIDesktop.UIOSelectorUIOActivity_Run_Dict">
<code class="sig-prename descclassname">pyOpenRPA.Robot.UIDesktop.</code><code class="sig-name descname">UIOSelectorUIOActivity_Run_Dict</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inUIOSelector</span></em>, <em class="sig-param"><span class="n">inActionName</span></em>, <em class="sig-param"><span class="n">inArgumentList</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">inkwArgumentObject</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Robot/UIDesktop.html#UIOSelectorUIOActivity_Run_Dict"><span class="viewcode-link">[исходный код]</span></a><a class="headerlink" href="#pyOpenRPA.Robot.UIDesktop.UIOSelectorUIOActivity_Run_Dict" title="Ссылка на это определение"></a></dt>
<dd><p>Run the activity in UIO (UI Object)</p>
<dl class="field-list simple">
<dt class="field-odd">Параметры</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>inUIOSelector</strong> UIOSelector - List of items, which contains condition attributes</p></li>
<li><p><strong>inActionName</strong> UIOActivity (name) activity name string from Pywinauto</p></li>
<li><p><strong>inArgumentList</strong> </p></li>
<li><p><strong>inkwArgumentObject</strong> </p></li>
</ul>
</dd>
<dt class="field-even">Результат</dt>
<dd class="field-even"><p></p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="pyOpenRPA.Robot.UIDesktop.UIOSelector_Exist_Bool">
<code class="sig-prename descclassname">pyOpenRPA.Robot.UIDesktop.</code><code class="sig-name descname">UIOSelector_Exist_Bool</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inUIOSelector</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Robot/UIDesktop.html#UIOSelector_Exist_Bool"><span class="viewcode-link">[исходный код]</span></a><a class="headerlink" href="#pyOpenRPA.Robot.UIDesktop.UIOSelector_Exist_Bool" title="Ссылка на это определение"></a></dt>
<dd><p>Check if object is exist by the UIO selector.</p>
<dl class="field-list simple">
<dt class="field-odd">Параметры</dt>
<dd class="field-odd"><p><strong>inUIOSelector</strong> </p>
</dd>
<dt class="field-even">Результат</dt>
<dd class="field-even"><p>True - Object is exist. False - else case</p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="pyOpenRPA.Robot.UIDesktop.UIOSelector_FocusHighlight">
<code class="sig-prename descclassname">pyOpenRPA.Robot.UIDesktop.</code><code class="sig-name descname">UIOSelector_FocusHighlight</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inUIOSelector</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Robot/UIDesktop.html#UIOSelector_FocusHighlight"><span class="viewcode-link">[исходный код]</span></a><a class="headerlink" href="#pyOpenRPA.Robot.UIDesktop.UIOSelector_FocusHighlight" title="Ссылка на это определение"></a></dt>
<dd><p>Set focus and highlight (draw outline) the element (in app) by the UIO selector.</p>
<dl class="field-list simple">
<dt class="field-odd">Параметры</dt>
<dd class="field-odd"><p><strong>inUIOSelector</strong> UIOSelector - List of items, which contains condition attributes</p>
</dd>
<dt class="field-even">Результат</dt>
<dd class="field-even"><p></p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="pyOpenRPA.Robot.UIDesktop.UIOSelector_GetChildList_UIOList">
<code class="sig-prename descclassname">pyOpenRPA.Robot.UIDesktop.</code><code class="sig-name descname">UIOSelector_GetChildList_UIOList</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inUIOSelector</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">inBackend</span><span class="o">=</span><span class="default_value">'win32'</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Robot/UIDesktop.html#UIOSelector_GetChildList_UIOList"><span class="viewcode-link">[исходный код]</span></a><a class="headerlink" href="#pyOpenRPA.Robot.UIDesktop.UIOSelector_GetChildList_UIOList" title="Ссылка на это определение"></a></dt>
<dd><p>Get list of child UIOs by the parent UIOSelector</p>
<dl class="field-list simple">
<dt class="field-odd">Параметры</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>inUIOSelector</strong> UIOSelector - List of items, which contains condition attributes</p></li>
<li><p><strong>inBackend</strong> «win32» or «uia»</p></li>
</ul>
</dd>
<dt class="field-even">Результат</dt>
<dd class="field-even"><p></p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_BitnessInt">
<code class="sig-prename descclassname">pyOpenRPA.Robot.UIDesktop.</code><code class="sig-name descname">UIOSelector_Get_BitnessInt</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inSpecificationList</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Robot/UIDesktop.html#UIOSelector_Get_BitnessInt"><span class="viewcode-link">[исходный код]</span></a><a class="headerlink" href="#pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_BitnessInt" title="Ссылка на это определение"></a></dt>
<dd><p>Detect process bitness by the UI Object UIO Selector.</p>
<dl class="field-list simple">
<dt class="field-odd">Параметры</dt>
<dd class="field-odd"><p><strong>inSpecificationList</strong> UIOSelector. Example: [{«title»:»notepad»},{«title»:»OK»}]</p>
</dd>
<dt class="field-even">Результат</dt>
<dd class="field-even"><p>int 32 or int 64</p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_BitnessStr">
<code class="sig-prename descclassname">pyOpenRPA.Robot.UIDesktop.</code><code class="sig-name descname">UIOSelector_Get_BitnessStr</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inSpecificationList</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Robot/UIDesktop.html#UIOSelector_Get_BitnessStr"><span class="viewcode-link">[исходный код]</span></a><a class="headerlink" href="#pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_BitnessStr" title="Ссылка на это определение"></a></dt>
<dd><p>Detect process bitness by the UI Object UIO Selector.</p>
<dl class="field-list simple">
<dt class="field-odd">Параметры</dt>
<dd class="field-odd"><p><strong>inSpecificationList</strong> UIOSelector. Example: [{«title»:»notepad»},{«title»:»OK»}]</p>
</dd>
<dt class="field-even">Результат</dt>
<dd class="field-even"><p>str «32» or str «64»</p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_UIO">
<code class="sig-prename descclassname">pyOpenRPA.Robot.UIDesktop.</code><code class="sig-name descname">UIOSelector_Get_UIO</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inSpecificationList</span></em>, <em class="sig-param"><span class="n">inElement</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">inFlagRaiseException</span><span class="o">=</span><span class="default_value">True</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Robot/UIDesktop.html#UIOSelector_Get_UIO"><span class="viewcode-link">[исходный код]</span></a><a class="headerlink" href="#pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_UIO" title="Ссылка на это определение"></a></dt>
<dd><p>Get the pywinauto object by the UIO selector.</p>
<dl class="field-list simple">
<dt class="field-odd">Параметры</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>inSpecificationList</strong> </p></li>
<li><p><strong>inElement</strong> </p></li>
<li><p><strong>inFlagRaiseException</strong> </p></li>
</ul>
</dd>
<dt class="field-even">Результат</dt>
<dd class="field-even"><p></p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_UIOActivityList">
<code class="sig-prename descclassname">pyOpenRPA.Robot.UIDesktop.</code><code class="sig-name descname">UIOSelector_Get_UIOActivityList</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inUIOSelector</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Robot/UIDesktop.html#UIOSelector_Get_UIOActivityList"><span class="viewcode-link">[исходный код]</span></a><a class="headerlink" href="#pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_UIOActivityList" title="Ссылка на это определение"></a></dt>
<dd><p>Get the list of the UI object activities</p>
<dl class="field-list simple">
<dt class="field-odd">Параметры</dt>
<dd class="field-odd"><p><strong>inUIOSelector</strong> UIOSelector - List of items, which contains condition attributes</p>
</dd>
<dt class="field-even">Результат</dt>
<dd class="field-even"><p></p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_UIOInfo">
<code class="sig-prename descclassname">pyOpenRPA.Robot.UIDesktop.</code><code class="sig-name descname">UIOSelector_Get_UIOInfo</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inUIOSelector</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Robot/UIDesktop.html#UIOSelector_Get_UIOInfo"><span class="viewcode-link">[исходный код]</span></a><a class="headerlink" href="#pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_UIOInfo" title="Ссылка на это определение"></a></dt>
<dd><p>Get the UIO dict of the attributes</p>
<dl class="field-list simple">
<dt class="field-odd">Параметры</dt>
<dd class="field-odd"><p><strong>inUIOSelector</strong> UIOSelector - List of items, which contains condition attributes</p>
</dd>
<dt class="field-even">Результат</dt>
<dd class="field-even"><p></p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_UIOList">
<code class="sig-prename descclassname">pyOpenRPA.Robot.UIDesktop.</code><code class="sig-name descname">UIOSelector_Get_UIOList</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inSpecificationList</span></em>, <em class="sig-param"><span class="n">inElement</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">inFlagRaiseException</span><span class="o">=</span><span class="default_value">True</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Robot/UIDesktop.html#UIOSelector_Get_UIOList"><span class="viewcode-link">[исходный код]</span></a><a class="headerlink" href="#pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_UIOList" title="Ссылка на это определение"></a></dt>
<dd><p>Get the UIO list by the selector</p>
<dl class="field-list simple">
<dt class="field-odd">Параметры</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>inSpecificationList</strong> UIO Selector</p></li>
<li><p><strong>inElement</strong> Входной элемент - показатель, что не требуется выполнять коннект к процессу</p></li>
<li><p><strong>inFlagRaiseException</strong> Флаг True - выкинуть ошибку в случае обнаружении пустого списка</p></li>
</ul>
</dd>
<dt class="field-even">Результат</dt>
<dd class="field-even"><p></p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="pyOpenRPA.Robot.UIDesktop.UIOSelector_Highlight">
<code class="sig-prename descclassname">pyOpenRPA.Robot.UIDesktop.</code><code class="sig-name descname">UIOSelector_Highlight</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inUIOSelector</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Robot/UIDesktop.html#UIOSelector_Highlight"><span class="viewcode-link">[исходный код]</span></a><a class="headerlink" href="#pyOpenRPA.Robot.UIDesktop.UIOSelector_Highlight" title="Ссылка на это определение"></a></dt>
<dd><p>Highlight (draw outline) the element (in app) by the UIO selector.</p>
<dl class="field-list simple">
<dt class="field-odd">Параметры</dt>
<dd class="field-odd"><p><strong>inUIOSelector</strong> UIOSelector - List of items, which contains condition attributes</p>
</dd>
<dt class="field-even">Результат</dt>
<dd class="field-even"><p></p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="pyOpenRPA.Robot.UIDesktop.UIOSelector_SafeOtherGet_Process">
<code class="sig-prename descclassname">pyOpenRPA.Robot.UIDesktop.</code><code class="sig-name descname">UIOSelector_SafeOtherGet_Process</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inUIOSelector</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Robot/UIDesktop.html#UIOSelector_SafeOtherGet_Process"><span class="viewcode-link">[исходный код]</span></a><a class="headerlink" href="#pyOpenRPA.Robot.UIDesktop.UIOSelector_SafeOtherGet_Process" title="Ссылка на это определение"></a></dt>
<dd><p>Safe get other process or None if destination app is the other/same bitness</p>
<dl class="field-list simple">
<dt class="field-odd">Параметры</dt>
<dd class="field-odd"><p><strong>inUIOSelector</strong> UIO Selector of the UI object</p>
</dd>
<dt class="field-even">Результат</dt>
<dd class="field-even"><p>None or process (of the other bitness)</p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="pyOpenRPA.Robot.UIDesktop.UIOSelector_SearchChildByMouse_UIO">
<code class="sig-prename descclassname">pyOpenRPA.Robot.UIDesktop.</code><code class="sig-name descname">UIOSelector_SearchChildByMouse_UIO</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inElementSpecification</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Robot/UIDesktop.html#UIOSelector_SearchChildByMouse_UIO"><span class="viewcode-link">[исходный код]</span></a><a class="headerlink" href="#pyOpenRPA.Robot.UIDesktop.UIOSelector_SearchChildByMouse_UIO" title="Ссылка на это определение"></a></dt>
<dd><p>UIOSelector (see description on the top of the document)
#old name - AutomationSearchMouseElement</p>
<dl class="field-list simple">
<dt class="field-odd">Параметры</dt>
<dd class="field-odd"><p><strong>inElementSpecification</strong> UIOSelector of the UI Object</p>
</dd>
<dt class="field-even">Результат</dt>
<dd class="field-even"><p>pywinauto element wrapper instance or None</p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="pyOpenRPA.Robot.UIDesktop.UIOSelector_SearchChildByMouse_UIOTree">
<code class="sig-prename descclassname">pyOpenRPA.Robot.UIDesktop.</code><code class="sig-name descname">UIOSelector_SearchChildByMouse_UIOTree</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inUIOSelector</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Robot/UIDesktop.html#UIOSelector_SearchChildByMouse_UIOTree"><span class="viewcode-link">[исходный код]</span></a><a class="headerlink" href="#pyOpenRPA.Robot.UIDesktop.UIOSelector_SearchChildByMouse_UIOTree" title="Ссылка на это определение"></a></dt>
<dd><p>!!!!Safe call is included (you can set activity and UIDesktop will choose the bitness and return the result)!!!!!</p>
<dl class="field-list simple">
<dt class="field-odd">Параметры</dt>
<dd class="field-odd"><p><strong>inUIOSelector</strong> UIOSelector of the UI Object</p>
</dd>
<dt class="field-even">Результат</dt>
<dd class="field-even"><p><p>?</p>
</p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="pyOpenRPA.Robot.UIDesktop.UIOSelector_TryRestore_Dict">
<code class="sig-prename descclassname">pyOpenRPA.Robot.UIDesktop.</code><code class="sig-name descname">UIOSelector_TryRestore_Dict</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inSpecificationList</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Robot/UIDesktop.html#UIOSelector_TryRestore_Dict"><span class="viewcode-link">[исходный код]</span></a><a class="headerlink" href="#pyOpenRPA.Robot.UIDesktop.UIOSelector_TryRestore_Dict" title="Ссылка на это определение"></a></dt>
<dd><p>Try to restore (maximize) window, if its minimized. (!IMPORTANT! When use UIA framework minimized windows doesnt appear by the UIOSelector. You need to try restore windows and after that try to get UIO)</p>
<dl class="field-list simple">
<dt class="field-odd">Параметры</dt>
<dd class="field-odd"><p><strong>inSpecificationList</strong> UIOSelector - List of items, which contains condition attributes</p>
</dd>
<dt class="field-even">Результат</dt>
<dd class="field-even"><p></p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="pyOpenRPA.Robot.UIDesktop.UIOSelectorsSecs_WaitAppear_List">
<code class="sig-prename descclassname">pyOpenRPA.Robot.UIDesktop.</code><code class="sig-name descname">UIOSelectorsSecs_WaitAppear_List</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inSpecificationListList</span></em>, <em class="sig-param"><span class="n">inWaitSecs</span></em>, <em class="sig-param"><span class="n">inFlagWaitAllInMoment</span><span class="o">=</span><span class="default_value">False</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Robot/UIDesktop.html#UIOSelectorsSecs_WaitAppear_List"><span class="viewcode-link">[исходный код]</span></a><a class="headerlink" href="#pyOpenRPA.Robot.UIDesktop.UIOSelectorsSecs_WaitAppear_List" title="Ссылка на это определение"></a></dt>
<dd><p>Wait for many UI object will appear in GUI for inWaitSecs seconds.</p>
<dl class="field-list simple">
<dt class="field-odd">Параметры</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>inSpecificationListList</strong> <p>UIOSelector list.
Example: [</p>
<blockquote>
<div><p>[{«title»:»notepad»},{«title»:»OK»}],
[{«title»:»notepad»},{«title»:»Cancel»}]</p>
</div></blockquote>
<p>]</p>
</p></li>
<li><p><strong>inWaitSecs</strong> Float value (seconds) for wait UI element appear in GUI</p></li>
<li><p><strong>inFlagWaitAllInMoment</strong> True - Wait all UI objects from the UIOSelector list to be appeared</p></li>
</ul>
</dd>
<dt class="field-even">Результат</dt>
<dd class="field-even"><p>List of index, which UI object UIO will be appeared. Example: [1] # Appear only UI object with UIO selector: [{«title»:»notepad»},{«title»:»Cancel»}]</p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="pyOpenRPA.Robot.UIDesktop.UIOSelectorsSecs_WaitDisappear_List">
<code class="sig-prename descclassname">pyOpenRPA.Robot.UIDesktop.</code><code class="sig-name descname">UIOSelectorsSecs_WaitDisappear_List</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inSpecificationListList</span></em>, <em class="sig-param"><span class="n">inWaitSecs</span></em>, <em class="sig-param"><span class="n">inFlagWaitAllInMoment</span><span class="o">=</span><span class="default_value">False</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Robot/UIDesktop.html#UIOSelectorsSecs_WaitDisappear_List"><span class="viewcode-link">[исходный код]</span></a><a class="headerlink" href="#pyOpenRPA.Robot.UIDesktop.UIOSelectorsSecs_WaitDisappear_List" title="Ссылка на это определение"></a></dt>
<dd><p>Wait for many UI object will disappear in GUI for inWaitSecs seconds.</p>
<dl class="field-list simple">
<dt class="field-odd">Параметры</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>inSpecificationListList</strong> <p>UIOSelector list.
Example: [</p>
<blockquote>
<div><p>[{«title»:»notepad»},{«title»:»OK»}],
[{«title»:»notepad»},{«title»:»Cancel»}]</p>
</div></blockquote>
<p>]</p>
</p></li>
<li><p><strong>inWaitSecs</strong> Float value (seconds) for wait UI element disappear in GUI</p></li>
<li><p><strong>inFlagWaitAllInMoment</strong> True - Wait all UI objects from the UIOSelector list to be disappeared.</p></li>
</ul>
</dd>
<dt class="field-even">Результат</dt>
<dd class="field-even"><p>List of index, which UI object UIO will be disappeared. Example: [1] # Disappear only UI object with UIO selector: [{«title»:»notepad»},{«title»:»Cancel»}]</p>
</dd>
<dt class="field-odd">Результат</dt>
<dd class="field-odd"><p></p>
</dd>
</dl>
</dd></dl>
<div class="section" id="references">
<h2>References<a class="headerlink" href="#references" title="Ссылка на этот заголовок"></a></h2>
<p><a class="reference external" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> <a class="footnote-reference brackets" href="#id4" id="id5">1</a></p>
<dl class="footnote brackets">
<dt class="label" id="id4"><span class="brackets"><a class="fn-backref" href="#id5">1</a></span></dt>
<dd><p><a class="reference external" href="http://docutils.sourceforge.net/rst.html">http://docutils.sourceforge.net/rst.html</a></p>
</dd>
</dl>
<p> .. v1.2.12 replace:: v1.2.12
.. <a href="#id2"><span class="problematic" id="id3">|author|</span></a> replace:: Ivan Maslov &lt;<a class="reference external" href="mailto:ivan&#46;maslov&#37;&#52;&#48;unicodelabs&#46;ru">ivan<span>&#46;</span>maslov<span>&#64;</span>unicodelabs<span>&#46;</span>ru</a>&gt;</p>
<p></p>
</div>
</div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="03_HowToUse.html" class="btn btn-neutral float-right" title="3. Как использовать?" accesskey="n" rel="next">Следующая <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
<a href="01_Robot.html" class="btn btn-neutral float-left" title="1. Описание" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Предыдущая</a>
</div>
<hr/>
<div role="contentinfo">
<p>
&#169; Copyright 2022, ООО &#34;ОПЕН РПА&#34;.
</p>
</div>
Собрано при помощи <a href="https://www.sphinx-doc.org/">Sphinx</a> с использованием
<a href="https://github.com/readthedocs/sphinx_rtd_theme">темы,</a>
предоставленной <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>

@ -0,0 +1,467 @@
<!DOCTYPE html>
<html class="writer-html5" lang="ru" >
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>3. Как использовать? &mdash; документация pyOpenRPA v1.2.12 v1.2.12</title>
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="shortcut icon" href="../_static/favicon.ico"/>
<!--[if lt IE 9]>
<script src="../_static/js/html5shiv.min.js"></script>
<![endif]-->
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js"></script>
<script src="../_static/translations.js"></script>
<script type="text/javascript" src="../_static/js/theme.js"></script>
<link rel="index" title="Алфавитный указатель" href="../genindex.html" />
<link rel="search" title="Поиск" href="../search.html" />
<link rel="next" title="4. Зависимости" href="04_Dependencies.html" />
<link rel="prev" title="2. Функции" href="02_Defs.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../index.html" class="icon icon-home"> pyOpenRPA v1.2.12
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="Поиск в документации" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<p class="caption"><span class="caption-text">ОБЩЕЕ</span></p>
<ul>
<li class="toctree-l1"><a class="reference external" href="https://pyopenrpa.ru/wiki/guide/index">Выбрать версию</a></li>
<li class="toctree-l1"><a class="reference internal" href="../01_HowToInstall.html">1. Первый запуск</a></li>
<li class="toctree-l1"><a class="reference internal" href="../03_Copyrights_Contacts.html">2. Права &amp; Контакты</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ РОБОТ</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="01_Robot.html">1. Описание</a></li>
<li class="toctree-l1"><a class="reference internal" href="02_Defs.html">2. Функции</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">3. Как использовать?</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#how-to-execute-rpa-script">How to execute RPA script</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#create-python-script">Create python script</a></li>
<li class="toctree-l3"><a class="reference internal" href="#execute-python-script">Execute python script</a></li>
<li class="toctree-l3"><a class="reference internal" href="#execute-in-the-python-x32">Execute in the Python x32</a></li>
<li class="toctree-l3"><a class="reference internal" href="#execute-in-the-python-x64">Execute in the Python x64</a></li>
<li class="toctree-l3"><a class="reference internal" href="#execute-from-cmd-file">Execute from .cmd file</a></li>
<li class="toctree-l3"><a class="reference internal" href="#use-in-studio-script-n-a">Use in studio script (n/a)</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#desktop-app-ui-access-win32-and-ui-automation-dlls">Desktop app UI access (win32 and UI automation dlls)</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#definitions">Definitions</a></li>
<li class="toctree-l3"><a class="reference internal" href="#what-is-uio">What is UIO?</a></li>
<li class="toctree-l3"><a class="reference internal" href="#uioselector-structure-example">UIOSelector structure &amp; example</a></li>
<li class="toctree-l3"><a class="reference internal" href="#the-uidesktop-module-openrpa-robot-uidesktop-py">The UIDesktop module (OpenRPA/Robot/UIDesktop.py)</a></li>
<li class="toctree-l3"><a class="reference internal" href="#id2">The UIDesktop module (OpenRPA/Robot/UIDesktop.py)</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#theory-practice-web-app-ui-access-selenium">Theory &amp; practice. WEB app UI access (selenium)</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#about">About</a></li>
<li class="toctree-l3"><a class="reference internal" href="#how-to-use">How to use</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#theory-practice-keyboard-mouse-manipulation">Theory &amp; practice. Keyboard &amp; mouse manipulation</a></li>
<li class="toctree-l2"><a class="reference internal" href="#theory-practice-screen-capture-image-recognition">Theory &amp; practice. Screen capture &amp; image recognition</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#how-to-automate-image-recognition-on-pc">How to automate image recognition on PC</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="04_Dependencies.html">4. Зависимости</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ СТУДИЯ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Studio/01_Studio.html">1. Описание</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Studio/02_HowToUse.html">2. Как использовать?</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ ОРКЕСТРАТОР</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/01_Orchestrator.html">1. Description</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/02_Defs.html">2. Defs</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/03_gSettingsTemplate.html">3. gSettings Template</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/04_HowToUse.html">4. How to use</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/05_UAC.html">5. UAC - User Access Control</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/06_Defs%20Managers.html">6. Defs Managers</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ АГЕНТ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Agent/02_Defs.html">2. Defs</a></li>
</ul>
<p class="caption"><span class="caption-text">ИНСТРУМЕНТЫ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Tools/02_Defs.html">2. Defs StopSafe</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../index.html">pyOpenRPA v1.2.12</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="../index.html" class="icon icon-home"></a> &raquo;</li>
<li>3. Как использовать?</li>
<li class="wy-breadcrumbs-aside">
<a href="../_sources/Robot/03_HowToUse.rst.txt" rel="nofollow"> Просмотреть исходный код страницы</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="id1">
<h1>3. Как использовать?<a class="headerlink" href="#id1" title="Ссылка на этот заголовок"></a></h1>
<p>The Robot tool is the main module for production process automation. It has no graphic/console interface. All low-level actions to OS are perfoming by the Robot tool in pyOpenRPA.</p>
<div class="section" id="how-to-execute-rpa-script">
<h2>How to execute RPA script<a class="headerlink" href="#how-to-execute-rpa-script" title="Ссылка на этот заголовок"></a></h2>
<p>You can use the robot by the several ways:</p>
<ul class="simple">
<li><p>In Python script</p></li>
<li><p>In Studio script (n/a)</p></li>
</ul>
<div class="section" id="create-python-script">
<h3>Create python script<a class="headerlink" href="#create-python-script" title="Ссылка на этот заголовок"></a></h3>
<p>In order to use robot just add Robot tool folder in work directory and add line «import GUI» in your script.</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">sys</span>
<span class="n">sys</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="s1">&#39;../../&#39;</span><span class="p">)</span>
<span class="kn">import</span> <span class="nn">selenium</span> <span class="c1"># [Web app access](https://gitlab.com/UnicodeLabs/OpenRPA/wikis/05.1.-Theory-&amp;-practice:-Web-app-access-(Chrome,-Firefox,-Opera))&lt;br&gt;</span>
<span class="kn">import</span> <span class="nn">GUI</span> <span class="c1"># [Win32 &amp; UI Automation access](https://gitlab.com/UnicodeLabs/OpenRPA/wikis/05.2.-Theory-&amp;-practice:-Desktop-app-UI-access-(win32-and-UI-automation-dlls)) &lt;br&gt;</span>
<span class="kn">import</span> <span class="nn">pyautogui</span> <span class="c1">#[Screen capture/recognition](https://gitlab.com/UnicodeLabs/OpenRPA/wikis/05.4.-Theory-&amp;-practice:-Screen-capture-&amp;-image-recognition) [#Mouse manipulation](https://gitlab.com/UnicodeLabs/OpenRPA/wikis/05.3.-Theory-&amp;-practice:-Keyboard-&amp;-mouse-manipulation)&lt;br&gt;</span>
<span class="kn">import</span> <span class="nn">cv2</span> <span class="c1"># [Computer vision](https://gitlab.com/UnicodeLabs/OpenRPA/wikis/05.4.-Theory-&amp;-practice:-Screen-capture-&amp;-image-recognition)&lt;br&gt;</span>
<span class="kn">import</span> <span class="nn">keyboard</span> <span class="c1">#[Keyboard manipulation](https://gitlab.com/UnicodeLabs/OpenRPA/wikis/05.3.-Theory-&amp;-practice:-Keyboard-&amp;-mouse-manipulation)&lt;br&gt;</span>
</pre></div>
</div>
</div>
<div class="section" id="execute-python-script">
<h3>Execute python script<a class="headerlink" href="#execute-python-script" title="Ссылка на этот заголовок"></a></h3>
<p>The pyOpenRPA is fully portable solution. It contains own python enviroment both 32 and 64 bit versions. So, you can execute your python script in several ways:
- Execute in python x32 (OpenRPAResourcesWPy32-3720python-3.7.2)
- Execute in python x64 (OpenRPAResourcesWPy64-3720python-3.7.2.amd64)
- Execute from .cmd file</p>
</div>
<div class="section" id="execute-in-the-python-x32">
<h3>Execute in the Python x32<a class="headerlink" href="#execute-in-the-python-x32" title="Ссылка на этот заголовок"></a></h3>
<p>To execute your python script in x32 bit version just write in command line from x32 python directory:</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">cd</span> <span class="s2">&quot;\OpenRPA\Resources\WPy32-3720\python-3.7.2&quot;</span>
<span class="n">python</span><span class="o">.</span><span class="n">exe</span> <span class="s2">&quot;path to your python script.py&quot;</span>
</pre></div>
</div>
</div>
<div class="section" id="execute-in-the-python-x64">
<h3>Execute in the Python x64<a class="headerlink" href="#execute-in-the-python-x64" title="Ссылка на этот заголовок"></a></h3>
<p>To execute your python script in x32 bit version just write in command line from x32 python directory:</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">cd</span> <span class="s2">&quot;\OpenRPA\Resources\WPy64-3720\python-3.7.2.amd64&quot;</span>
<span class="n">python</span><span class="o">.</span><span class="n">exe</span> <span class="s2">&quot;path to your python script.py&quot;</span>
</pre></div>
</div>
</div>
<div class="section" id="execute-from-cmd-file">
<h3>Execute from .cmd file<a class="headerlink" href="#execute-from-cmd-file" title="Ссылка на этот заголовок"></a></h3>
<p>In order to simplify the execution process you can write several code lines in file with the .cmd extension:</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">cd</span> <span class="o">%~</span><span class="n">dp0</span>
<span class="n">copy</span> <span class="o">/</span><span class="n">Y</span> <span class="o">..</span>\<span class="n">Resources</span>\<span class="n">WPy32</span><span class="o">-</span><span class="mi">3720</span>\<span class="n">python</span><span class="o">-</span><span class="mf">3.7</span><span class="o">.</span><span class="mi">2</span>\<span class="n">python</span><span class="o">.</span><span class="n">exe</span> <span class="o">..</span>\<span class="n">Resources</span>\<span class="n">WPy32</span><span class="o">-</span><span class="mi">3720</span>\<span class="n">python</span><span class="o">-</span><span class="mf">3.7</span><span class="o">.</span><span class="mi">2</span>\<span class="n">OpenRPAOrchestrator</span><span class="o">.</span><span class="n">exe</span>
<span class="o">.</span>\<span class="o">..</span>\<span class="n">Resources</span>\<span class="n">WPy32</span><span class="o">-</span><span class="mi">3720</span>\<span class="n">python</span><span class="o">-</span><span class="mf">3.7</span><span class="o">.</span><span class="mi">2</span>\<span class="n">OpenRPAOrchestrator</span><span class="o">.</span><span class="n">exe</span> <span class="n">orchestratorMain</span><span class="o">.</span><span class="n">py</span>
<span class="n">pause</span> <span class="o">&gt;</span><span class="n">nul</span>
</pre></div>
</div>
</div>
<div class="section" id="use-in-studio-script-n-a">
<h3>Use in studio script (n/a)<a class="headerlink" href="#use-in-studio-script-n-a" title="Ссылка на этот заголовок"></a></h3>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">sys</span>
<span class="n">sys</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="s1">&#39;../../&#39;</span><span class="p">)</span>
<span class="kn">import</span> <span class="nn">GUI</span>
<span class="kn">import</span> <span class="nn">keyboard</span>
<span class="kn">import</span> <span class="nn">subprocess</span>
<span class="kn">import</span> <span class="nn">time</span>
<span class="c1">#Highlight the UI Object in Folder explorer</span>
<span class="n">GUI</span><span class="o">.</span><span class="n">UIOSelector_FocusHighlight</span><span class="p">([{</span><span class="s2">&quot;class_name&quot;</span><span class="p">:</span><span class="s2">&quot;CabinetWClass&quot;</span><span class="p">,</span><span class="s2">&quot;backend&quot;</span><span class="p">:</span><span class="s2">&quot;uia&quot;</span><span class="p">},{</span><span class="s2">&quot;ctrl_index&quot;</span><span class="p">:</span><span class="mi">2</span><span class="p">},{</span><span class="s2">&quot;ctrl_index&quot;</span><span class="p">:</span><span class="mi">0</span><span class="p">},{</span><span class="s2">&quot;ctrl_index&quot;</span><span class="p">:</span><span class="mi">2</span><span class="p">},{</span><span class="s2">&quot;ctrl_index&quot;</span><span class="p">:</span><span class="mi">0</span><span class="p">}])</span>
<span class="c1">#Wait 2 seconds</span>
<span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">3</span><span class="p">)</span>
<span class="c1">#Loop: get child element of UI List</span>
<span class="k">for</span> <span class="n">lItem</span> <span class="ow">in</span> <span class="n">GUI</span><span class="o">.</span><span class="n">UIOSelector_Get_UIO</span><span class="p">([{</span><span class="s2">&quot;class_name&quot;</span><span class="p">:</span><span class="s2">&quot;CabinetWClass&quot;</span><span class="p">,</span><span class="s2">&quot;backend&quot;</span><span class="p">:</span><span class="s2">&quot;uia&quot;</span><span class="p">},{</span><span class="s2">&quot;ctrl_index&quot;</span><span class="p">:</span><span class="mi">2</span><span class="p">},{</span><span class="s2">&quot;ctrl_index&quot;</span><span class="p">:</span><span class="mi">0</span><span class="p">},{</span><span class="s2">&quot;ctrl_index&quot;</span><span class="p">:</span><span class="mi">2</span><span class="p">},{</span><span class="s2">&quot;ctrl_index&quot;</span><span class="p">:</span><span class="mi">0</span><span class="p">}])</span><span class="o">.</span><span class="n">children</span><span class="p">():</span>
<span class="nb">print</span><span class="p">(</span><span class="nb">str</span><span class="p">(</span><span class="n">lItem</span><span class="p">))</span>
</pre></div>
</div>
<p>Here you can find the docs and examples of the OpenRPA desktop (GUI) app access.</p>
</div>
</div>
<div class="section" id="desktop-app-ui-access-win32-and-ui-automation-dlls">
<h2>Desktop app UI access (win32 and UI automation dlls)<a class="headerlink" href="#desktop-app-ui-access-win32-and-ui-automation-dlls" title="Ссылка на этот заголовок"></a></h2>
<div class="section" id="definitions">
<h3>Definitions<a class="headerlink" href="#definitions" title="Ссылка на этот заголовок"></a></h3>
<ul class="simple">
<li><p><strong>UIO</strong> - UI Object (class of pywinauto UI object) [pywinauto.base_wrapper]</p></li>
<li><p><strong>UIOSelector</strong> - List of dict (key attributes)</p></li>
<li><p><strong>PWA</strong> - PyWinAuto</p></li>
<li><p><strong>PWASpecification</strong> - List of dict (key attributes in pywinauto.find_window notation)</p></li>
<li><p><strong>UIOTree</strong> - Recursive Dict of Dict … (UI Parent -&gt; Child hierarchy)</p></li>
<li><p><strong>UIOInfo</strong> - Dict of UIO attributes</p></li>
<li><p><strong>UIOActivity</strong> - Activity of the UIO (UI object) from the Pywinauto module</p></li>
<li><p><strong>UIOEI</strong> - UI Object info object</p></li>
</ul>
</div>
<div class="section" id="what-is-uio">
<h3>What is UIO?<a class="headerlink" href="#what-is-uio" title="Ссылка на этот заголовок"></a></h3>
<p>UIO is a User Interface Object (pyOpenRPA terminology). For maximum compatibility, this instance is inherited from the object model developed in the [pywinauto library (click to get a list of available class functions)](<a class="reference external" href="https://pywinauto.readthedocs.io/en/latest/code/pywinauto.base_wrapper.html">https://pywinauto.readthedocs.io/en/latest/code/pywinauto.base_wrapper.html</a>).</p>
<p>This approach allows us to implement useful functionality that has already been successfully developed in other libraries, and Supplement it with the missing functionality. In our case, the missing functionality is the ability to dynamically access UIO objects using UIO selectors.</p>
</div>
<div class="section" id="uioselector-structure-example">
<h3>UIOSelector structure &amp; example<a class="headerlink" href="#uioselector-structure-example" title="Ссылка на этот заголовок"></a></h3>
<p>UIOSelector is the list of condition items for the UIO in GUI. Each item has condition attributes for detect applicable UIO. Here is the description of the available condition attributes in item.</p>
<p><strong>Desciption</strong></p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span>[
{
&quot;depth_start&quot; :: [int, start from 1] :: the depth index, where to start check the condition list (default 1),
&quot;depth_end&quot; :: [int, start from 1] :: the depth index, where to stop check the condition list (default 1),
&quot;ctrl_index&quot; || &quot;index&quot; :: [int, starts from 0] :: the index of the UIO in parent UIO child list,
&quot;title&quot; :: [str] :: the condition for the UIO attribute *title*,
&quot;title_re&quot; :: [str] :: regular expression (python ver) for the condition for the UIO attribute *title*,
&quot;rich_text&quot; :: [str] :: the condition for the UIO attribute *rich_text*,
&quot;rich_text_re&quot; :: [str] :: regular expression (python ver) for the condition for the UIO attribute *rich_text*,
&quot;class_name&quot; :: [str] :: the condition for the UIO attribute *class_name*,
&quot;class_name_re&quot; :: [str] :: regular expression (python ver) for the condition for the UIO attribute *class_name*,
&quot;friendly_class_name&quot; :: [str] :: the condition for the UIO attribute *friendly_class_name*,
&quot;friendly_class_name_re&quot; :: [str] :: regular expression (python ver) for the condition for the UIO attribute *friendly_class_name*,
&quot;control_type&quot; :: [str] :: the condition for the UIO attribute *control_type*,
&quot;control_type_re&quot; :: [str] :: regular expression (python ver) for the condition for the UIO attribute *control_type*,
&quot;is_enabled&quot; :: [bool] :: the condition for the UIO attribute *is_enabled*. If UI object is enabled on GUI,
&quot;is_visible&quot; :: [bool] :: the condition for the UIO attribute *is_visible*. If UI object is visible on GUI,
&quot;backend&quot; :: [str, &quot;win32&quot; || &quot;uia&quot;] :: the method of UIO extraction (default &quot;win32&quot;). ATTENTION! Current option can be only for the first item of the UIO selector. For the next items this option will be implemented from the first item.
},
{ ... specification next level UIO }
]
</pre></div>
</div>
<p><strong>The UIO selector example</strong></p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="p">[</span>
<span class="p">{</span><span class="s2">&quot;class_name&quot;</span><span class="p">:</span><span class="s2">&quot;CalcFrame&quot;</span><span class="p">,</span> <span class="s2">&quot;backend&quot;</span><span class="p">:</span><span class="s2">&quot;win32&quot;</span><span class="p">},</span> <span class="c1"># 1-st level UIO specification</span>
<span class="p">{</span><span class="s2">&quot;title&quot;</span><span class="p">:</span><span class="s2">&quot;Hex&quot;</span><span class="p">,</span> <span class="s2">&quot;depth_start&quot;</span><span class="p">:</span><span class="mi">3</span><span class="p">,</span> <span class="s2">&quot;depth_end&quot;</span><span class="p">:</span> <span class="mi">3</span><span class="p">}</span> <span class="c1"># 3-rd level specification (because of attribute depth_start|depth_stop)</span>
<span class="p">]</span>
</pre></div>
</div>
</div>
<div class="section" id="the-uidesktop-module-openrpa-robot-uidesktop-py">
<h3>The UIDesktop module (OpenRPA/Robot/UIDesktop.py)<a class="headerlink" href="#the-uidesktop-module-openrpa-robot-uidesktop-py" title="Ссылка на этот заголовок"></a></h3>
<p>The UIDesktop is extension of the pywinauto module which provide access to the desktop apps by the <strong>win32</strong> and <strong>ui automation</strong> dll frameworks (big thx to the Microsoft :) ).</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="c1"># EXAMPLE 1</span>
<span class="kn">from</span> <span class="nn">pyOpenRPA.Robot</span> <span class="kn">import</span> <span class="n">UIDesktop</span>
<span class="n">UIDesktop</span><span class="o">.</span><span class="n">UIOSelector_Get_UIO</span><span class="p">(</span>
<span class="n">inSpecificationList</span><span class="o">=</span><span class="p">[</span>
<span class="p">{</span><span class="s2">&quot;title&quot;</span><span class="p">:</span><span class="s2">&quot;notepad.exe&quot;</span><span class="p">},{</span><span class="s2">&quot;title&quot;</span><span class="p">:</span><span class="s2">&quot;OK&quot;</span><span class="p">}],</span>
<span class="n">inElement</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
<span class="n">inFlagRaiseException</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
</pre></div>
</div>
</div>
<div class="section" id="id2">
<h3>The UIDesktop module (OpenRPA/Robot/UIDesktop.py)<a class="headerlink" href="#id2" title="Ссылка на этот заголовок"></a></h3>
<p>The UIDesktop is extension of the pywinauto module which provide access to the desktop apps by the <strong>win32</strong> and <strong>ui automation</strong> dll frameworks (big thx to the Microsoft :) ).</p>
<p><a href="#id3"><span class="problematic" id="id4">*</span></a>Naming convention: &lt;InArgument&gt;_&lt;ActivityName&gt;_&lt;OutArgument - if exist&gt;*&lt;br&gt;</p>
</div>
</div>
<div class="section" id="theory-practice-web-app-ui-access-selenium">
<h2>Theory &amp; practice. WEB app UI access (selenium)<a class="headerlink" href="#theory-practice-web-app-ui-access-selenium" title="Ссылка на этот заголовок"></a></h2>
<div class="section" id="about">
<h3>About<a class="headerlink" href="#about" title="Ссылка на этот заголовок"></a></h3>
<p>The pyOpenRPA support web app manipulation (by the Selenium lib).
More docs about selenium you can find here (<a class="reference external" href="https://selenium-python.readthedocs.io/">https://selenium-python.readthedocs.io/</a>)</p>
</div>
<div class="section" id="how-to-use">
<h3>How to use<a class="headerlink" href="#how-to-use" title="Ссылка на этот заголовок"></a></h3>
<p>To start use selenium just import selenium modules in the robot tool. Here is the example of the usage.</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">selenium</span> <span class="kn">import</span> <span class="n">webdriver</span>
<span class="kn">from</span> <span class="nn">selenium.webdriver.common.keys</span> <span class="kn">import</span> <span class="n">Keys</span>
<span class="n">driver</span> <span class="o">=</span> <span class="n">webdriver</span><span class="o">.</span><span class="n">Chrome</span><span class="p">()</span>
<span class="n">driver</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;http://www.python.org&quot;</span><span class="p">)</span>
<span class="k">assert</span> <span class="s2">&quot;Python&quot;</span> <span class="ow">in</span> <span class="n">driver</span><span class="o">.</span><span class="n">title</span>
<span class="n">elem</span> <span class="o">=</span> <span class="n">driver</span><span class="o">.</span><span class="n">find_element_by_name</span><span class="p">(</span><span class="s2">&quot;q&quot;</span><span class="p">)</span>
<span class="n">elem</span><span class="o">.</span><span class="n">clear</span><span class="p">()</span>
<span class="n">elem</span><span class="o">.</span><span class="n">send_keys</span><span class="p">(</span><span class="s2">&quot;pycon&quot;</span><span class="p">)</span>
<span class="n">elem</span><span class="o">.</span><span class="n">send_keys</span><span class="p">(</span><span class="n">Keys</span><span class="o">.</span><span class="n">RETURN</span><span class="p">)</span>
<span class="k">assert</span> <span class="s2">&quot;No results found.&quot;</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">driver</span><span class="o">.</span><span class="n">page_source</span>
<span class="n">driver</span><span class="o">.</span><span class="n">close</span><span class="p">()</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="theory-practice-keyboard-mouse-manipulation">
<h2>Theory &amp; practice. Keyboard &amp; mouse manipulation<a class="headerlink" href="#theory-practice-keyboard-mouse-manipulation" title="Ссылка на этот заголовок"></a></h2>
</div>
<div class="section" id="theory-practice-screen-capture-image-recognition">
<h2>Theory &amp; practice. Screen capture &amp; image recognition<a class="headerlink" href="#theory-practice-screen-capture-image-recognition" title="Ссылка на этот заголовок"></a></h2>
<div class="section" id="how-to-automate-image-recognition-on-pc">
<h3>How to automate image recognition on PC<a class="headerlink" href="#how-to-automate-image-recognition-on-pc" title="Ссылка на этот заголовок"></a></h3>
<p>Here you can find any ways you need to use in your business case:
- Find the exact match on the screen with the other image
- Use text recognition module (OCR)
- Use computer vision (CV) to identify the objects on screen/image/video
- Use artificial intelligence (AI) to make custom identification/classification/text recognition</p>
<p> .. v1.2.12 replace:: v1.2.12
.. <a href="#id5"><span class="problematic" id="id6">|author|</span></a> replace:: Ivan Maslov &lt;<a class="reference external" href="mailto:ivan&#46;maslov&#37;&#52;&#48;unicodelabs&#46;ru">ivan<span>&#46;</span>maslov<span>&#64;</span>unicodelabs<span>&#46;</span>ru</a>&gt;</p>
<p></p>
</div>
</div>
</div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="04_Dependencies.html" class="btn btn-neutral float-right" title="4. Зависимости" accesskey="n" rel="next">Следующая <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
<a href="02_Defs.html" class="btn btn-neutral float-left" title="2. Функции" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Предыдущая</a>
</div>
<hr/>
<div role="contentinfo">
<p>
&#169; Copyright 2022, ООО &#34;ОПЕН РПА&#34;.
</p>
</div>
Собрано при помощи <a href="https://www.sphinx-doc.org/">Sphinx</a> с использованием
<a href="https://github.com/readthedocs/sphinx_rtd_theme">темы,</a>
предоставленной <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>

@ -0,0 +1,252 @@
<!DOCTYPE html>
<html class="writer-html5" lang="ru" >
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>4. Зависимости &mdash; документация pyOpenRPA v1.2.12 v1.2.12</title>
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="shortcut icon" href="../_static/favicon.ico"/>
<!--[if lt IE 9]>
<script src="../_static/js/html5shiv.min.js"></script>
<![endif]-->
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js"></script>
<script src="../_static/translations.js"></script>
<script type="text/javascript" src="../_static/js/theme.js"></script>
<link rel="index" title="Алфавитный указатель" href="../genindex.html" />
<link rel="search" title="Поиск" href="../search.html" />
<link rel="next" title="1. Описание" href="../Studio/01_Studio.html" />
<link rel="prev" title="3. Как использовать?" href="03_HowToUse.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../index.html" class="icon icon-home"> pyOpenRPA v1.2.12
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="Поиск в документации" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<p class="caption"><span class="caption-text">ОБЩЕЕ</span></p>
<ul>
<li class="toctree-l1"><a class="reference external" href="https://pyopenrpa.ru/wiki/guide/index">Выбрать версию</a></li>
<li class="toctree-l1"><a class="reference internal" href="../01_HowToInstall.html">1. Первый запуск</a></li>
<li class="toctree-l1"><a class="reference internal" href="../03_Copyrights_Contacts.html">2. Права &amp; Контакты</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ РОБОТ</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="01_Robot.html">1. Описание</a></li>
<li class="toctree-l1"><a class="reference internal" href="02_Defs.html">2. Функции</a></li>
<li class="toctree-l1"><a class="reference internal" href="03_HowToUse.html">3. Как использовать?</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">4. Зависимости</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ СТУДИЯ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Studio/01_Studio.html">1. Описание</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Studio/02_HowToUse.html">2. Как использовать?</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ ОРКЕСТРАТОР</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/01_Orchestrator.html">1. Description</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/02_Defs.html">2. Defs</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/03_gSettingsTemplate.html">3. gSettings Template</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/04_HowToUse.html">4. How to use</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/05_UAC.html">5. UAC - User Access Control</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/06_Defs%20Managers.html">6. Defs Managers</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ АГЕНТ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Agent/02_Defs.html">2. Defs</a></li>
</ul>
<p class="caption"><span class="caption-text">ИНСТРУМЕНТЫ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Tools/02_Defs.html">2. Defs StopSafe</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../index.html">pyOpenRPA v1.2.12</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="../index.html" class="icon icon-home"></a> &raquo;</li>
<li>4. Зависимости</li>
<li class="wy-breadcrumbs-aside">
<a href="../_sources/Robot/04_Dependencies.rst.txt" rel="nofollow"> Просмотреть исходный код страницы</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="id1">
<h1>4. Зависимости<a class="headerlink" href="#id1" title="Ссылка на этот заголовок"></a></h1>
<p>Python 3 x32 [psutil, pywinauto, wmi, PIL, keyboard, pyautogui, win32api (pywin32), selenium, openCV, tesseract, requests, lxml, PyMuPDF]
Python 3 x64 [psutil, pywinauto, wmi, PIL, keyboard, pyautogui, win32api (pywin32), selenium, openCV, tesseract, requests, lxml, PyMuPDF]
pywinauto (Windows GUI automation)
Semantic UI CSS framework
JsRender by <a class="reference external" href="https://www.jsviews.com">https://www.jsviews.com</a> (switch to Handlebars)
Handlebars</p>
<p> .. v1.2.12 replace:: v1.2.12
.. <a href="#id2"><span class="problematic" id="id3">|author|</span></a> replace:: Ivan Maslov &lt;<a class="reference external" href="mailto:ivan&#46;maslov&#37;&#52;&#48;unicodelabs&#46;ru">ivan<span>&#46;</span>maslov<span>&#64;</span>unicodelabs<span>&#46;</span>ru</a>&gt;</p>
<p></p>
</div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="../Studio/01_Studio.html" class="btn btn-neutral float-right" title="1. Описание" accesskey="n" rel="next">Следующая <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
<a href="03_HowToUse.html" class="btn btn-neutral float-left" title="3. Как использовать?" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Предыдущая</a>
</div>
<hr/>
<div role="contentinfo">
<p>
&#169; Copyright 2022, ООО &#34;ОПЕН РПА&#34;.
</p>
</div>
Собрано при помощи <a href="https://www.sphinx-doc.org/">Sphinx</a> с использованием
<a href="https://github.com/readthedocs/sphinx_rtd_theme">темы,</a>
предоставленной <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>

@ -0,0 +1,247 @@
<!DOCTYPE html>
<html class="writer-html5" lang="ru" >
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>1. Описание &mdash; документация pyOpenRPA v1.2.12 v1.2.12</title>
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="shortcut icon" href="../_static/favicon.ico"/>
<!--[if lt IE 9]>
<script src="../_static/js/html5shiv.min.js"></script>
<![endif]-->
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js"></script>
<script src="../_static/translations.js"></script>
<script type="text/javascript" src="../_static/js/theme.js"></script>
<link rel="index" title="Алфавитный указатель" href="../genindex.html" />
<link rel="search" title="Поиск" href="../search.html" />
<link rel="next" title="2. Как использовать?" href="02_HowToUse.html" />
<link rel="prev" title="4. Зависимости" href="../Robot/04_Dependencies.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../index.html" class="icon icon-home"> pyOpenRPA v1.2.12
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="Поиск в документации" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<p class="caption"><span class="caption-text">ОБЩЕЕ</span></p>
<ul>
<li class="toctree-l1"><a class="reference external" href="https://pyopenrpa.ru/wiki/guide/index">Выбрать версию</a></li>
<li class="toctree-l1"><a class="reference internal" href="../01_HowToInstall.html">1. Первый запуск</a></li>
<li class="toctree-l1"><a class="reference internal" href="../03_Copyrights_Contacts.html">2. Права &amp; Контакты</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ РОБОТ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Robot/01_Robot.html">1. Описание</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Robot/02_Defs.html">2. Функции</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Robot/03_HowToUse.html">3. Как использовать?</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Robot/04_Dependencies.html">4. Зависимости</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ СТУДИЯ</span></p>
<ul class="current">
<li class="toctree-l1 current"><a class="current reference internal" href="#">1. Описание</a></li>
<li class="toctree-l1"><a class="reference internal" href="02_HowToUse.html">2. Как использовать?</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ ОРКЕСТРАТОР</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/01_Orchestrator.html">1. Description</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/02_Defs.html">2. Defs</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/03_gSettingsTemplate.html">3. gSettings Template</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/04_HowToUse.html">4. How to use</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/05_UAC.html">5. UAC - User Access Control</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/06_Defs%20Managers.html">6. Defs Managers</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ АГЕНТ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Agent/02_Defs.html">2. Defs</a></li>
</ul>
<p class="caption"><span class="caption-text">ИНСТРУМЕНТЫ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Tools/02_Defs.html">2. Defs StopSafe</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../index.html">pyOpenRPA v1.2.12</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="../index.html" class="icon icon-home"></a> &raquo;</li>
<li>1. Описание</li>
<li class="wy-breadcrumbs-aside">
<a href="../_sources/Studio/01_Studio.rst.txt" rel="nofollow"> Просмотреть исходный код страницы</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="id1">
<h1>1. Описание<a class="headerlink" href="#id1" title="Ссылка на этот заголовок"></a></h1>
<p>pyOpenRPA Studio is the executable process.</p>
<p> .. v1.2.12 replace:: v1.2.12
.. <a href="#id2"><span class="problematic" id="id3">|author|</span></a> replace:: Ivan Maslov &lt;<a class="reference external" href="mailto:ivan&#46;maslov&#37;&#52;&#48;unicodelabs&#46;ru">ivan<span>&#46;</span>maslov<span>&#64;</span>unicodelabs<span>&#46;</span>ru</a>&gt;</p>
<p></p>
</div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="02_HowToUse.html" class="btn btn-neutral float-right" title="2. Как использовать?" accesskey="n" rel="next">Следующая <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
<a href="../Robot/04_Dependencies.html" class="btn btn-neutral float-left" title="4. Зависимости" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Предыдущая</a>
</div>
<hr/>
<div role="contentinfo">
<p>
&#169; Copyright 2022, ООО &#34;ОПЕН РПА&#34;.
</p>
</div>
Собрано при помощи <a href="https://www.sphinx-doc.org/">Sphinx</a> с использованием
<a href="https://github.com/readthedocs/sphinx_rtd_theme">темы,</a>
предоставленной <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>

@ -0,0 +1,367 @@
<!DOCTYPE html>
<html class="writer-html5" lang="ru" >
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>2. Как использовать? &mdash; документация pyOpenRPA v1.2.12 v1.2.12</title>
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="shortcut icon" href="../_static/favicon.ico"/>
<!--[if lt IE 9]>
<script src="../_static/js/html5shiv.min.js"></script>
<![endif]-->
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js"></script>
<script src="../_static/translations.js"></script>
<script type="text/javascript" src="../_static/js/theme.js"></script>
<link rel="index" title="Алфавитный указатель" href="../genindex.html" />
<link rel="search" title="Поиск" href="../search.html" />
<link rel="next" title="1. Description" href="../Orchestrator/01_Orchestrator.html" />
<link rel="prev" title="1. Описание" href="01_Studio.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../index.html" class="icon icon-home"> pyOpenRPA v1.2.12
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="Поиск в документации" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<p class="caption"><span class="caption-text">ОБЩЕЕ</span></p>
<ul>
<li class="toctree-l1"><a class="reference external" href="https://pyopenrpa.ru/wiki/guide/index">Выбрать версию</a></li>
<li class="toctree-l1"><a class="reference internal" href="../01_HowToInstall.html">1. Первый запуск</a></li>
<li class="toctree-l1"><a class="reference internal" href="../03_Copyrights_Contacts.html">2. Права &amp; Контакты</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ РОБОТ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Robot/01_Robot.html">1. Описание</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Robot/02_Defs.html">2. Функции</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Robot/03_HowToUse.html">3. Как использовать?</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Robot/04_Dependencies.html">4. Зависимости</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ СТУДИЯ</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="01_Studio.html">1. Описание</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">2. Как использовать?</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#content">Content</a></li>
<li class="toctree-l2"><a class="reference internal" href="#how-to-run">How to run</a></li>
<li class="toctree-l2"><a class="reference internal" href="#ui-description">UI Description</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#gui-screenshot-1">GUI Screenshot 1</a></li>
<li class="toctree-l3"><a class="reference internal" href="#gui-screenshot-2">GUI Screenshot 2</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#how-to-extract-ui-tree">How to extract UI tree</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#action-click-the-button-expand">Action: Click the button «Expand»</a></li>
<li class="toctree-l3"><a class="reference internal" href="#result">Result</a></li>
<li class="toctree-l3"><a class="reference internal" href="#how-to-search-ui-object-by-mouse-hover">How to search UI object by mouse hover</a></li>
<li class="toctree-l3"><a class="reference internal" href="#action-click-the-button-mouse-search">Action: Click the button «Mouse search»</a></li>
<li class="toctree-l3"><a class="reference internal" href="#action-turn-mouse-on-the-ui-object-you-are-interested-and-hold-the-ctrl-key-for-3-seconds">Action: Turn mouse on the UI object you are interested and hold the «Ctrl» key for 3 seconds</a></li>
<li class="toctree-l3"><a class="reference internal" href="#result-the-interested-ui-object-will-be-shown-in-ui-tree-viewer">Result: The interested UI object will be shown in <code class="docutils literal notranslate"><span class="pre">UI</span> <span class="pre">tree</span> <span class="pre">viewer</span></code></a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#how-to-extract-ui-object-properties">How to extract UI object properties</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#action-choose-the-ui-object-you-are-interested-and-click-it">Action: Choose the UI object you are interested and click it</a></li>
<li class="toctree-l3"><a class="reference internal" href="#result-the-ui-object-property-list-will-be-shown-in-selected-ui-object-property-list">Result: The UI object property list will be shown in <code class="docutils literal notranslate"><span class="pre">Selected</span> <span class="pre">UI</span> <span class="pre">object</span> <span class="pre">property</span> <span class="pre">list</span></code></a></li>
</ul>
</li>
</ul>
</li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ ОРКЕСТРАТОР</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/01_Orchestrator.html">1. Description</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/02_Defs.html">2. Defs</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/03_gSettingsTemplate.html">3. gSettings Template</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/04_HowToUse.html">4. How to use</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/05_UAC.html">5. UAC - User Access Control</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/06_Defs%20Managers.html">6. Defs Managers</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ АГЕНТ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Agent/02_Defs.html">2. Defs</a></li>
</ul>
<p class="caption"><span class="caption-text">ИНСТРУМЕНТЫ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Tools/02_Defs.html">2. Defs StopSafe</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../index.html">pyOpenRPA v1.2.12</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="../index.html" class="icon icon-home"></a> &raquo;</li>
<li>2. Как использовать?</li>
<li class="wy-breadcrumbs-aside">
<a href="../_sources/Studio/02_HowToUse.rst.txt" rel="nofollow"> Просмотреть исходный код страницы</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="id1">
<h1>2. Как использовать?<a class="headerlink" href="#id1" title="Ссылка на этот заголовок"></a></h1>
<div class="section" id="content">
<h2>Content<a class="headerlink" href="#content" title="Ссылка на этот заголовок"></a></h2>
<ul class="simple">
<li><p><a class="reference external" href="#how-to-run">How to run</a></p></li>
<li><p><a class="reference external" href="#ui-description">UI Description</a></p></li>
<li><p><a class="reference external" href="#how-to-extract-ui-tree">How to extract UI tree</a></p></li>
<li><p><a class="reference external" href="#how-to-search-ui-object-by-mouse-hover">How to search UI object by mouse
hover</a></p></li>
<li><p><a class="reference external" href="#how-to-extract-ui-object-properties">How to extract UI object
properties</a></p></li>
</ul>
</div>
<div class="section" id="how-to-run">
<h2>How to run<a class="headerlink" href="#how-to-run" title="Ссылка на этот заголовок"></a></h2>
<ul class="simple">
<li><p>For OS x32</p></li>
<li><p>Run (double click): OpenRPA_32.cmd (for OS x32)</p></li>
<li><p>For OS x64</p></li>
<li><p>Run (double click): OpenRPA_64.cmd (for OS x64)</p></li>
<li><p>Wait text «running server» in console. Default browser will be open
automatically</p></li>
<li><p><strong>Attention!</strong> The studio tool does not support the Internet explorer
(any version) for GUI rendering (lol)</p></li>
</ul>
<img alt="504b98f76747f63900a2943532a946bb.png" src="img/504b98f76747f63900a2943532a946bb.png" />
</div>
<div class="section" id="ui-description">
<h2>UI Description<a class="headerlink" href="#ui-description" title="Ссылка на этот заголовок"></a></h2>
<p><strong>The studio tool GUI contains of:</strong></p>
<ol class="arabic simple">
<li><p>UI tree viewer</p></li>
<li><p>Selected UI object hierarchy list</p></li>
<li><p>Selected UI object property list</p></li>
<li><p>UIO selector editor</p></li>
<li><p>UIO action panel</p></li>
<li><p>Another Python activity panel</p></li>
<li><p>Action/activity list</p></li>
</ol>
<p><em>Look it on the GUI screenshots are listed below</em></p>
<div class="section" id="gui-screenshot-1">
<h3>GUI Screenshot 1<a class="headerlink" href="#gui-screenshot-1" title="Ссылка на этот заголовок"></a></h3>
<img alt="504b98f76747f63900a2943532a946bb.png" src="img/d3d6ad14a7e50843bd89d2b14a092fee.png" />
</div>
<div class="section" id="gui-screenshot-2">
<h3>GUI Screenshot 2<a class="headerlink" href="#gui-screenshot-2" title="Ссылка на этот заголовок"></a></h3>
<img alt="65b7d51c0a5b21e6b27dc23d4062d3ca.png" src="img/65b7d51c0a5b21e6b27dc23d4062d3ca.png" />
</div>
</div>
<div class="section" id="how-to-extract-ui-tree">
<h2>How to extract UI tree<a class="headerlink" href="#how-to-extract-ui-tree" title="Ссылка на этот заголовок"></a></h2>
<p>In order to extract the UI tree do the following: in <code class="docutils literal notranslate"><span class="pre">UI</span> <span class="pre">tree</span> <span class="pre">viewer</span></code>
choose the object you are interested and click the button «Expand». ##</p>
<div class="section" id="action-click-the-button-expand">
<h3>Action: Click the button «Expand»<a class="headerlink" href="#action-click-the-button-expand" title="Ссылка на этот заголовок"></a></h3>
<img alt="6effc376ff6ea928840674bd744caced.png" src="img/6effc376ff6ea928840674bd744caced.png" />
</div>
<div class="section" id="result">
<h3>Result<a class="headerlink" href="#result" title="Ссылка на этот заголовок"></a></h3>
<img alt="18b9ab36126c8c32168bf5bbb9330701.png" src="img/18b9ab36126c8c32168bf5bbb9330701.png" />
</div>
<div class="section" id="how-to-search-ui-object-by-mouse-hover">
<h3>How to search UI object by mouse hover<a class="headerlink" href="#how-to-search-ui-object-by-mouse-hover" title="Ссылка на этот заголовок"></a></h3>
<p>In order to search UI object do the
following: in <code class="docutils literal notranslate"><span class="pre">UI</span> <span class="pre">tree</span> <span class="pre">viewer</span></code> choose the parent object, where you are
want to search UI object, and click the button «Mouse search». The mouse
search mode will start. Turn mouse on the UI object you are interested
and wait when the studio will highlight the UI object. After the
hightlight hold the «Ctrl» key and wait 3 seconds. The interested UI
object will be shown in <code class="docutils literal notranslate"><span class="pre">UI</span> <span class="pre">tree</span> <span class="pre">viewer</span></code>.</p>
</div>
<div class="section" id="action-click-the-button-mouse-search">
<h3>Action: Click the button «Mouse search»<a class="headerlink" href="#action-click-the-button-mouse-search" title="Ссылка на этот заголовок"></a></h3>
<img alt="84d7e4de0c840631f87cf7b325b53ad8.png" src="img/84d7e4de0c840631f87cf7b325b53ad8.png" />
</div>
<div class="section" id="action-turn-mouse-on-the-ui-object-you-are-interested-and-hold-the-ctrl-key-for-3-seconds">
<h3>Action: Turn mouse on the UI object you are interested and hold the «Ctrl» key for 3 seconds<a class="headerlink" href="#action-turn-mouse-on-the-ui-object-you-are-interested-and-hold-the-ctrl-key-for-3-seconds" title="Ссылка на этот заголовок"></a></h3>
<img alt="b7c38d622bf5b7afa5b26d1686d7302a.png" src="img/b7c38d622bf5b7afa5b26d1686d7302a.png" />
</div>
<div class="section" id="result-the-interested-ui-object-will-be-shown-in-ui-tree-viewer">
<h3>Result: The interested UI object will be shown in <code class="docutils literal notranslate"><span class="pre">UI</span> <span class="pre">tree</span> <span class="pre">viewer</span></code><a class="headerlink" href="#result-the-interested-ui-object-will-be-shown-in-ui-tree-viewer" title="Ссылка на этот заголовок"></a></h3>
<img alt="629bbf4db2c01b9c640194230949fcd2.png" src="img/629bbf4db2c01b9c640194230949fcd2.png" />
</div>
</div>
<div class="section" id="how-to-extract-ui-object-properties">
<h2>How to extract UI object properties<a class="headerlink" href="#how-to-extract-ui-object-properties" title="Ссылка на этот заголовок"></a></h2>
<p>In order to extract UI object properties do the following: in
<code class="docutils literal notranslate"><span class="pre">Selected</span> <span class="pre">UI</span> <span class="pre">object</span> <span class="pre">hierarchy</span> <span class="pre">list</span></code> choose the UI object you are
interested and click it. The UI object property list will be shown in
<code class="docutils literal notranslate"><span class="pre">Selected</span> <span class="pre">UI</span> <span class="pre">object</span> <span class="pre">property</span> <span class="pre">list</span></code></p>
<div class="section" id="action-choose-the-ui-object-you-are-interested-and-click-it">
<h3>Action: Choose the UI object you are interested and click it<a class="headerlink" href="#action-choose-the-ui-object-you-are-interested-and-click-it" title="Ссылка на этот заголовок"></a></h3>
<img alt="2c27be5bdde20b5d062cbb40e74eaec5.png" src="img/2c27be5bdde20b5d062cbb40e74eaec5.png" />
</div>
<div class="section" id="result-the-ui-object-property-list-will-be-shown-in-selected-ui-object-property-list">
<h3>Result: The UI object property list will be shown in <code class="docutils literal notranslate"><span class="pre">Selected</span> <span class="pre">UI</span> <span class="pre">object</span> <span class="pre">property</span> <span class="pre">list</span></code><a class="headerlink" href="#result-the-ui-object-property-list-will-be-shown-in-selected-ui-object-property-list" title="Ссылка на этот заголовок"></a></h3>
<img alt="f235ae29099a713e0246cd574ac3a17c.png" src="img/f235ae29099a713e0246cd574ac3a17c.png" />
<p> .. v1.2.12 replace:: v1.2.12
.. <a href="#id2"><span class="problematic" id="id3">|author|</span></a> replace:: Ivan Maslov &lt;<a class="reference external" href="mailto:ivan&#46;maslov&#37;&#52;&#48;unicodelabs&#46;ru">ivan<span>&#46;</span>maslov<span>&#64;</span>unicodelabs<span>&#46;</span>ru</a>&gt;</p>
<p></p>
</div>
</div>
</div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="../Orchestrator/01_Orchestrator.html" class="btn btn-neutral float-right" title="1. Description" accesskey="n" rel="next">Следующая <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
<a href="01_Studio.html" class="btn btn-neutral float-left" title="1. Описание" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Предыдущая</a>
</div>
<hr/>
<div role="contentinfo">
<p>
&#169; Copyright 2022, ООО &#34;ОПЕН РПА&#34;.
</p>
</div>
Собрано при помощи <a href="https://www.sphinx-doc.org/">Sphinx</a> с использованием
<a href="https://github.com/readthedocs/sphinx_rtd_theme">темы,</a>
предоставленной <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

@ -0,0 +1,319 @@
<!DOCTYPE html>
<html class="writer-html5" lang="ru" >
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>2. Defs StopSafe &mdash; документация pyOpenRPA v1.2.12 v1.2.12</title>
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="shortcut icon" href="../_static/favicon.ico"/>
<!--[if lt IE 9]>
<script src="../_static/js/html5shiv.min.js"></script>
<![endif]-->
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js"></script>
<script src="../_static/translations.js"></script>
<script type="text/javascript" src="../_static/js/theme.js"></script>
<link rel="index" title="Алфавитный указатель" href="../genindex.html" />
<link rel="search" title="Поиск" href="../search.html" />
<link rel="prev" title="2. Defs" href="../Agent/02_Defs.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../index.html" class="icon icon-home"> pyOpenRPA v1.2.12
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="Поиск в документации" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<p class="caption"><span class="caption-text">ОБЩЕЕ</span></p>
<ul>
<li class="toctree-l1"><a class="reference external" href="https://pyopenrpa.ru/wiki/guide/index">Выбрать версию</a></li>
<li class="toctree-l1"><a class="reference internal" href="../01_HowToInstall.html">1. Первый запуск</a></li>
<li class="toctree-l1"><a class="reference internal" href="../03_Copyrights_Contacts.html">2. Права &amp; Контакты</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ РОБОТ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Robot/01_Robot.html">1. Описание</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Robot/02_Defs.html">2. Функции</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Robot/03_HowToUse.html">3. Как использовать?</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Robot/04_Dependencies.html">4. Зависимости</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ СТУДИЯ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Studio/01_Studio.html">1. Описание</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Studio/02_HowToUse.html">2. Как использовать?</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ ОРКЕСТРАТОР</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/01_Orchestrator.html">1. Description</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/02_Defs.html">2. Defs</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/03_gSettingsTemplate.html">3. gSettings Template</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/04_HowToUse.html">4. How to use</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/05_UAC.html">5. UAC - User Access Control</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/06_Defs%20Managers.html">6. Defs Managers</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ АГЕНТ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Agent/02_Defs.html">2. Defs</a></li>
</ul>
<p class="caption"><span class="caption-text">ИНСТРУМЕНТЫ</span></p>
<ul class="current">
<li class="toctree-l1 current"><a class="current reference internal" href="#">2. Defs StopSafe</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#references">References</a></li>
</ul>
</li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../index.html">pyOpenRPA v1.2.12</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="../index.html" class="icon icon-home"></a> &raquo;</li>
<li>2. Defs StopSafe</li>
<li class="wy-breadcrumbs-aside">
<a href="../_sources/Tools/02_Defs.rst.txt" rel="nofollow"> Просмотреть исходный код страницы</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="defs-stopsafe">
<h1>2. Defs StopSafe<a class="headerlink" href="#defs-stopsafe" title="Ссылка на этот заголовок"></a></h1>
<p>How to use StopSafe on the robot side</p>
<span class="target" id="module-pyOpenRPA.Tools.StopSafe"></span><p># How to use
# from pyOpenRPA.Tools import StopSafe
# StopSafe.Init(inLogger=None)
# StopSafe.IsSafeStop() # True - WM_CLOSE SIGNAL has come. taskkill /im someprocess.exe</p>
<p><strong>Functions:</strong></p>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Tools.StopSafe.Init" title="pyOpenRPA.Tools.StopSafe.Init"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Init</span></code></a>([inLogger])</p></td>
<td><p>Init the StopSafe module.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Tools.StopSafe.IsStopSafe" title="pyOpenRPA.Tools.StopSafe.IsStopSafe"><code class="xref py py-obj docutils literal notranslate"><span class="pre">IsStopSafe</span></code></a>()</p></td>
<td><p>Check if stop signal has come.</p></td>
</tr>
</tbody>
</table>
<dl class="py function">
<dt id="pyOpenRPA.Tools.StopSafe.Init">
<code class="sig-prename descclassname">pyOpenRPA.Tools.StopSafe.</code><code class="sig-name descname">Init</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inLogger</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Tools/StopSafe.html#Init"><span class="viewcode-link">[исходный код]</span></a><a class="headerlink" href="#pyOpenRPA.Tools.StopSafe.Init" title="Ссылка на это определение"></a></dt>
<dd><p>Init the StopSafe module. After that you can use def IsStopSafe() to check if close signal has come.</p>
<dl class="field-list simple">
<dt class="field-odd">Параметры</dt>
<dd class="field-odd"><p><strong>inLogger</strong> Logger to log messages about StopSafe</p>
</dd>
<dt class="field-even">Результат</dt>
<dd class="field-even"><p></p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="pyOpenRPA.Tools.StopSafe.IsStopSafe">
<code class="sig-prename descclassname">pyOpenRPA.Tools.StopSafe.</code><code class="sig-name descname">IsStopSafe</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Tools/StopSafe.html#IsStopSafe"><span class="viewcode-link">[исходный код]</span></a><a class="headerlink" href="#pyOpenRPA.Tools.StopSafe.IsStopSafe" title="Ссылка на это определение"></a></dt>
<dd><p>Check if stop signal has come.</p>
<dl class="field-list simple">
<dt class="field-odd">Результат</dt>
<dd class="field-odd"><p></p>
</dd>
</dl>
</dd></dl>
<span class="target" id="module-pyOpenRPA.Tools.Debugger"></span><p><strong>Functions:</strong></p>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Tools.Debugger.LiveDebugCheckThread" title="pyOpenRPA.Tools.Debugger.LiveDebugCheckThread"><code class="xref py py-obj docutils literal notranslate"><span class="pre">LiveDebugCheckThread</span></code></a>(**inKWARGS)</p></td>
<td><p>Create thread to wait file appear «init_debug» in the working directory.</p></td>
</tr>
</tbody>
</table>
<dl class="py function">
<dt id="pyOpenRPA.Tools.Debugger.LiveDebugCheckThread">
<code class="sig-prename descclassname">pyOpenRPA.Tools.Debugger.</code><code class="sig-name descname">LiveDebugCheckThread</code><span class="sig-paren">(</span><em class="sig-param"><span class="o">**</span><span class="n">inKWARGS</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Tools/Debugger.html#LiveDebugCheckThread"><span class="viewcode-link">[исходный код]</span></a><a class="headerlink" href="#pyOpenRPA.Tools.Debugger.LiveDebugCheckThread" title="Ссылка на это определение"></a></dt>
<dd><p>Create thread to wait file appear «init_debug» in the working directory.</p>
</dd></dl>
<div class="section" id="references">
<h2>References<a class="headerlink" href="#references" title="Ссылка на этот заголовок"></a></h2>
<p><a class="reference external" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> <a class="footnote-reference brackets" href="#id3" id="id4">1</a></p>
<dl class="footnote brackets">
<dt class="label" id="id3"><span class="brackets"><a class="fn-backref" href="#id4">1</a></span></dt>
<dd><p><a class="reference external" href="http://docutils.sourceforge.net/rst.html">http://docutils.sourceforge.net/rst.html</a></p>
</dd>
</dl>
<p> .. v1.2.12 replace:: v1.2.12
.. <a href="#id1"><span class="problematic" id="id2">|author|</span></a> replace:: Ivan Maslov &lt;<a class="reference external" href="mailto:ivan&#46;maslov&#37;&#52;&#48;unicodelabs&#46;ru">ivan<span>&#46;</span>maslov<span>&#64;</span>unicodelabs<span>&#46;</span>ru</a>&gt;</p>
<p></p>
</div>
</div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="../Agent/02_Defs.html" class="btn btn-neutral float-left" title="2. Defs" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Предыдущая</a>
</div>
<hr/>
<div role="contentinfo">
<p>
&#169; Copyright 2022, ООО &#34;ОПЕН РПА&#34;.
</p>
</div>
Собрано при помощи <a href="https://www.sphinx-doc.org/">Sphinx</a> с использованием
<a href="https://github.com/readthedocs/sphinx_rtd_theme">темы,</a>
предоставленной <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

@ -0,0 +1,239 @@
<!DOCTYPE html>
<html class="writer-html5" lang="ru" >
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Обзор: исходный код модуля &mdash; документация pyOpenRPA v1.2.12 v1.2.12</title>
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="shortcut icon" href="../_static/favicon.ico"/>
<!--[if lt IE 9]>
<script src="../_static/js/html5shiv.min.js"></script>
<![endif]-->
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js"></script>
<script src="../_static/translations.js"></script>
<script type="text/javascript" src="../_static/js/theme.js"></script>
<link rel="index" title="Алфавитный указатель" href="../genindex.html" />
<link rel="search" title="Поиск" href="../search.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../index.html" class="icon icon-home"> pyOpenRPA v1.2.12
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="Поиск в документации" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<p class="caption"><span class="caption-text">ОБЩЕЕ</span></p>
<ul>
<li class="toctree-l1"><a class="reference external" href="https://pyopenrpa.ru/wiki/guide/index">Выбрать версию</a></li>
<li class="toctree-l1"><a class="reference internal" href="../01_HowToInstall.html">1. Первый запуск</a></li>
<li class="toctree-l1"><a class="reference internal" href="../03_Copyrights_Contacts.html">2. Права &amp; Контакты</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ РОБОТ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Robot/01_Robot.html">1. Описание</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Robot/02_Defs.html">2. Функции</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Robot/03_HowToUse.html">3. Как использовать?</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Robot/04_Dependencies.html">4. Зависимости</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ СТУДИЯ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Studio/01_Studio.html">1. Описание</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Studio/02_HowToUse.html">2. Как использовать?</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ ОРКЕСТРАТОР</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/01_Orchestrator.html">1. Description</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/02_Defs.html">2. Defs</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/03_gSettingsTemplate.html">3. gSettings Template</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/04_HowToUse.html">4. How to use</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/05_UAC.html">5. UAC - User Access Control</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/06_Defs%20Managers.html">6. Defs Managers</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ АГЕНТ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Agent/02_Defs.html">2. Defs</a></li>
</ul>
<p class="caption"><span class="caption-text">ИНСТРУМЕНТЫ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Tools/02_Defs.html">2. Defs StopSafe</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../index.html">pyOpenRPA v1.2.12</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="../index.html" class="icon icon-home"></a> &raquo;</li>
<li>Обзор: исходный код модуля</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<h1>Все модули, в которых есть код</h1>
<ul><li><a href="pyOpenRPA/Agent/__Agent__.html">pyOpenRPA.Agent.__Agent__</a></li>
<li><a href="pyOpenRPA/Orchestrator/Managers/ControlPanel.html">pyOpenRPA.Orchestrator.Managers.ControlPanel</a></li>
<li><a href="pyOpenRPA/Orchestrator/Managers/Process.html">pyOpenRPA.Orchestrator.Managers.Process</a></li>
<li><a href="pyOpenRPA/Orchestrator/Web/Basic.html">pyOpenRPA.Orchestrator.Web.Basic</a></li>
<li><a href="pyOpenRPA/Orchestrator/__Orchestrator__.html">pyOpenRPA.Orchestrator.__Orchestrator__</a></li>
<li><a href="pyOpenRPA/Robot/UIDesktop.html">pyOpenRPA.Robot.UIDesktop</a></li>
<li><a href="pyOpenRPA/Tools/Debugger.html">pyOpenRPA.Tools.Debugger</a></li>
<li><a href="pyOpenRPA/Tools/StopSafe.html">pyOpenRPA.Tools.StopSafe</a></li>
</ul>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>
&#169; Copyright 2022, ООО &#34;ОПЕН РПА&#34;.
</p>
</div>
Собрано при помощи <a href="https://www.sphinx-doc.org/">Sphinx</a> с использованием
<a href="https://github.com/readthedocs/sphinx_rtd_theme">темы,</a>
предоставленной <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>

@ -0,0 +1,483 @@
<!DOCTYPE html>
<html class="writer-html5" lang="ru" >
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>pyOpenRPA.Agent.__Agent__ &mdash; документация pyOpenRPA v1.2.12 v1.2.12</title>
<link rel="stylesheet" href="../../../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
<link rel="shortcut icon" href="../../../_static/favicon.ico"/>
<!--[if lt IE 9]>
<script src="../../../_static/js/html5shiv.min.js"></script>
<![endif]-->
<script type="text/javascript" id="documentation_options" data-url_root="../../../" src="../../../_static/documentation_options.js"></script>
<script src="../../../_static/jquery.js"></script>
<script src="../../../_static/underscore.js"></script>
<script src="../../../_static/doctools.js"></script>
<script src="../../../_static/translations.js"></script>
<script type="text/javascript" src="../../../_static/js/theme.js"></script>
<link rel="index" title="Алфавитный указатель" href="../../../genindex.html" />
<link rel="search" title="Поиск" href="../../../search.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../../../index.html" class="icon icon-home"> pyOpenRPA v1.2.12
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../../search.html" method="get">
<input type="text" name="q" placeholder="Поиск в документации" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<p class="caption"><span class="caption-text">ОБЩЕЕ</span></p>
<ul>
<li class="toctree-l1"><a class="reference external" href="https://pyopenrpa.ru/wiki/guide/index">Выбрать версию</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../01_HowToInstall.html">1. Первый запуск</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../03_Copyrights_Contacts.html">2. Права &amp; Контакты</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ РОБОТ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../Robot/01_Robot.html">1. Описание</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../Robot/02_Defs.html">2. Функции</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../Robot/03_HowToUse.html">3. Как использовать?</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../Robot/04_Dependencies.html">4. Зависимости</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ СТУДИЯ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../Studio/01_Studio.html">1. Описание</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../Studio/02_HowToUse.html">2. Как использовать?</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ ОРКЕСТРАТОР</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../Orchestrator/01_Orchestrator.html">1. Description</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../Orchestrator/02_Defs.html">2. Defs</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../Orchestrator/03_gSettingsTemplate.html">3. gSettings Template</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../Orchestrator/04_HowToUse.html">4. How to use</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../Orchestrator/05_UAC.html">5. UAC - User Access Control</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../Orchestrator/06_Defs%20Managers.html">6. Defs Managers</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ АГЕНТ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../Agent/02_Defs.html">2. Defs</a></li>
</ul>
<p class="caption"><span class="caption-text">ИНСТРУМЕНТЫ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../Tools/02_Defs.html">2. Defs StopSafe</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../../../index.html">pyOpenRPA v1.2.12</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="../../../index.html" class="icon icon-home"></a> &raquo;</li>
<li><a href="../../index.html">Код модуля</a> &raquo;</li>
<li>pyOpenRPA.Agent.__Agent__</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<h1>Исходный код pyOpenRPA.Agent.__Agent__</h1><div class="highlight"><pre>
<span></span><span class="kn">import</span> <span class="nn">threading</span><span class="o">,</span> <span class="nn">socket</span><span class="o">,</span> <span class="nn">getpass</span><span class="o">,</span> <span class="nn">sys</span><span class="o">,</span> <span class="nn">uuid</span><span class="o">,</span> <span class="nn">subprocess</span><span class="o">,</span> <span class="nn">base64</span><span class="o">,</span> <span class="nn">psutil</span><span class="o">,</span> <span class="nn">getpass</span><span class="o">,</span> <span class="nn">time</span>
<span class="kn">from</span> <span class="nn">.</span> <span class="kn">import</span> <span class="n">O2A</span><span class="p">,</span> <span class="n">A2O</span> <span class="c1"># Data flow Orchestrator To Agent</span>
<span class="kn">from</span> <span class="nn">.</span> <span class="kn">import</span> <span class="n">Processor</span> <span class="c1"># Processor Queue</span>
<span class="kn">from</span> <span class="nn">..Tools</span> <span class="kn">import</span> <span class="n">Usage</span>
<span class="kn">from</span> <span class="nn">..Tools</span> <span class="kn">import</span> <span class="n">License</span>
<span class="kn">from</span> <span class="nn">subprocess</span> <span class="kn">import</span> <span class="n">CREATE_NEW_CONSOLE</span> <span class="c1"># Flag to create new process in another CMD</span>
<span class="kn">import</span> <span class="nn">os</span>
<span class="n">gSettings</span> <span class="o">=</span> <span class="kc">None</span>
<span class="c1"># Create binary file by the base64 string (safe for JSON transmition)</span>
<div class="viewcode-block" id="OSFileBinaryDataBase64StrCreate"><a class="viewcode-back" href="../../../Agent/02_Defs.html#pyOpenRPA.Agent.__Agent__.OSFileBinaryDataBase64StrCreate">[документация]</a><span class="k">def</span> <span class="nf">OSFileBinaryDataBase64StrCreate</span><span class="p">(</span><span class="n">inFilePathStr</span><span class="p">,</span> <span class="n">inFileDataBase64Str</span><span class="p">,</span><span class="n">inGSettings</span> <span class="o">=</span> <span class="kc">None</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Create binary file by the base64 string (safe for JSON transmition)</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">lFile</span> <span class="o">=</span> <span class="nb">open</span><span class="p">(</span><span class="n">inFilePathStr</span><span class="p">,</span> <span class="s2">&quot;wb&quot;</span><span class="p">)</span>
<span class="n">lFile</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">base64</span><span class="o">.</span><span class="n">b64decode</span><span class="p">(</span><span class="n">inFileDataBase64Str</span><span class="p">))</span>
<span class="n">lFile</span><span class="o">.</span><span class="n">close</span><span class="p">()</span>
<span class="n">lL</span> <span class="o">=</span> <span class="n">inGSettings</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;Logger&quot;</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span> <span class="k">if</span> <span class="nb">type</span><span class="p">(</span><span class="n">inGSettings</span><span class="p">)</span> <span class="ow">is</span> <span class="nb">dict</span> <span class="k">else</span> <span class="kc">None</span>
<span class="n">lMessageStr</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot;AGENT Binary file </span><span class="si">{</span><span class="n">inFilePathStr</span><span class="si">}</span><span class="s2"> has been created.&quot;</span>
<span class="k">if</span> <span class="n">lL</span><span class="p">:</span> <span class="n">lL</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="n">lMessageStr</span><span class="p">)</span>
<span class="n">A2O</span><span class="o">.</span><span class="n">LogListSend</span><span class="p">(</span><span class="n">inGSettings</span><span class="o">=</span><span class="n">inGSettings</span><span class="p">,</span> <span class="n">inLogList</span><span class="o">=</span><span class="p">[</span><span class="n">lMessageStr</span><span class="p">])</span></div>
<span class="c1"># Append binary file by the base64 string (safe for JSON transmition)</span>
<div class="viewcode-block" id="OSFileBinaryDataBase64StrAppend"><a class="viewcode-back" href="../../../Agent/02_Defs.html#pyOpenRPA.Agent.__Agent__.OSFileBinaryDataBase64StrAppend">[документация]</a><span class="k">def</span> <span class="nf">OSFileBinaryDataBase64StrAppend</span><span class="p">(</span><span class="n">inFilePathStr</span><span class="p">,</span> <span class="n">inFileDataBase64Str</span><span class="p">,</span><span class="n">inGSettings</span> <span class="o">=</span> <span class="kc">None</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Create binary file by the base64 string (safe for JSON transmition)</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">lFile</span> <span class="o">=</span> <span class="nb">open</span><span class="p">(</span><span class="n">inFilePathStr</span><span class="p">,</span> <span class="s2">&quot;ab&quot;</span><span class="p">)</span>
<span class="n">lFile</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">base64</span><span class="o">.</span><span class="n">b64decode</span><span class="p">(</span><span class="n">inFileDataBase64Str</span><span class="p">))</span>
<span class="n">lFile</span><span class="o">.</span><span class="n">close</span><span class="p">()</span>
<span class="n">lL</span> <span class="o">=</span> <span class="n">inGSettings</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;Logger&quot;</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span> <span class="k">if</span> <span class="nb">type</span><span class="p">(</span><span class="n">inGSettings</span><span class="p">)</span> <span class="ow">is</span> <span class="nb">dict</span> <span class="k">else</span> <span class="kc">None</span>
<span class="n">lMessageStr</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot;AGENT Binary file </span><span class="si">{</span><span class="n">inFilePathStr</span><span class="si">}</span><span class="s2"> has been appended.&quot;</span>
<span class="k">if</span> <span class="n">lL</span><span class="p">:</span> <span class="n">lL</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="n">lMessageStr</span><span class="p">)</span>
<span class="n">A2O</span><span class="o">.</span><span class="n">LogListSend</span><span class="p">(</span><span class="n">inGSettings</span><span class="o">=</span><span class="n">inGSettings</span><span class="p">,</span> <span class="n">inLogList</span><span class="o">=</span><span class="p">[</span><span class="n">lMessageStr</span><span class="p">])</span></div>
<span class="c1"># Create text file by the string</span>
<div class="viewcode-block" id="OSFileTextDataStrCreate"><a class="viewcode-back" href="../../../Agent/02_Defs.html#pyOpenRPA.Agent.__Agent__.OSFileTextDataStrCreate">[документация]</a><span class="k">def</span> <span class="nf">OSFileTextDataStrCreate</span><span class="p">(</span><span class="n">inFilePathStr</span><span class="p">,</span> <span class="n">inFileDataStr</span><span class="p">,</span> <span class="n">inEncodingStr</span> <span class="o">=</span> <span class="s2">&quot;utf-8&quot;</span><span class="p">,</span><span class="n">inGSettings</span> <span class="o">=</span> <span class="kc">None</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Create text file in the agent GUI session</span>
<span class="sd"> :param inFilePathStr: File abs path</span>
<span class="sd"> :param inFileDataStr: File data text content</span>
<span class="sd"> :param inEncodingStr: Write file encoding</span>
<span class="sd"> :param inGSettings: global settings of the Agent (singleton)</span>
<span class="sd"> :return:</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">lFile</span> <span class="o">=</span> <span class="nb">open</span><span class="p">(</span><span class="n">inFilePathStr</span><span class="p">,</span> <span class="s2">&quot;w&quot;</span><span class="p">,</span> <span class="n">encoding</span><span class="o">=</span><span class="n">inEncodingStr</span><span class="p">)</span>
<span class="n">lFile</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">inFileDataStr</span><span class="p">)</span>
<span class="n">lFile</span><span class="o">.</span><span class="n">close</span><span class="p">()</span>
<span class="n">lL</span> <span class="o">=</span> <span class="n">inGSettings</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;Logger&quot;</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span> <span class="k">if</span> <span class="nb">type</span><span class="p">(</span><span class="n">inGSettings</span><span class="p">)</span> <span class="ow">is</span> <span class="nb">dict</span> <span class="k">else</span> <span class="kc">None</span>
<span class="n">lMessageStr</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot;AGENT Text file </span><span class="si">{</span><span class="n">inFilePathStr</span><span class="si">}</span><span class="s2"> has been created.&quot;</span>
<span class="k">if</span> <span class="n">lL</span><span class="p">:</span> <span class="n">lL</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="n">lMessageStr</span><span class="p">)</span>
<span class="n">A2O</span><span class="o">.</span><span class="n">LogListSend</span><span class="p">(</span><span class="n">inGSettings</span><span class="o">=</span><span class="n">inGSettings</span><span class="p">,</span> <span class="n">inLogList</span><span class="o">=</span><span class="p">[</span><span class="n">lMessageStr</span><span class="p">])</span></div>
<div class="viewcode-block" id="OSFileBinaryDataBase64StrReceive"><a class="viewcode-back" href="../../../Agent/02_Defs.html#pyOpenRPA.Agent.__Agent__.OSFileBinaryDataBase64StrReceive">[документация]</a><span class="k">def</span> <span class="nf">OSFileBinaryDataBase64StrReceive</span><span class="p">(</span><span class="n">inFilePathStr</span><span class="p">,</span> <span class="n">inGSettings</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Read binary file and encode in base64 to transmit (safe for JSON transmition)</span>
<span class="sd"> :param inFilePathStr: File path to read</span>
<span class="sd"> :param inGSettings: global settings of the Agent (singleton)</span>
<span class="sd"> :return: File content in string base64 format (use base64.b64decode to decode data). Return None if file is not exist</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">lL</span> <span class="o">=</span> <span class="n">inGSettings</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;Logger&quot;</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span> <span class="k">if</span> <span class="nb">type</span><span class="p">(</span><span class="n">inGSettings</span><span class="p">)</span> <span class="ow">is</span> <span class="nb">dict</span> <span class="k">else</span> <span class="kc">None</span>
<span class="n">lFileDataBase64Str</span> <span class="o">=</span> <span class="kc">None</span>
<span class="k">if</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">exists</span><span class="p">(</span><span class="n">inFilePathStr</span><span class="p">):</span>
<span class="n">lFile</span> <span class="o">=</span> <span class="nb">open</span><span class="p">(</span><span class="n">inFilePathStr</span><span class="p">,</span> <span class="s2">&quot;rb&quot;</span><span class="p">)</span>
<span class="n">lFileDataBytes</span> <span class="o">=</span> <span class="n">lFile</span><span class="o">.</span><span class="n">read</span><span class="p">()</span>
<span class="n">lFile</span><span class="o">.</span><span class="n">close</span><span class="p">()</span>
<span class="n">lFileDataBase64Str</span> <span class="o">=</span> <span class="n">base64</span><span class="o">.</span><span class="n">b64encode</span><span class="p">(</span><span class="n">lFileDataBytes</span><span class="p">)</span><span class="o">.</span><span class="n">decode</span><span class="p">(</span><span class="s2">&quot;utf-8&quot;</span><span class="p">)</span>
<span class="n">lMessageStr</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot;OSFileBinaryDataBase64StrReceive: file </span><span class="si">{</span><span class="n">inFilePathStr</span><span class="si">}</span><span class="s2"> has been read&quot;</span>
<span class="k">if</span> <span class="n">lL</span><span class="p">:</span> <span class="n">lL</span><span class="o">.</span><span class="n">debug</span><span class="p">(</span><span class="n">lMessageStr</span><span class="p">)</span>
<span class="c1">#A2O.LogListSend(inGSettings=inGSettings, inLogList=[lMessageStr])</span>
<span class="k">else</span><span class="p">:</span>
<span class="k">if</span> <span class="n">lL</span><span class="p">:</span> <span class="n">lL</span><span class="o">.</span><span class="n">debug</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;OSFileBinaryDataBase64StrReceive: file </span><span class="si">{</span><span class="n">inFilePathStr</span><span class="si">}</span><span class="s2"> is not exists - return None&quot;</span><span class="p">)</span>
<span class="k">return</span> <span class="n">lFileDataBase64Str</span></div>
<div class="viewcode-block" id="OSFileMTimeGet"><a class="viewcode-back" href="../../../Agent/02_Defs.html#pyOpenRPA.Agent.__Agent__.OSFileMTimeGet">[документация]</a><span class="k">def</span> <span class="nf">OSFileMTimeGet</span><span class="p">(</span><span class="n">inFilePathStr</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">float</span> <span class="ow">or</span> <span class="kc">None</span><span class="p">:</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Read file modification time timestamp format (float)</span>
<span class="sd"> :param inFilePathStr: File path to read</span>
<span class="sd"> :return: timestamp (float) Return None if file is not exist</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">global</span> <span class="n">gSettings</span>
<span class="n">lL</span> <span class="o">=</span> <span class="n">gSettings</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;Logger&quot;</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span> <span class="k">if</span> <span class="nb">type</span><span class="p">(</span><span class="n">gSettings</span><span class="p">)</span> <span class="ow">is</span> <span class="nb">dict</span> <span class="k">else</span> <span class="kc">None</span>
<span class="n">lFileMTimeFloat</span> <span class="o">=</span> <span class="kc">None</span>
<span class="k">if</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">exists</span><span class="p">(</span><span class="n">inFilePathStr</span><span class="p">):</span>
<span class="n">lFileMTimeFloat</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">getmtime</span><span class="p">(</span><span class="n">inFilePathStr</span><span class="p">)</span>
<span class="k">if</span> <span class="n">lL</span><span class="p">:</span> <span class="n">lL</span><span class="o">.</span><span class="n">debug</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;OSFileMTimeGet: file </span><span class="si">{</span><span class="n">inFilePathStr</span><span class="si">}</span><span class="s2"> has been read&quot;</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="k">if</span> <span class="n">lL</span><span class="p">:</span> <span class="n">lL</span><span class="o">.</span><span class="n">debug</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;OSFileMTimeGet: file </span><span class="si">{</span><span class="n">inFilePathStr</span><span class="si">}</span><span class="s2"> is not exists - return None&quot;</span><span class="p">)</span>
<span class="k">return</span> <span class="n">lFileMTimeFloat</span></div>
<div class="viewcode-block" id="OSFileTextDataStrReceive"><a class="viewcode-back" href="../../../Agent/02_Defs.html#pyOpenRPA.Agent.__Agent__.OSFileTextDataStrReceive">[документация]</a><span class="k">def</span> <span class="nf">OSFileTextDataStrReceive</span><span class="p">(</span><span class="n">inFilePathStr</span><span class="p">,</span> <span class="n">inEncodingStr</span><span class="o">=</span><span class="s2">&quot;utf-8&quot;</span><span class="p">,</span> <span class="n">inGSettings</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Read text file in the agent GUI session</span>
<span class="sd"> :param inFilePathStr: File abs path</span>
<span class="sd"> :param inEncodingStr: Read file encoding. Default utf-8</span>
<span class="sd"> :param inGSettings: global settings of the Agent (singleton)</span>
<span class="sd"> :return: File text content in string format (use base64.b64decode to decode data). Return None if file is not exist</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">lFileDataStr</span> <span class="o">=</span> <span class="kc">None</span>
<span class="n">lL</span> <span class="o">=</span> <span class="n">inGSettings</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;Logger&quot;</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span> <span class="k">if</span> <span class="nb">type</span><span class="p">(</span><span class="n">inGSettings</span><span class="p">)</span> <span class="ow">is</span> <span class="nb">dict</span> <span class="k">else</span> <span class="kc">None</span>
<span class="k">if</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">exists</span><span class="p">(</span><span class="n">inFilePathStr</span><span class="p">):</span>
<span class="n">lFile</span> <span class="o">=</span> <span class="nb">open</span><span class="p">(</span><span class="n">inFilePathStr</span><span class="p">,</span> <span class="s2">&quot;r&quot;</span><span class="p">,</span> <span class="n">encoding</span><span class="o">=</span><span class="n">inEncodingStr</span><span class="p">)</span>
<span class="n">lFileDataStr</span> <span class="o">=</span> <span class="n">lFile</span><span class="o">.</span><span class="n">read</span><span class="p">()</span>
<span class="n">lFile</span><span class="o">.</span><span class="n">close</span><span class="p">()</span>
<span class="n">lMessageStr</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot;OSFileTextDataStrReceive: file </span><span class="si">{</span><span class="n">inFilePathStr</span><span class="si">}</span><span class="s2"> has been read&quot;</span>
<span class="k">if</span> <span class="n">lL</span><span class="p">:</span> <span class="n">lL</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="n">lMessageStr</span><span class="p">)</span>
<span class="c1">#A2O.LogListSend(inGSettings=inGSettings, inLogList=[lMessageStr])</span>
<span class="k">else</span><span class="p">:</span>
<span class="k">if</span> <span class="n">lL</span><span class="p">:</span> <span class="n">lL</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;OSFileTextDataStrReceive: file </span><span class="si">{</span><span class="n">inFilePathStr</span><span class="si">}</span><span class="s2"> is not exists - return None&quot;</span><span class="p">)</span>
<span class="k">return</span> <span class="n">lFileDataStr</span></div>
<span class="c1"># Send CMD to OS. Result return to log + Orchestrator by the A2O connection</span>
<div class="viewcode-block" id="OSCMD"><a class="viewcode-back" href="../../../Agent/02_Defs.html#pyOpenRPA.Agent.__Agent__.OSCMD">[документация]</a><span class="k">def</span> <span class="nf">OSCMD</span><span class="p">(</span><span class="n">inCMDStr</span><span class="p">,</span> <span class="n">inRunAsyncBool</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> <span class="n">inGSettings</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span> <span class="n">inSendOutputToOrchestratorLogsBool</span> <span class="o">=</span> <span class="kc">True</span><span class="p">,</span> <span class="n">inCMDEncodingStr</span> <span class="o">=</span> <span class="s2">&quot;cp1251&quot;</span><span class="p">,</span> <span class="n">inCaptureBool</span> <span class="o">=</span> <span class="kc">True</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Execute CMD on the Agent daemonic process</span>
<span class="sd"> :param inCMDStr: command to execute on the Agent session</span>
<span class="sd"> :param inRunAsyncBool: True - Agent processor don&#39;t wait execution; False - Agent processor wait cmd execution</span>
<span class="sd"> :param inGSettings: Agent global settings dict</span>
<span class="sd"> :param inSendOutputToOrchestratorLogsBool: True - catch cmd execution output and send it to the Orchestrator logs; Flase - else case; Default True</span>
<span class="sd"> :param inCMDEncodingStr: Set the encoding of the DOS window on the Agent server session. Windows is beautiful :) . Default is &quot;cp1251&quot; early was &quot;cp866&quot; - need test</span>
<span class="sd"> :param inCaptureBool: !ATTENTION! If you need to start absolutely encapsulated app - set this flag as False. If you set True - the app output will come to Agent</span>
<span class="sd"> :return:</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">lResultStr</span> <span class="o">=</span> <span class="s2">&quot;&quot;</span>
<span class="c1"># New feature</span>
<span class="k">if</span> <span class="n">inSendOutputToOrchestratorLogsBool</span> <span class="o">==</span> <span class="kc">False</span> <span class="ow">and</span> <span class="n">inCaptureBool</span> <span class="o">==</span> <span class="kc">False</span><span class="p">:</span>
<span class="n">inCMDStr</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot;start </span><span class="si">{</span><span class="n">inCMDStr</span><span class="si">}</span><span class="s2">&quot;</span>
<span class="c1"># Subdef to listen OS result</span>
<span class="k">def</span> <span class="nf">_CMDRunAndListenLogs</span><span class="p">(</span><span class="n">inCMDStr</span><span class="p">,</span> <span class="n">inSendOutputToOrchestratorLogsBool</span><span class="p">,</span> <span class="n">inCMDEncodingStr</span><span class="p">,</span> <span class="n">inGSettings</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span> <span class="n">inCaptureBool</span> <span class="o">=</span> <span class="kc">True</span><span class="p">):</span>
<span class="n">lL</span> <span class="o">=</span> <span class="n">inGSettings</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;Logger&quot;</span><span class="p">,</span><span class="kc">None</span><span class="p">)</span> <span class="k">if</span> <span class="nb">type</span><span class="p">(</span><span class="n">inGSettings</span><span class="p">)</span> <span class="ow">is</span> <span class="nb">dict</span> <span class="k">else</span> <span class="kc">None</span>
<span class="n">lResultStr</span> <span class="o">=</span> <span class="s2">&quot;&quot;</span>
<span class="n">lOSCMDKeyStr</span> <span class="o">=</span> <span class="nb">str</span><span class="p">(</span><span class="n">uuid</span><span class="o">.</span><span class="n">uuid4</span><span class="p">())[</span><span class="mi">0</span><span class="p">:</span><span class="mi">4</span><span class="p">]</span><span class="o">.</span><span class="n">upper</span><span class="p">()</span>
<span class="n">lCMDProcess</span> <span class="o">=</span> <span class="kc">None</span>
<span class="k">if</span> <span class="n">inCaptureBool</span> <span class="o">==</span> <span class="kc">True</span><span class="p">:</span>
<span class="n">lCMDProcess</span> <span class="o">=</span> <span class="n">subprocess</span><span class="o">.</span><span class="n">Popen</span><span class="p">(</span><span class="sa">f</span><span class="s1">&#39;cmd /c </span><span class="si">{</span><span class="n">inCMDStr</span><span class="si">}</span><span class="s1">&#39;</span><span class="p">,</span> <span class="n">stdout</span><span class="o">=</span><span class="n">subprocess</span><span class="o">.</span><span class="n">PIPE</span><span class="p">,</span> <span class="n">stderr</span><span class="o">=</span><span class="n">subprocess</span><span class="o">.</span><span class="n">STDOUT</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">lCMDProcess</span> <span class="o">=</span> <span class="n">subprocess</span><span class="o">.</span><span class="n">Popen</span><span class="p">(</span><span class="sa">f</span><span class="s1">&#39;cmd /c </span><span class="si">{</span><span class="n">inCMDStr</span><span class="si">}</span><span class="s1">&#39;</span><span class="p">,</span> <span class="n">stdout</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">stderr</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
<span class="n">creationflags</span><span class="o">=</span><span class="n">CREATE_NEW_CONSOLE</span><span class="p">)</span>
<span class="n">lListenBool</span> <span class="o">=</span> <span class="kc">True</span>
<span class="n">lMessageStr</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="n">lOSCMDKeyStr</span><span class="si">}</span><span class="s2">: # # # # AGENT CMD Process has been STARTED # # # # &quot;</span>
<span class="k">if</span> <span class="n">lL</span><span class="p">:</span> <span class="n">lL</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="n">lMessageStr</span><span class="p">)</span>
<span class="k">if</span> <span class="n">inSendOutputToOrchestratorLogsBool</span> <span class="o">==</span> <span class="kc">True</span><span class="p">:</span> <span class="c1"># Capturing can be turned on!</span>
<span class="n">A2O</span><span class="o">.</span><span class="n">LogListSend</span><span class="p">(</span><span class="n">inGSettings</span><span class="o">=</span><span class="n">inGSettings</span><span class="p">,</span><span class="n">inLogList</span><span class="o">=</span><span class="p">[</span><span class="n">lMessageStr</span><span class="p">])</span>
<span class="n">lMessageStr</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="n">lOSCMDKeyStr</span><span class="si">}</span><span class="s2">: </span><span class="si">{</span><span class="n">inCMDStr</span><span class="si">}</span><span class="s2">&quot;</span>
<span class="k">if</span> <span class="n">lL</span><span class="p">:</span> <span class="n">lL</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="n">lMessageStr</span><span class="p">)</span>
<span class="k">if</span> <span class="n">inSendOutputToOrchestratorLogsBool</span> <span class="o">==</span> <span class="kc">True</span><span class="p">:</span> <span class="c1"># Capturing can be turned on!</span>
<span class="n">A2O</span><span class="o">.</span><span class="n">LogListSend</span><span class="p">(</span><span class="n">inGSettings</span><span class="o">=</span><span class="n">inGSettings</span><span class="p">,</span> <span class="n">inLogList</span><span class="o">=</span><span class="p">[</span><span class="n">lMessageStr</span><span class="p">])</span>
<span class="k">while</span> <span class="n">lListenBool</span><span class="p">:</span>
<span class="c1">#if inSendOutputToOrchestratorLogsBool == True: # Capturing can be turned on!</span>
<span class="k">if</span> <span class="n">inCaptureBool</span> <span class="o">==</span> <span class="kc">True</span><span class="p">:</span> <span class="c1"># Capturing can be turned on!</span>
<span class="n">lOutputLineBytes</span> <span class="o">=</span> <span class="n">lCMDProcess</span><span class="o">.</span><span class="n">stdout</span><span class="o">.</span><span class="n">readline</span><span class="p">()</span>
<span class="k">if</span> <span class="n">lOutputLineBytes</span> <span class="o">==</span> <span class="sa">b</span><span class="s2">&quot;&quot;</span><span class="p">:</span>
<span class="n">lListenBool</span> <span class="o">=</span> <span class="kc">False</span>
<span class="n">lStr</span> <span class="o">=</span> <span class="n">lOutputLineBytes</span><span class="o">.</span><span class="n">decode</span><span class="p">(</span><span class="n">inCMDEncodingStr</span><span class="p">)</span> <span class="c1"># was cp866, on win server don&#39;t work properly - set cp1251</span>
<span class="k">if</span> <span class="n">lStr</span><span class="o">.</span><span class="n">endswith</span><span class="p">(</span><span class="s2">&quot;</span><span class="se">\n</span><span class="s2">&quot;</span><span class="p">):</span> <span class="n">lStr</span> <span class="o">=</span> <span class="n">lStr</span><span class="p">[:</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span>
<span class="n">lMessageStr</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="n">lOSCMDKeyStr</span><span class="si">}</span><span class="s2">: </span><span class="si">{</span><span class="n">lStr</span><span class="si">}</span><span class="s2">&quot;</span>
<span class="k">if</span> <span class="n">lL</span><span class="p">:</span> <span class="n">lL</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="n">lMessageStr</span><span class="p">)</span>
<span class="k">if</span> <span class="n">inSendOutputToOrchestratorLogsBool</span> <span class="o">==</span> <span class="kc">True</span><span class="p">:</span> <span class="c1"># Capturing can be turned on!</span>
<span class="n">A2O</span><span class="o">.</span><span class="n">LogListSend</span><span class="p">(</span><span class="n">inGSettings</span><span class="o">=</span><span class="n">inGSettings</span><span class="p">,</span> <span class="n">inLogList</span><span class="o">=</span><span class="p">[</span><span class="n">lMessageStr</span><span class="p">])</span>
<span class="n">lResultStr</span><span class="o">+=</span><span class="n">lStr</span>
<span class="k">else</span><span class="p">:</span> <span class="c1">#Capturing is not turned on - wait until process will be closed</span>
<span class="n">lCMDProcessPoll</span> <span class="o">=</span> <span class="n">lCMDProcess</span><span class="o">.</span><span class="n">poll</span><span class="p">()</span>
<span class="k">if</span> <span class="n">lCMDProcessPoll</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span> <span class="c1"># Process is alive - wait</span>
<span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">lListenBool</span> <span class="o">=</span> <span class="kc">False</span>
<span class="n">lMessageStr</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="n">lOSCMDKeyStr</span><span class="si">}</span><span class="s2">: # # # # AGENT CMD Process has been FINISHED # # # # &quot;</span>
<span class="k">if</span> <span class="n">lL</span><span class="p">:</span> <span class="n">lL</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="n">lMessageStr</span><span class="p">)</span>
<span class="k">if</span> <span class="n">inSendOutputToOrchestratorLogsBool</span> <span class="o">==</span> <span class="kc">True</span><span class="p">:</span> <span class="c1"># Capturing can be turned on!</span>
<span class="n">A2O</span><span class="o">.</span><span class="n">LogListSend</span><span class="p">(</span><span class="n">inGSettings</span><span class="o">=</span><span class="n">inGSettings</span><span class="p">,</span> <span class="n">inLogList</span><span class="o">=</span><span class="p">[</span><span class="n">lMessageStr</span><span class="p">])</span>
<span class="k">return</span> <span class="n">lResultStr</span>
<span class="c1"># New call</span>
<span class="k">if</span> <span class="n">inRunAsyncBool</span><span class="p">:</span>
<span class="n">lThread</span> <span class="o">=</span> <span class="n">threading</span><span class="o">.</span><span class="n">Thread</span><span class="p">(</span><span class="n">target</span><span class="o">=</span><span class="n">_CMDRunAndListenLogs</span><span class="p">,</span> <span class="n">kwargs</span><span class="o">=</span><span class="p">{</span><span class="s2">&quot;inCMDStr&quot;</span><span class="p">:</span><span class="n">inCMDStr</span><span class="p">,</span> <span class="s2">&quot;inGSettings&quot;</span><span class="p">:</span><span class="n">inGSettings</span><span class="p">,</span> <span class="s2">&quot;inSendOutputToOrchestratorLogsBool&quot;</span><span class="p">:</span><span class="n">inSendOutputToOrchestratorLogsBool</span><span class="p">,</span> <span class="s2">&quot;inCMDEncodingStr&quot;</span><span class="p">:</span><span class="n">inCMDEncodingStr</span><span class="p">,</span> <span class="s2">&quot;inCaptureBool&quot;</span><span class="p">:</span> <span class="n">inCaptureBool</span> <span class="p">})</span>
<span class="n">lThread</span><span class="o">.</span><span class="n">start</span><span class="p">()</span>
<span class="n">lResultStr</span><span class="o">=</span><span class="s2">&quot;ActivityList has been started in async mode - no output is available here.&quot;</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">lResultStr</span> <span class="o">=</span> <span class="n">_CMDRunAndListenLogs</span><span class="p">(</span><span class="n">inCMDStr</span><span class="o">=</span><span class="n">inCMDStr</span><span class="p">,</span> <span class="n">inGSettings</span><span class="o">=</span><span class="n">inGSettings</span><span class="p">,</span> <span class="n">inSendOutputToOrchestratorLogsBool</span> <span class="o">=</span> <span class="n">inSendOutputToOrchestratorLogsBool</span><span class="p">,</span> <span class="n">inCMDEncodingStr</span> <span class="o">=</span> <span class="n">inCMDEncodingStr</span><span class="p">,</span> <span class="n">inCaptureBool</span><span class="o">=</span><span class="n">inCaptureBool</span><span class="p">)</span>
<span class="c1">#lCMDCode = &quot;cmd /c &quot; + inCMDStr</span>
<span class="c1">#subprocess.Popen(lCMDCode)</span>
<span class="c1">#lResultCMDRun = 1 # os.system(lCMDCode)</span>
<span class="k">return</span> <span class="n">lResultStr</span></div>
<div class="viewcode-block" id="ProcessWOExeUpperUserListGet"><a class="viewcode-back" href="../../../Agent/02_Defs.html#pyOpenRPA.Agent.__Agent__.ProcessWOExeUpperUserListGet">[документация]</a><span class="k">def</span> <span class="nf">ProcessWOExeUpperUserListGet</span><span class="p">():</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Return the process list only for the current user (where Agent is running) without .EXE in upper case. Can use in ActivityItem from Orchestrator to Agent</span>
<span class="sd"> :param inProcessNameWOExeList:</span>
<span class="sd"> :return: list of the agent user process in upper case without .EXE. Example [&quot;NOTEPAD&quot;,&quot;...&quot;],</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">lUserNameStr</span> <span class="o">=</span> <span class="n">getpass</span><span class="o">.</span><span class="n">getuser</span><span class="p">()</span>
<span class="n">lResult</span> <span class="o">=</span> <span class="p">[]</span>
<span class="c1"># Create updated list for quick check</span>
<span class="n">lProcessNameWOExeList</span> <span class="o">=</span> <span class="p">[]</span>
<span class="c1"># Iterate over the list</span>
<span class="k">for</span> <span class="n">proc</span> <span class="ow">in</span> <span class="n">psutil</span><span class="o">.</span><span class="n">process_iter</span><span class="p">():</span>
<span class="k">try</span><span class="p">:</span>
<span class="c1"># Fetch process details as dict</span>
<span class="n">pinfo</span> <span class="o">=</span> <span class="n">proc</span><span class="o">.</span><span class="n">as_dict</span><span class="p">(</span><span class="n">attrs</span><span class="o">=</span><span class="p">[</span><span class="s1">&#39;pid&#39;</span><span class="p">,</span> <span class="s1">&#39;name&#39;</span><span class="p">,</span> <span class="s1">&#39;username&#39;</span><span class="p">])</span>
<span class="c1"># Add if empty inProcessNameWOExeList or if process in inProcessNameWOExeList</span>
<span class="n">lUserNameWODomainStr</span> <span class="o">=</span> <span class="n">proc</span><span class="o">.</span><span class="n">username</span><span class="p">()</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s1">&#39;</span><span class="se">\\</span><span class="s1">&#39;</span><span class="p">)[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span>
<span class="k">if</span> <span class="n">lUserNameWODomainStr</span> <span class="o">==</span> <span class="n">lUserNameStr</span><span class="p">:</span>
<span class="n">lResult</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">pinfo</span><span class="p">[</span><span class="s1">&#39;name&#39;</span><span class="p">][:</span><span class="o">-</span><span class="mi">4</span><span class="p">]</span><span class="o">.</span><span class="n">upper</span><span class="p">())</span>
<span class="k">except</span> <span class="p">(</span><span class="n">psutil</span><span class="o">.</span><span class="n">NoSuchProcess</span><span class="p">,</span> <span class="n">psutil</span><span class="o">.</span><span class="n">AccessDenied</span><span class="p">,</span> <span class="n">psutil</span><span class="o">.</span><span class="n">ZombieProcess</span><span class="p">):</span>
<span class="k">pass</span>
<span class="k">return</span> <span class="n">lResult</span></div>
<span class="c1"># Main def</span>
<span class="k">def</span> <span class="nf">Agent</span><span class="p">(</span><span class="n">inGSettings</span><span class="p">):</span>
<span class="n">License</span><span class="o">.</span><span class="n">ConsoleVerify</span><span class="p">()</span>
<span class="n">lL</span> <span class="o">=</span> <span class="n">inGSettings</span><span class="p">[</span><span class="s2">&quot;Logger&quot;</span><span class="p">]</span>
<span class="k">global</span> <span class="n">gSettings</span>
<span class="n">gSettings</span> <span class="o">=</span> <span class="n">inGSettings</span>
<span class="c1"># Append Orchestrator def to ProcessorDictAlias</span>
<span class="n">lModule</span> <span class="o">=</span> <span class="n">sys</span><span class="o">.</span><span class="n">modules</span><span class="p">[</span><span class="vm">__name__</span><span class="p">]</span>
<span class="n">lModuleDefList</span> <span class="o">=</span> <span class="nb">dir</span><span class="p">(</span><span class="n">lModule</span><span class="p">)</span>
<span class="k">for</span> <span class="n">lItemDefNameStr</span> <span class="ow">in</span> <span class="n">lModuleDefList</span><span class="p">:</span>
<span class="c1"># Dont append alias for defs Agent</span>
<span class="k">if</span> <span class="n">lItemDefNameStr</span> <span class="ow">not</span> <span class="ow">in</span> <span class="p">[</span><span class="s2">&quot;Agent&quot;</span><span class="p">]:</span>
<span class="n">lItemDef</span> <span class="o">=</span> <span class="nb">getattr</span><span class="p">(</span><span class="n">lModule</span><span class="p">,</span><span class="n">lItemDefNameStr</span><span class="p">)</span>
<span class="k">if</span> <span class="n">callable</span><span class="p">(</span><span class="n">lItemDef</span><span class="p">):</span> <span class="n">inGSettings</span><span class="p">[</span><span class="s2">&quot;ProcessorDict&quot;</span><span class="p">][</span><span class="s2">&quot;AliasDefDict&quot;</span><span class="p">][</span><span class="n">lItemDefNameStr</span><span class="p">]</span><span class="o">=</span><span class="n">lItemDef</span>
<span class="c1"># Detect Machine host name and username</span>
<span class="n">inGSettings</span><span class="p">[</span><span class="s2">&quot;AgentDict&quot;</span><span class="p">][</span><span class="s2">&quot;HostNameUpperStr&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">socket</span><span class="o">.</span><span class="n">gethostname</span><span class="p">()</span><span class="o">.</span><span class="n">upper</span><span class="p">()</span>
<span class="n">inGSettings</span><span class="p">[</span><span class="s2">&quot;AgentDict&quot;</span><span class="p">][</span><span class="s2">&quot;UserUpperStr&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">getpass</span><span class="o">.</span><span class="n">getuser</span><span class="p">()</span><span class="o">.</span><span class="n">upper</span><span class="p">()</span>
<span class="c1"># Processor thread</span>
<span class="n">lProcessorThread</span> <span class="o">=</span> <span class="n">threading</span><span class="o">.</span><span class="n">Thread</span><span class="p">(</span><span class="n">target</span><span class="o">=</span> <span class="n">Processor</span><span class="o">.</span><span class="n">ProcessorRunSync</span><span class="p">,</span> <span class="n">kwargs</span><span class="o">=</span><span class="p">{</span><span class="s2">&quot;inGSettings&quot;</span><span class="p">:</span><span class="n">inGSettings</span><span class="p">})</span>
<span class="n">lProcessorThread</span><span class="o">.</span><span class="n">daemon</span> <span class="o">=</span> <span class="kc">True</span> <span class="c1"># Run the thread in daemon mode.</span>
<span class="n">lProcessorThread</span><span class="o">.</span><span class="n">start</span><span class="p">()</span> <span class="c1"># Start the thread execution.</span>
<span class="k">if</span> <span class="n">lL</span><span class="p">:</span> <span class="n">lL</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s2">&quot;Processor has been started (ProcessorDict)&quot;</span><span class="p">)</span> <span class="c1">#Logging</span>
<span class="c1"># Start thread to wait data from Orchestrator (O2A)</span>
<span class="n">lO2AThread</span> <span class="o">=</span> <span class="n">threading</span><span class="o">.</span><span class="n">Thread</span><span class="p">(</span><span class="n">target</span><span class="o">=</span><span class="n">O2A</span><span class="o">.</span><span class="n">O2A_Loop</span><span class="p">,</span> <span class="n">kwargs</span><span class="o">=</span><span class="p">{</span><span class="s2">&quot;inGSettings&quot;</span><span class="p">:</span><span class="n">inGSettings</span><span class="p">})</span>
<span class="n">lO2AThread</span><span class="o">.</span><span class="n">start</span><span class="p">()</span>
<span class="n">Usage</span><span class="o">.</span><span class="n">Process</span><span class="p">(</span><span class="n">inComponentStr</span><span class="o">=</span><span class="s2">&quot;Agent&quot;</span><span class="p">)</span>
<span class="c1"># Send log that Agent has been started</span>
<span class="n">A2O</span><span class="o">.</span><span class="n">LogListSend</span><span class="p">(</span><span class="n">inGSettings</span><span class="o">=</span><span class="n">inGSettings</span><span class="p">,</span> <span class="n">inLogList</span><span class="o">=</span><span class="p">[</span><span class="sa">f</span><span class="s1">&#39;Host: </span><span class="si">{</span><span class="n">inGSettings</span><span class="p">[</span><span class="s2">&quot;AgentDict&quot;</span><span class="p">][</span><span class="s2">&quot;HostNameUpperStr&quot;</span><span class="p">]</span><span class="si">}</span><span class="s1">, User: </span><span class="si">{</span><span class="n">inGSettings</span><span class="p">[</span><span class="s2">&quot;AgentDict&quot;</span><span class="p">][</span><span class="s2">&quot;UserUpperStr&quot;</span><span class="p">]</span><span class="si">}</span><span class="s1">, Agent has been started.&#39;</span><span class="p">])</span>
</pre></div>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>
&#169; Copyright 2022, ООО &#34;ОПЕН РПА&#34;.
</p>
</div>
Собрано при помощи <a href="https://www.sphinx-doc.org/">Sphinx</a> с использованием
<a href="https://github.com/readthedocs/sphinx_rtd_theme">темы,</a>
предоставленной <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>

@ -0,0 +1,581 @@
<!DOCTYPE html>
<html class="writer-html5" lang="ru" >
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>pyOpenRPA.Orchestrator.Managers.ControlPanel &mdash; документация pyOpenRPA v1.2.12 v1.2.12</title>
<link rel="stylesheet" href="../../../../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../../../../_static/pygments.css" type="text/css" />
<link rel="shortcut icon" href="../../../../_static/favicon.ico"/>
<!--[if lt IE 9]>
<script src="../../../../_static/js/html5shiv.min.js"></script>
<![endif]-->
<script type="text/javascript" id="documentation_options" data-url_root="../../../../" src="../../../../_static/documentation_options.js"></script>
<script src="../../../../_static/jquery.js"></script>
<script src="../../../../_static/underscore.js"></script>
<script src="../../../../_static/doctools.js"></script>
<script src="../../../../_static/translations.js"></script>
<script type="text/javascript" src="../../../../_static/js/theme.js"></script>
<link rel="index" title="Алфавитный указатель" href="../../../../genindex.html" />
<link rel="search" title="Поиск" href="../../../../search.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../../../../index.html" class="icon icon-home"> pyOpenRPA v1.2.12
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../../../search.html" method="get">
<input type="text" name="q" placeholder="Поиск в документации" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<p class="caption"><span class="caption-text">ОБЩЕЕ</span></p>
<ul>
<li class="toctree-l1"><a class="reference external" href="https://pyopenrpa.ru/wiki/guide/index">Выбрать версию</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../01_HowToInstall.html">1. Первый запуск</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../03_Copyrights_Contacts.html">2. Права &amp; Контакты</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ РОБОТ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../../Robot/01_Robot.html">1. Описание</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../Robot/02_Defs.html">2. Функции</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../Robot/03_HowToUse.html">3. Как использовать?</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../Robot/04_Dependencies.html">4. Зависимости</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ СТУДИЯ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../../Studio/01_Studio.html">1. Описание</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../Studio/02_HowToUse.html">2. Как использовать?</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ ОРКЕСТРАТОР</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../../Orchestrator/01_Orchestrator.html">1. Description</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../Orchestrator/02_Defs.html">2. Defs</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../Orchestrator/03_gSettingsTemplate.html">3. gSettings Template</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../Orchestrator/04_HowToUse.html">4. How to use</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../Orchestrator/05_UAC.html">5. UAC - User Access Control</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../Orchestrator/06_Defs%20Managers.html">6. Defs Managers</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ АГЕНТ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../../Agent/02_Defs.html">2. Defs</a></li>
</ul>
<p class="caption"><span class="caption-text">ИНСТРУМЕНТЫ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../../Tools/02_Defs.html">2. Defs StopSafe</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../../../../index.html">pyOpenRPA v1.2.12</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="../../../../index.html" class="icon icon-home"></a> &raquo;</li>
<li><a href="../../../index.html">Код модуля</a> &raquo;</li>
<li>pyOpenRPA.Orchestrator.Managers.ControlPanel</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<h1>Исходный код pyOpenRPA.Orchestrator.Managers.ControlPanel</h1><div class="highlight"><pre>
<span></span><span class="kn">from</span> <span class="nn">...</span> <span class="kn">import</span> <span class="n">Orchestrator</span>
<span class="kn">import</span> <span class="nn">jinja2</span>
<span class="kn">import</span> <span class="nn">os</span>
<span class="kn">from</span> <span class="nn">inspect</span> <span class="kn">import</span> <span class="n">signature</span> <span class="c1"># For detect count of def args</span>
<span class="kn">from</span> <span class="nn">..Web</span> <span class="kn">import</span> <span class="n">Basic</span>
<span class="kn">import</span> <span class="nn">operator</span>
<span class="kn">import</span> <span class="nn">math</span>
<div class="viewcode-block" id="ControlPanel"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel">[документация]</a><span class="k">class</span> <span class="nc">ControlPanel</span><span class="p">():</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Manage your control panel on the orchestrator</span>
<span class="sd"> Control panel has 3 events types:</span>
<span class="sd"> - onRefreshHTML - run every n (see settings) second to detect changes in HTML control panel.</span>
<span class="sd"> - onRefreshJSON - run every n (see settings) second to detect changes in JSON data container to client side.</span>
<span class="sd"> - onInitJS - run when client reload the Orchestrator web page</span>
<span class="sd"> .. code-block:: python</span>
<span class="sd"> # Usage example:</span>
<span class="sd"> lCPManager = Orchestrator.Managers.ControlPanel(inControlPanelNameStr=&quot;TestControlPanel&quot;,</span>
<span class="sd"> inRefreshHTMLJinja2TemplatePathStr=&quot;ControlPanel\\test.html&quot;, inJinja2TemplateRefreshBool = True)</span>
<span class="sd"> </span>
<span class="sd"> </span>
<span class="sd"> If you use Jinja2 you can use next data context:</span>
<span class="sd"> StorageRobotDict: Orchestrator.StorageRobotGet(inRobotNameStr=self.mRobotNameStr),</span>
<span class="sd"> ControlPanelInstance: self,</span>
<span class="sd"> OrchestratorModule:Orchestrator,</span>
<span class="sd"> RequestInstance: inRequest,</span>
<span class="sd"> UserInfoDict: Orchestrator.WebUserInfoGet(inRequest=inRequest),</span>
<span class="sd"> UserUACDict: Orchestrator.UACUserDictGet(inRequest=inRequest),</span>
<span class="sd"> UserUACCheckDef: inRequest.UACClientCheck,</span>
<span class="sd"> EnumerateDef: enumerate,</span>
<span class="sd"> OperatorModule: operator,</span>
<span class="sd"> MathModule: math</span>
<span class="sd"> You can modify jinja context by use the function:</span>
<span class="sd"> Jinja2DataUpdateDictSet </span>
<span class="sd"> .. code-block:: html</span>
<span class="sd"> Hello my control panel!</span>
<span class="sd"> You can use any def from Orchestrator module here in Jinja2 HTML template:</span>
<span class="sd"> Example: OrchestratorModule.OSCMD(inCMDStr=&quot;notepad&quot;)</span>
<span class="sd"> {{MathModule.pi}}</span>
<span class="sd"> {% if UserInfoDict[&#39;UserNameUpperStr&#39;]==&quot;ND&quot; %}</span>
<span class="sd"> YES - IT IS ND</span>
<span class="sd"> {% endif %}</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">mControlPanelNameStr</span> <span class="o">=</span> <span class="kc">None</span>
<span class="c1"># Jinja2 consolidated</span>
<span class="n">mJinja2TemplateRefreshBool</span> <span class="o">=</span> <span class="kc">None</span>
<span class="n">mJinja2DataUpdateDict</span> <span class="o">=</span> <span class="kc">None</span>
<span class="c1"># RefreshHTML block</span>
<span class="n">mRefreshHTMLJinja2TemplatePathStr</span> <span class="o">=</span> <span class="kc">None</span>
<span class="n">mRefreshHTMLJinja2TemplateFileNameStr</span> <span class="o">=</span> <span class="kc">None</span>
<span class="n">mRefreshHTMLJinja2Loader</span> <span class="o">=</span> <span class="kc">None</span>
<span class="n">mRefreshHTMLJinja2Env</span> <span class="o">=</span> <span class="kc">None</span>
<span class="n">mRefreshHTMLJinja2Template</span> <span class="o">=</span> <span class="kc">None</span>
<span class="c1"># InitJS block</span>
<span class="n">mInitJSJinja2TemplatePathStr</span> <span class="o">=</span> <span class="kc">None</span>
<span class="n">mInitJSJinja2TemplateFileNameStr</span> <span class="o">=</span> <span class="kc">None</span>
<span class="n">mInitJSJinja2Loader</span> <span class="o">=</span> <span class="kc">None</span>
<span class="n">mInitJSJinja2Env</span> <span class="o">=</span> <span class="kc">None</span>
<span class="n">mInitJSJinja2Template</span> <span class="o">=</span> <span class="kc">None</span>
<span class="n">mBackwardCompatibilityHTMLDef</span> <span class="o">=</span> <span class="kc">None</span>
<span class="n">mBackwardCompatibilityJSDef</span> <span class="o">=</span> <span class="kc">None</span>
<span class="n">mBackwardCompatibilityJSONDef</span> <span class="o">=</span> <span class="kc">None</span>
<span class="n">mRobotNameStr</span> <span class="o">=</span> <span class="kc">None</span>
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">inControlPanelNameStr</span><span class="p">,</span> <span class="n">inRefreshHTMLJinja2TemplatePathStr</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span> <span class="n">inJinja2TemplateRefreshBool</span> <span class="o">=</span> <span class="kc">False</span><span class="p">,</span> <span class="n">inRobotNameStr</span> <span class="o">=</span> <span class="kc">None</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Constructor of the control panel manager</span>
<span class="sd"> :param inControlPanelNameStr:</span>
<span class="sd"> :param inJinja2TemplatePathStr:</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="c1"># Connect self witch pyOpenRPA via ControlPanelNameStr</span>
<span class="k">if</span> <span class="n">inControlPanelNameStr</span> <span class="ow">in</span> <span class="n">Orchestrator</span><span class="o">.</span><span class="n">GSettingsGet</span><span class="p">()[</span><span class="s2">&quot;ServerDict&quot;</span><span class="p">][</span><span class="s2">&quot;ControlPanelDict&quot;</span><span class="p">]:</span>
<span class="k">raise</span> <span class="ne">Exception</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;Another control panel with name </span><span class="si">{</span><span class="n">inControlPanelNameStr</span><span class="si">}</span><span class="s2"> is already exists. Please resolve the error and restart&quot;</span><span class="p">)</span>
<span class="n">Orchestrator</span><span class="o">.</span><span class="n">GSettingsGet</span><span class="p">()[</span><span class="s2">&quot;ServerDict&quot;</span><span class="p">][</span><span class="s2">&quot;ControlPanelDict&quot;</span><span class="p">][</span><span class="n">inControlPanelNameStr</span><span class="p">]</span> <span class="o">=</span> <span class="bp">self</span>
<span class="bp">self</span><span class="o">.</span><span class="n">RefreshHTMLJinja2TemplatePathSet</span><span class="p">(</span><span class="n">inJinja2TemplatePathStr</span> <span class="o">=</span> <span class="n">inRefreshHTMLJinja2TemplatePathStr</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mJinja2TemplateRefreshBool</span> <span class="o">=</span> <span class="n">inJinja2TemplateRefreshBool</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mControlPanelNameStr</span> <span class="o">=</span> <span class="n">inControlPanelNameStr</span> <span class="c1"># Set the name of the control panel</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mRobotNameStr</span> <span class="o">=</span> <span class="n">inRobotNameStr</span> <span class="c1"># Set the robot name for robot it execute</span>
<div class="viewcode-block" id="ControlPanel.Jinja2DataUpdateDictSet"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel.Jinja2DataUpdateDictSet">[документация]</a> <span class="k">def</span> <span class="nf">Jinja2DataUpdateDictSet</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">inJinja2DataUpdateDict</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Set the data dict from the Jinja2 context (you can add some new params)</span>
<span class="sd"> :param inJinja2DataUpdateDict: dict, which will be appended to main data context</span>
<span class="sd"> :return: None</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mJinja2DataUpdateDict</span> <span class="o">=</span> <span class="n">inJinja2DataUpdateDict</span></div>
<div class="viewcode-block" id="ControlPanel.RefreshHTMLJinja2TemplatePathSet"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel.RefreshHTMLJinja2TemplatePathSet">[документация]</a> <span class="k">def</span> <span class="nf">RefreshHTMLJinja2TemplatePathSet</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">inJinja2TemplatePathStr</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Create Jinja2 env and load the template html</span>
<span class="sd"> :param inJinja2TemplatePathStr:</span>
<span class="sd"> :return:</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">try</span><span class="p">:</span>
<span class="k">if</span> <span class="n">inJinja2TemplatePathStr</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
<span class="n">lSystemLoaderPathStr</span> <span class="o">=</span> <span class="s2">&quot;/&quot;</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">inJinja2TemplatePathStr</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s2">&quot;</span><span class="se">\\</span><span class="s2">&quot;</span><span class="p">)[</span><span class="mi">0</span><span class="p">:</span><span class="o">-</span><span class="mi">1</span><span class="p">])</span>
<span class="n">lTemplateFileNameStr</span> <span class="o">=</span> <span class="n">inJinja2TemplatePathStr</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s2">&quot;</span><span class="se">\\</span><span class="s2">&quot;</span><span class="p">)[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mRefreshHTMLJinja2TemplateFileNameStr</span> <span class="o">=</span> <span class="n">lTemplateFileNameStr</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mRefreshHTMLJinja2Loader</span> <span class="o">=</span> <span class="n">jinja2</span><span class="o">.</span><span class="n">FileSystemLoader</span><span class="p">(</span><span class="n">lSystemLoaderPathStr</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mRefreshHTMLJinja2Env</span> <span class="o">=</span> <span class="n">jinja2</span><span class="o">.</span><span class="n">Environment</span><span class="p">(</span><span class="n">loader</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">mRefreshHTMLJinja2Loader</span><span class="p">,</span> <span class="n">trim_blocks</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mRefreshHTMLJinja2Template</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">mRefreshHTMLJinja2Env</span><span class="o">.</span><span class="n">get_template</span><span class="p">(</span><span class="n">lTemplateFileNameStr</span><span class="p">)</span>
<span class="k">except</span> <span class="ne">Exception</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
<span class="n">Orchestrator</span><span class="o">.</span><span class="n">OrchestratorLoggerGet</span><span class="p">()</span><span class="o">.</span><span class="n">exception</span><span class="p">(</span><span class="s2">&quot;EXCEPTION WHEN INIT Jinja2&quot;</span><span class="p">)</span></div>
<div class="viewcode-block" id="ControlPanel.RefreshHTMLJinja2StrGenerate"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel.RefreshHTMLJinja2StrGenerate">[документация]</a> <span class="k">def</span> <span class="nf">RefreshHTMLJinja2StrGenerate</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">inDataDict</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Generate the HTML str from the Jinja2. Pass the context inDataDict</span>
<span class="sd"> :param inDataDict:</span>
<span class="sd"> :return:</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">mJinja2TemplateRefreshBool</span> <span class="o">==</span> <span class="kc">True</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mRefreshHTMLJinja2Template</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">mRefreshHTMLJinja2Env</span><span class="o">.</span><span class="n">get_template</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">mRefreshHTMLJinja2TemplateFileNameStr</span><span class="p">)</span>
<span class="n">lHTMLStr</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">mRefreshHTMLJinja2Template</span><span class="o">.</span><span class="n">render</span><span class="p">(</span><span class="o">**</span><span class="n">inDataDict</span><span class="p">)</span> <span class="c1"># Render the template into str</span>
<span class="k">return</span> <span class="n">lHTMLStr</span></div>
<div class="viewcode-block" id="ControlPanel.InitJSJinja2TemplatePathSet"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel.InitJSJinja2TemplatePathSet">[документация]</a> <span class="k">def</span> <span class="nf">InitJSJinja2TemplatePathSet</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">inJinja2TemplatePathStr</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Create Jinja2 env and load the template html</span>
<span class="sd"> :param inJinja2TemplatePathStr:</span>
<span class="sd"> :return:</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">try</span><span class="p">:</span>
<span class="k">if</span> <span class="n">inJinja2TemplatePathStr</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
<span class="n">lSystemLoaderPathStr</span> <span class="o">=</span> <span class="s2">&quot;/&quot;</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">inJinja2TemplatePathStr</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s2">&quot;</span><span class="se">\\</span><span class="s2">&quot;</span><span class="p">)[</span><span class="mi">0</span><span class="p">:</span><span class="o">-</span><span class="mi">1</span><span class="p">])</span>
<span class="n">lTemplateFileNameStr</span> <span class="o">=</span> <span class="n">inJinja2TemplatePathStr</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s2">&quot;</span><span class="se">\\</span><span class="s2">&quot;</span><span class="p">)[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mInitJSJinja2TemplateFileNameStr</span> <span class="o">=</span> <span class="n">lTemplateFileNameStr</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mInitJSJinja2Loader</span> <span class="o">=</span> <span class="n">jinja2</span><span class="o">.</span><span class="n">FileSystemLoader</span><span class="p">(</span><span class="n">lSystemLoaderPathStr</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mInitJSJinja2Env</span> <span class="o">=</span> <span class="n">jinja2</span><span class="o">.</span><span class="n">Environment</span><span class="p">(</span><span class="n">loader</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">mInitJSJinja2Loader</span><span class="p">,</span> <span class="n">trim_blocks</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mInitJSJinja2Template</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">mInitJSJinja2Env</span><span class="o">.</span><span class="n">get_template</span><span class="p">(</span><span class="n">lTemplateFileNameStr</span><span class="p">)</span>
<span class="k">except</span> <span class="ne">Exception</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
<span class="n">Orchestrator</span><span class="o">.</span><span class="n">OrchestratorLoggerGet</span><span class="p">()</span><span class="o">.</span><span class="n">exception</span><span class="p">(</span><span class="s2">&quot;EXCEPTION WHEN INIT Jinja2&quot;</span><span class="p">)</span></div>
<div class="viewcode-block" id="ControlPanel.InitJSJinja2StrGenerate"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel.InitJSJinja2StrGenerate">[документация]</a> <span class="k">def</span> <span class="nf">InitJSJinja2StrGenerate</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">inDataDict</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Generate the HTML str from the Jinja2. Pass the context inDataDict</span>
<span class="sd"> :param inDataDict:</span>
<span class="sd"> :return:</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">mJinja2TemplateRefreshBool</span> <span class="o">==</span> <span class="kc">True</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mInitJSJinja2Template</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">mInitJSJinja2Env</span><span class="o">.</span><span class="n">get_template</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">mInitJSJinja2TemplateFileNameStr</span><span class="p">)</span>
<span class="n">lHTMLStr</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">mInitJSJinja2Template</span><span class="o">.</span><span class="n">render</span><span class="p">(</span><span class="o">**</span><span class="n">inDataDict</span><span class="p">)</span> <span class="c1"># Render the template into str</span>
<span class="k">return</span> <span class="n">lHTMLStr</span></div>
<div class="viewcode-block" id="ControlPanel.DataDictGenerate"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel.DataDictGenerate">[документация]</a> <span class="k">def</span> <span class="nf">DataDictGenerate</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">inRequest</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> :param inRequest: request handler (from http.server import BaseHTTPRequestHandler)</span>
<span class="sd"> :return:</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">lData</span> <span class="o">=</span> <span class="p">{</span>
<span class="s2">&quot;StorageRobotDict&quot;</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
<span class="s2">&quot;ControlPanelInstance&quot;</span><span class="p">:</span><span class="bp">self</span><span class="p">,</span>
<span class="s2">&quot;OrchestratorModule&quot;</span><span class="p">:</span><span class="n">Orchestrator</span><span class="p">,</span>
<span class="s2">&quot;RequestInstance&quot;</span><span class="p">:</span> <span class="n">inRequest</span><span class="p">,</span>
<span class="s2">&quot;UserInfoDict&quot;</span><span class="p">:</span> <span class="n">Orchestrator</span><span class="o">.</span><span class="n">WebUserInfoGet</span><span class="p">(</span><span class="n">inRequest</span><span class="o">=</span><span class="n">inRequest</span><span class="p">),</span>
<span class="s2">&quot;UserUACDict&quot;</span><span class="p">:</span> <span class="n">Orchestrator</span><span class="o">.</span><span class="n">UACUserDictGet</span><span class="p">(</span><span class="n">inRequest</span><span class="o">=</span><span class="n">inRequest</span><span class="p">),</span>
<span class="s2">&quot;UserUACCheckDef&quot;</span><span class="p">:</span> <span class="n">inRequest</span><span class="o">.</span><span class="n">UACClientCheck</span><span class="p">,</span>
<span class="s2">&quot;EnumerateDef&quot;</span><span class="p">:</span> <span class="nb">enumerate</span><span class="p">,</span>
<span class="s2">&quot;OperatorModule&quot;</span><span class="p">:</span> <span class="n">operator</span><span class="p">,</span>
<span class="s2">&quot;MathModule&quot;</span><span class="p">:</span> <span class="n">math</span>
<span class="p">}</span>
<span class="c1"># Get the robot storage by the robot name (if you set robot name when init)</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">mRobotNameStr</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
<span class="n">lData</span><span class="p">[</span><span class="s2">&quot;StorageRobotDict&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">Orchestrator</span><span class="o">.</span><span class="n">StorageRobotGet</span><span class="p">(</span><span class="n">inRobotNameStr</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">mRobotNameStr</span><span class="p">)</span>
<span class="c1"># Checkj Jinja2DataUpdateDict</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">mJinja2DataUpdateDict</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
<span class="n">lData</span><span class="o">.</span><span class="n">update</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">mJinja2DataUpdateDict</span><span class="p">)</span>
<span class="k">return</span> <span class="n">lData</span></div>
<div class="viewcode-block" id="ControlPanel.OnRefreshHTMLStr"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel.OnRefreshHTMLStr">[документация]</a> <span class="k">def</span> <span class="nf">OnRefreshHTMLStr</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">inRequest</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Event to generate HTML code of the control panel when refresh time is over.</span>
<span class="sd"> Support backward compatibility for previous versions.</span>
<span class="sd"> :param inRequest: request handler (from http.server import BaseHTTPRequestHandler)</span>
<span class="sd"> :return:</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">lHTMLStr</span> <span class="o">=</span> <span class="kc">None</span>
<span class="n">lL</span> <span class="o">=</span> <span class="n">Orchestrator</span><span class="o">.</span><span class="n">OrchestratorLoggerGet</span><span class="p">()</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">mBackwardCompatibilityHTMLDef</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">mRefreshHTMLJinja2Template</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span> <span class="ow">or</span> <span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">mJinja2TemplateRefreshBool</span> <span class="o">==</span> <span class="kc">True</span> <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">mRefreshHTMLJinja2TemplateFileNameStr</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">):</span>
<span class="n">lDataDict</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">OnRefreshHTMLDataDict</span><span class="p">(</span><span class="n">inRequest</span> <span class="o">=</span> <span class="n">inRequest</span><span class="p">)</span>
<span class="c1"># Jinja code</span>
<span class="n">lHTMLStr</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">RefreshHTMLJinja2StrGenerate</span><span class="p">(</span><span class="n">inDataDict</span><span class="o">=</span><span class="n">lDataDict</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">lHTMLStr</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">BackwardAdapterHTMLDef</span><span class="p">(</span><span class="n">inRequest</span><span class="o">=</span><span class="n">inRequest</span><span class="p">)</span>
<span class="c1"># return the str</span>
<span class="k">return</span> <span class="n">lHTMLStr</span></div>
<div class="viewcode-block" id="ControlPanel.OnRefreshHTMLDataDict"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel.OnRefreshHTMLDataDict">[документация]</a> <span class="k">def</span> <span class="nf">OnRefreshHTMLDataDict</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">inRequest</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Event to prepare data context for the futher Jinja2 HTML generation. You can override this def if you want some thing more data</span>
<span class="sd"> :param inRequest: request handler (from http.server import BaseHTTPRequestHandler)</span>
<span class="sd"> :return: dict</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">DataDictGenerate</span><span class="p">(</span><span class="n">inRequest</span><span class="o">=</span><span class="n">inRequest</span><span class="p">)</span></div>
<div class="viewcode-block" id="ControlPanel.OnRefreshHTMLHashStr"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel.OnRefreshHTMLHashStr">[документация]</a> <span class="k">def</span> <span class="nf">OnRefreshHTMLHashStr</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">inRequest</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Generate the hash the result output HTML. You can override this function if you know how to optimize HTML rendering.</span>
<span class="sd"> TODO NEED TO MODIFY ServerSettings to work with Hash because of all defs are need do use Hash</span>
<span class="sd"> :param inRequest: request handler (from http.server import BaseHTTPRequestHandler)</span>
<span class="sd"> :return: None - default, hash function is not determined. Str - hash function is working on!</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">return</span> <span class="kc">None</span></div>
<div class="viewcode-block" id="ControlPanel.OnRefreshJSONDict"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel.OnRefreshJSONDict">[документация]</a> <span class="k">def</span> <span class="nf">OnRefreshJSONDict</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">inRequest</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Event to transmit some data from server side to the client side in JSON format. Call when page refresh is initialized</span>
<span class="sd"> :param inRequest: request handler (from http.server import BaseHTTPRequestHandler)</span>
<span class="sd"> :return: Dict type</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">lResultDict</span> <span class="o">=</span> <span class="kc">None</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">mBackwardCompatibilityJSONDef</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
<span class="k">pass</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">lResultDict</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">BackwardAdapterJSONDef</span><span class="p">(</span><span class="n">inRequest</span><span class="o">=</span><span class="n">inRequest</span><span class="p">)</span>
<span class="k">return</span> <span class="n">lResultDict</span></div>
<div class="viewcode-block" id="ControlPanel.OnInitJSStr"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel.OnInitJSStr">[документация]</a> <span class="k">def</span> <span class="nf">OnInitJSStr</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">inRequest</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Event when orchestrator web page is init on the client side - you can transmit some java script code is str type to execute it once.</span>
<span class="sd"> :param inRequest: request handler (from http.server import BaseHTTPRequestHandler)</span>
<span class="sd"> :return: &quot;&quot;</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">lJSStr</span> <span class="o">=</span> <span class="s2">&quot;&quot;</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">mBackwardCompatibilityJSDef</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">mInitJSJinja2Template</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span> <span class="ow">or</span> <span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">mJinja2TemplateRefreshBool</span> <span class="o">==</span> <span class="kc">True</span> <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">mInitJSJinja2TemplateFileNameStr</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">):</span>
<span class="n">lDataDict</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">OnInitJSDataDict</span><span class="p">(</span><span class="n">inRequest</span> <span class="o">=</span> <span class="n">inRequest</span><span class="p">)</span>
<span class="c1"># Jinja code</span>
<span class="n">lJSStr</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">InitJSJinja2StrGenerate</span><span class="p">(</span><span class="n">inDataDict</span><span class="o">=</span><span class="n">lDataDict</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">lJSStr</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">BackwardAdapterJSDef</span><span class="p">(</span><span class="n">inRequest</span><span class="o">=</span><span class="n">inRequest</span><span class="p">)</span>
<span class="k">return</span> <span class="n">lJSStr</span></div>
<div class="viewcode-block" id="ControlPanel.OnInitJSDataDict"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel.OnInitJSDataDict">[документация]</a> <span class="k">def</span> <span class="nf">OnInitJSDataDict</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">inRequest</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Event to prepare data context for the futher Jinja2 JS init generation. You can override this def if you want some thing more data</span>
<span class="sd"> :param inRequest: request handler (from http.server import BaseHTTPRequestHandler)</span>
<span class="sd"> :return: dict</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">DataDictGenerate</span><span class="p">(</span><span class="n">inRequest</span><span class="o">=</span><span class="n">inRequest</span><span class="p">)</span></div>
<span class="k">def</span> <span class="nf">BackwardAdapterHTMLDef</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="n">inRequest</span><span class="p">):</span>
<span class="n">lGS</span> <span class="o">=</span> <span class="n">Orchestrator</span><span class="o">.</span><span class="n">GSettingsGet</span><span class="p">()</span>
<span class="n">lL</span> <span class="o">=</span> <span class="n">Orchestrator</span><span class="o">.</span><span class="n">OrchestratorLoggerGet</span><span class="p">()</span>
<span class="c1"># HTMLRenderDef</span>
<span class="n">lItemHTMLRenderDef</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">mBackwardCompatibilityHTMLDef</span>
<span class="n">lResultStr</span> <span class="o">=</span> <span class="s2">&quot;&quot;</span>
<span class="k">if</span> <span class="n">lItemHTMLRenderDef</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span> <span class="c1"># Call def (inRequest, inGSettings) or def (inGSettings)</span>
<span class="n">lHTMLResult</span> <span class="o">=</span> <span class="kc">None</span>
<span class="n">lDEFSignature</span> <span class="o">=</span> <span class="n">signature</span><span class="p">(</span><span class="n">lItemHTMLRenderDef</span><span class="p">)</span> <span class="c1"># Get signature of the def</span>
<span class="n">lDEFARGLen</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="n">lDEFSignature</span><span class="o">.</span><span class="n">parameters</span><span class="o">.</span><span class="n">keys</span><span class="p">())</span> <span class="c1"># get count of the def args</span>
<span class="k">try</span><span class="p">:</span>
<span class="k">if</span> <span class="n">lDEFARGLen</span> <span class="o">==</span> <span class="mi">1</span><span class="p">:</span> <span class="c1"># def (inGSettings)</span>
<span class="n">lHTMLResult</span> <span class="o">=</span> <span class="n">lItemHTMLRenderDef</span><span class="p">(</span><span class="n">lGS</span><span class="p">)</span>
<span class="k">elif</span> <span class="n">lDEFARGLen</span> <span class="o">==</span> <span class="mi">2</span><span class="p">:</span> <span class="c1"># def (inRequest, inGSettings)</span>
<span class="n">lHTMLResult</span> <span class="o">=</span> <span class="n">lItemHTMLRenderDef</span><span class="p">(</span><span class="n">inRequest</span><span class="p">,</span> <span class="n">lGS</span><span class="p">)</span>
<span class="k">elif</span> <span class="n">lDEFARGLen</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span> <span class="c1"># def ()</span>
<span class="n">lHTMLResult</span> <span class="o">=</span> <span class="n">lItemHTMLRenderDef</span><span class="p">()</span>
<span class="c1"># RunFunction</span>
<span class="c1"># Backward compatibility up to 1.2.0 - call HTML generator if result has no &quot;HTMLStr&quot;</span>
<span class="k">if</span> <span class="nb">type</span><span class="p">(</span><span class="n">lHTMLResult</span><span class="p">)</span> <span class="ow">is</span> <span class="nb">str</span><span class="p">:</span>
<span class="n">lResultStr</span> <span class="o">=</span> <span class="n">lHTMLResult</span>
<span class="k">elif</span> <span class="s2">&quot;HTMLStr&quot;</span> <span class="ow">in</span> <span class="n">lHTMLResult</span> <span class="ow">or</span> <span class="s2">&quot;JSONDict&quot;</span> <span class="ow">in</span> <span class="n">lHTMLResult</span><span class="p">:</span>
<span class="n">lResultStr</span> <span class="o">=</span> <span class="n">lHTMLResult</span><span class="p">[</span><span class="s2">&quot;HTMLStr&quot;</span><span class="p">]</span>
<span class="k">else</span><span class="p">:</span>
<span class="c1"># Call backward compatibility HTML generator</span>
<span class="n">lResultStr</span> <span class="o">=</span> <span class="n">Basic</span><span class="o">.</span><span class="n">HTMLControlPanelBC</span><span class="p">(</span><span class="n">inCPDict</span><span class="o">=</span><span class="n">lHTMLResult</span><span class="p">)</span>
<span class="k">except</span> <span class="ne">Exception</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
<span class="k">if</span> <span class="n">lL</span><span class="p">:</span> <span class="n">lL</span><span class="o">.</span><span class="n">exception</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;Error in control panel HTMLRenderDef. CP Key </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">mControlPanelNameStr</span><span class="si">}</span><span class="s2">. Exception are below&quot;</span><span class="p">)</span>
<span class="k">return</span> <span class="n">lResultStr</span>
<span class="k">def</span> <span class="nf">BackwardAdapterJSONDef</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="n">inRequest</span><span class="p">):</span>
<span class="n">lGS</span> <span class="o">=</span> <span class="n">Orchestrator</span><span class="o">.</span><span class="n">GSettingsGet</span><span class="p">()</span>
<span class="n">lL</span> <span class="o">=</span> <span class="n">Orchestrator</span><span class="o">.</span><span class="n">OrchestratorLoggerGet</span><span class="p">()</span>
<span class="c1"># HTMLRenderDef</span>
<span class="n">lItemJSONGeneratorDef</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">mBackwardCompatibilityJSONDef</span>
<span class="n">lResultDict</span> <span class="o">=</span> <span class="p">{}</span>
<span class="k">if</span> <span class="n">lItemJSONGeneratorDef</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span> <span class="c1"># Call def (inRequest, inGSettings) or def (inGSettings)</span>
<span class="n">lJSONResult</span> <span class="o">=</span> <span class="kc">None</span>
<span class="n">lDEFSignature</span> <span class="o">=</span> <span class="n">signature</span><span class="p">(</span><span class="n">lItemJSONGeneratorDef</span><span class="p">)</span> <span class="c1"># Get signature of the def</span>
<span class="n">lDEFARGLen</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="n">lDEFSignature</span><span class="o">.</span><span class="n">parameters</span><span class="o">.</span><span class="n">keys</span><span class="p">())</span> <span class="c1"># get count of the def args</span>
<span class="k">try</span><span class="p">:</span>
<span class="k">if</span> <span class="n">lDEFARGLen</span> <span class="o">==</span> <span class="mi">1</span><span class="p">:</span> <span class="c1"># def (inGSettings)</span>
<span class="n">lJSONResult</span> <span class="o">=</span> <span class="n">lItemJSONGeneratorDef</span><span class="p">(</span><span class="n">lGS</span><span class="p">)</span>
<span class="k">elif</span> <span class="n">lDEFARGLen</span> <span class="o">==</span> <span class="mi">2</span><span class="p">:</span> <span class="c1"># def (inRequest, inGSettings)</span>
<span class="n">lJSONResult</span> <span class="o">=</span> <span class="n">lItemJSONGeneratorDef</span><span class="p">(</span><span class="n">inRequest</span><span class="p">,</span> <span class="n">lGS</span><span class="p">)</span>
<span class="k">elif</span> <span class="n">lDEFARGLen</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span> <span class="c1"># def ()</span>
<span class="n">lJSONResult</span> <span class="o">=</span> <span class="n">lItemJSONGeneratorDef</span><span class="p">()</span>
<span class="c1"># RunFunction</span>
<span class="c1"># Backward compatibility up to 1.2.0 - call HTML generator if result has no &quot;HTMLStr&quot;</span>
<span class="n">lType</span> <span class="o">=</span> <span class="nb">type</span><span class="p">(</span><span class="n">lJSONResult</span><span class="p">)</span>
<span class="k">if</span> <span class="n">lType</span> <span class="ow">is</span> <span class="nb">str</span> <span class="ow">or</span> <span class="n">lJSONResult</span> <span class="ow">is</span> <span class="kc">None</span> <span class="ow">or</span> <span class="n">lType</span> <span class="ow">is</span> <span class="nb">int</span> <span class="ow">or</span> <span class="n">lType</span> <span class="ow">is</span> <span class="nb">list</span> <span class="ow">or</span> <span class="n">lType</span> <span class="ow">is</span> <span class="nb">dict</span> <span class="ow">or</span> <span class="n">lType</span> <span class="ow">is</span> <span class="nb">bool</span> <span class="ow">or</span> <span class="n">lType</span> <span class="ow">is</span> <span class="nb">float</span><span class="p">:</span>
<span class="n">lResultDict</span> <span class="o">=</span> <span class="n">lJSONResult</span>
<span class="k">else</span><span class="p">:</span>
<span class="k">if</span> <span class="n">lL</span><span class="p">:</span> <span class="n">lL</span><span class="o">.</span><span class="n">warning</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;JSONGenerator return bad type: </span><span class="si">{</span><span class="nb">str</span><span class="p">(</span><span class="nb">type</span><span class="p">(</span><span class="n">lJSONResult</span><span class="p">))</span><span class="si">}</span><span class="s2">, CP Key </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">mControlPanelNameStr</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>
<span class="k">except</span> <span class="ne">Exception</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
<span class="k">if</span> <span class="n">lL</span><span class="p">:</span> <span class="n">lL</span><span class="o">.</span><span class="n">exception</span><span class="p">(</span>
<span class="sa">f</span><span class="s2">&quot;Error in control panel JSONGeneratorDef. CP Key </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">mControlPanelNameStr</span><span class="si">}</span><span class="s2">. Exception are below&quot;</span><span class="p">)</span>
<span class="k">return</span> <span class="n">lResultDict</span>
<span class="k">def</span> <span class="nf">BackwardAdapterJSDef</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="n">inRequest</span><span class="p">):</span>
<span class="n">lGS</span> <span class="o">=</span> <span class="n">Orchestrator</span><span class="o">.</span><span class="n">GSettingsGet</span><span class="p">()</span>
<span class="n">lL</span> <span class="o">=</span> <span class="n">Orchestrator</span><span class="o">.</span><span class="n">OrchestratorLoggerGet</span><span class="p">()</span>
<span class="c1"># HTMLRenderDef</span>
<span class="n">lJSInitGeneratorDef</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">mBackwardCompatibilityJSDef</span>
<span class="n">lResultStr</span> <span class="o">=</span> <span class="s2">&quot;&quot;</span>
<span class="k">if</span> <span class="n">lJSInitGeneratorDef</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span> <span class="c1"># Call def (inRequest, inGSettings) or def (inGSettings)</span>
<span class="n">lJSResult</span> <span class="o">=</span> <span class="s2">&quot;&quot;</span>
<span class="n">lDEFSignature</span> <span class="o">=</span> <span class="n">signature</span><span class="p">(</span><span class="n">lJSInitGeneratorDef</span><span class="p">)</span> <span class="c1"># Get signature of the def</span>
<span class="n">lDEFARGLen</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="n">lDEFSignature</span><span class="o">.</span><span class="n">parameters</span><span class="o">.</span><span class="n">keys</span><span class="p">())</span> <span class="c1"># get count of the def args</span>
<span class="k">try</span><span class="p">:</span>
<span class="k">if</span> <span class="n">lDEFARGLen</span> <span class="o">==</span> <span class="mi">1</span><span class="p">:</span> <span class="c1"># def (inGSettings)</span>
<span class="n">lJSResult</span> <span class="o">=</span> <span class="n">lJSInitGeneratorDef</span><span class="p">(</span><span class="n">lGS</span><span class="p">)</span>
<span class="k">elif</span> <span class="n">lDEFARGLen</span> <span class="o">==</span> <span class="mi">2</span><span class="p">:</span> <span class="c1"># def (inRequest, inGSettings)</span>
<span class="n">lJSResult</span> <span class="o">=</span> <span class="n">lJSInitGeneratorDef</span><span class="p">(</span><span class="n">inRequest</span><span class="p">,</span> <span class="n">lGS</span><span class="p">)</span>
<span class="k">elif</span> <span class="n">lDEFARGLen</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span> <span class="c1"># def ()</span>
<span class="n">lJSResult</span> <span class="o">=</span> <span class="n">lJSInitGeneratorDef</span><span class="p">()</span>
<span class="k">if</span> <span class="nb">type</span><span class="p">(</span><span class="n">lJSResult</span><span class="p">)</span> <span class="ow">is</span> <span class="nb">str</span><span class="p">:</span>
<span class="n">lResultStr</span> <span class="o">=</span> <span class="n">lJSResult</span> <span class="c1"># Add delimiter to some cases</span>
<span class="k">else</span><span class="p">:</span>
<span class="k">if</span> <span class="n">lL</span><span class="p">:</span> <span class="n">lL</span><span class="o">.</span><span class="n">warning</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;JSInitGenerator return bad type: </span><span class="si">{</span><span class="nb">str</span><span class="p">(</span><span class="nb">type</span><span class="p">(</span><span class="n">lJSResult</span><span class="p">))</span><span class="si">}</span><span class="s2">, CP Key </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">mControlPanelNameStr</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>
<span class="k">except</span> <span class="ne">Exception</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
<span class="k">if</span> <span class="n">lL</span><span class="p">:</span> <span class="n">lL</span><span class="o">.</span><span class="n">exception</span><span class="p">(</span>
<span class="sa">f</span><span class="s2">&quot;Error in control panel JSInitGeneratorDef. CP Key </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">mControlPanelNameStr</span><span class="si">}</span><span class="s2">. Exception are below&quot;</span><span class="p">)</span>
<span class="k">return</span> <span class="n">lResultStr</span></div>
</pre></div>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>
&#169; Copyright 2022, ООО &#34;ОПЕН РПА&#34;.
</p>
</div>
Собрано при помощи <a href="https://www.sphinx-doc.org/">Sphinx</a> с использованием
<a href="https://github.com/readthedocs/sphinx_rtd_theme">темы,</a>
предоставленной <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>

@ -0,0 +1,925 @@
<!DOCTYPE html>
<html class="writer-html5" lang="ru" >
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>pyOpenRPA.Orchestrator.Managers.Process &mdash; документация pyOpenRPA v1.2.12 v1.2.12</title>
<link rel="stylesheet" href="../../../../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../../../../_static/pygments.css" type="text/css" />
<link rel="shortcut icon" href="../../../../_static/favicon.ico"/>
<!--[if lt IE 9]>
<script src="../../../../_static/js/html5shiv.min.js"></script>
<![endif]-->
<script type="text/javascript" id="documentation_options" data-url_root="../../../../" src="../../../../_static/documentation_options.js"></script>
<script src="../../../../_static/jquery.js"></script>
<script src="../../../../_static/underscore.js"></script>
<script src="../../../../_static/doctools.js"></script>
<script src="../../../../_static/translations.js"></script>
<script type="text/javascript" src="../../../../_static/js/theme.js"></script>
<link rel="index" title="Алфавитный указатель" href="../../../../genindex.html" />
<link rel="search" title="Поиск" href="../../../../search.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../../../../index.html" class="icon icon-home"> pyOpenRPA v1.2.12
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../../../search.html" method="get">
<input type="text" name="q" placeholder="Поиск в документации" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<p class="caption"><span class="caption-text">ОБЩЕЕ</span></p>
<ul>
<li class="toctree-l1"><a class="reference external" href="https://pyopenrpa.ru/wiki/guide/index">Выбрать версию</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../01_HowToInstall.html">1. Первый запуск</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../03_Copyrights_Contacts.html">2. Права &amp; Контакты</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ РОБОТ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../../Robot/01_Robot.html">1. Описание</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../Robot/02_Defs.html">2. Функции</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../Robot/03_HowToUse.html">3. Как использовать?</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../Robot/04_Dependencies.html">4. Зависимости</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ СТУДИЯ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../../Studio/01_Studio.html">1. Описание</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../Studio/02_HowToUse.html">2. Как использовать?</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ ОРКЕСТРАТОР</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../../Orchestrator/01_Orchestrator.html">1. Description</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../Orchestrator/02_Defs.html">2. Defs</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../Orchestrator/03_gSettingsTemplate.html">3. gSettings Template</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../Orchestrator/04_HowToUse.html">4. How to use</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../Orchestrator/05_UAC.html">5. UAC - User Access Control</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../Orchestrator/06_Defs%20Managers.html">6. Defs Managers</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ АГЕНТ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../../Agent/02_Defs.html">2. Defs</a></li>
</ul>
<p class="caption"><span class="caption-text">ИНСТРУМЕНТЫ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../../Tools/02_Defs.html">2. Defs StopSafe</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../../../../index.html">pyOpenRPA v1.2.12</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="../../../../index.html" class="icon icon-home"></a> &raquo;</li>
<li><a href="../../../index.html">Код модуля</a> &raquo;</li>
<li>pyOpenRPA.Orchestrator.Managers.Process</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<h1>Исходный код pyOpenRPA.Orchestrator.Managers.Process</h1><div class="highlight"><pre>
<span></span><span class="c1">#from pyOpenRPA.Orchestrator import Managers</span>
<span class="kn">from</span> <span class="nn">..</span> <span class="kn">import</span> <span class="n">__Orchestrator__</span>
<span class="kn">import</span> <span class="nn">os</span>
<span class="kn">import</span> <span class="nn">time</span>
<span class="kn">from</span> <span class="nn">pyOpenRPA</span> <span class="kn">import</span> <span class="n">Orchestrator</span>
<div class="viewcode-block" id="Process"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process">[документация]</a><span class="k">class</span> <span class="nc">Process</span><span class="p">():</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Manager process, which is need to be started / stopped / restarted</span>
<span class="sd"> With Process instance you can automate your process activity. Use schedule package to set interval when process should be active and when not.</span>
<span class="sd"> All defs in class are pickle safe! After orchestrator restart (if not the force stop of the orchestrator process) your instance with properties will be restored. But it not coverage the scheduler which is in __Orchestrator__ .</span>
<span class="sd"> After orc restart you need to reinit all schedule rules: Orchestrator.OrchestratorScheduleGet</span>
<span class="sd"> Process instance has the following statuses:</span>
<span class="sd"> - 0_STOPPED</span>
<span class="sd"> - 1_STOPPED_MANUAL</span>
<span class="sd"> - 2_STOP_SAFE</span>
<span class="sd"> - 3_STOP_SAFE_MANUAL</span>
<span class="sd"> - 4_STARTED</span>
<span class="sd"> - 5_STARTED_MANUAL</span>
<span class="sd"> .. code-block:: python</span>
<span class="sd"> # For the safe init class use ProcessInitSafe</span>
<span class="sd"> lProcess = Orchestrator.Managers.ProcessInitSafe(inAgentHostNameStr=&quot;PCNAME&quot;,inAgentUserNameStr=&quot;USER&quot;,</span>
<span class="sd"> inProcessNameWOExeStr=&quot;notepad&quot;,inStartCMDStr=&quot;notepad&quot;,inStopSafeTimeoutSecFloat=3)</span>
<span class="sd"> # Async way to run job</span>
<span class="sd"> lProcess.ScheduleStatusCheckEverySeconds(inIntervalSecondsInt=5)</span>
<span class="sd"> Orchestrator.OrchestratorScheduleGet().every(5).seconds.do(Orchestrator.OrchestratorThreadStart,</span>
<span class="sd"> lProcess.StartCheck)</span>
<span class="sd"> # OR (sync mode)</span>
<span class="sd"> Orchestrator.OrchestratorScheduleGet().every(5).seconds.do(lProcess.StartCheck)</span>
<span class="sd"> How to use StopSafe on the robot side</span>
<span class="sd"> .. code-block:: python</span>
<span class="sd"> from pyOpenRPA.Tools import StopSafe</span>
<span class="sd"> StopSafe.Init(inLogger=None)</span>
<span class="sd"> StopSafe.IsSafeStop() # True - WM_CLOSE SIGNAL has come. taskkill /im someprocess.exe</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">mAgentHostNameStr</span> <span class="o">=</span> <span class="kc">None</span>
<span class="n">mAgentUserNameStr</span> <span class="o">=</span> <span class="kc">None</span>
<span class="n">mStartPathStr</span> <span class="o">=</span> <span class="kc">None</span>
<span class="n">mStartCMDStr</span> <span class="o">=</span> <span class="kc">None</span>
<span class="n">mStartArgDict</span> <span class="o">=</span> <span class="kc">None</span>
<span class="n">mStatusCheckIntervalSecFloat</span> <span class="o">=</span> <span class="kc">None</span>
<span class="n">mProcessNameWOExeStr</span> <span class="o">=</span> <span class="kc">None</span>
<span class="n">mStopSafeTimeoutSecFloat</span> <span class="o">=</span> <span class="kc">None</span>
<span class="n">mStatusStr</span> <span class="o">=</span> <span class="kc">None</span> <span class="c1"># 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL</span>
<span class="c1"># MST - Manual Stop Trigger</span>
<span class="n">mMSTdTSecFloat</span><span class="p">:</span> <span class="nb">float</span> <span class="o">=</span> <span class="kc">None</span>
<span class="n">mMSTdNInt</span> <span class="o">=</span> <span class="kc">None</span>
<span class="n">mMSTStartTimeList</span> <span class="o">=</span> <span class="p">[]</span>
<span class="n">mAgentMuteBool</span> <span class="o">=</span> <span class="kc">False</span> <span class="c1"># Mute any sends to agent while some action is perfomed</span>
<span class="n">mStatusSavedStr</span> <span class="o">=</span> <span class="kc">None</span> <span class="c1"># Saved status to the further restore</span>
<div class="viewcode-block" id="Process.MuteWait"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.MuteWait">[документация]</a> <span class="k">def</span> <span class="nf">MuteWait</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Internal def. Wait when class is apply to send new activities to the agent</span>
<span class="sd"> :return:</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">lIntervalSecFloat</span> <span class="o">=</span> <span class="mf">0.3</span>
<span class="k">while</span> <span class="bp">self</span><span class="o">.</span><span class="n">mAgentMuteBool</span> <span class="o">==</span> <span class="kc">True</span><span class="p">:</span>
<span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="n">lIntervalSecFloat</span><span class="p">)</span>
<span class="k">return</span> <span class="kc">None</span></div>
<div class="viewcode-block" id="Process.KeyTurpleGet"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.KeyTurpleGet">[документация]</a> <span class="k">def</span> <span class="nf">KeyTurpleGet</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Get the key turple of the current process</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">return</span> <span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">mAgentHostNameStr</span><span class="o">.</span><span class="n">upper</span><span class="p">(),</span> <span class="bp">self</span><span class="o">.</span><span class="n">mAgentUserNameStr</span><span class="o">.</span><span class="n">upper</span><span class="p">(),</span> <span class="bp">self</span><span class="o">.</span><span class="n">mProcessNameWOExeStr</span><span class="o">.</span><span class="n">upper</span><span class="p">())</span></div>
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">inAgentHostNameStr</span><span class="p">,</span> <span class="n">inAgentUserNameStr</span><span class="p">,</span> <span class="n">inProcessNameWOExeStr</span><span class="p">,</span> <span class="n">inStartPathStr</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">inStartCMDStr</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span> <span class="n">inStopSafeTimeoutSecFloat</span><span class="o">=</span><span class="mi">300</span><span class="p">,</span> <span class="n">inStartArgDict</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">inStatusCheckIntervalSecFloat</span><span class="o">=</span><span class="mi">30</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Init the class instance.</span>
<span class="sd"> !ATTENTION! Function can raise exception if process with the same (inAgentHostNameStr, inAgentUserNameStr, inProcessNameWOExeStr) is already exists in GSettings (can be restored from previous Orchestrator session). See ProcessInitSafe to sefaty init the instance or restore previous</span>
<span class="sd"> !ATTENTION! Schedule options you must</span>
<span class="sd"> :param inAgentHostNameStr: Agent hostname in any case. Required to identify Process</span>
<span class="sd"> :param inAgentUserNameStr: Agent user name in any case. Required to identify Process</span>
<span class="sd"> :param inProcessNameWOExeStr: The process name without extension .exe (the key of the Process instance). Any case - will be processed to the upper case</span>
<span class="sd"> :param inStartPathStr: Path to start process (.cmd/ .exe or something else). Path can be relative (from orc working directory) or absolute</span>
<span class="sd"> :param inStartCMDStr: CMD script to start program (if no start file is exists)</span>
<span class="sd"> :param inStopSafeTimeoutSecFloat: Time to wait for stop safe. After that do the stop force (if process is not stopped)</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">lGS</span> <span class="o">=</span> <span class="n">__Orchestrator__</span><span class="o">.</span><span class="n">GSettingsGet</span><span class="p">()</span>
<span class="c1"># Check if Process is not exists in GSettings</span>
<span class="k">if</span> <span class="p">(</span><span class="n">inAgentHostNameStr</span><span class="o">.</span><span class="n">upper</span><span class="p">(),</span> <span class="n">inAgentUserNameStr</span><span class="o">.</span><span class="n">upper</span><span class="p">(),</span> <span class="n">inProcessNameWOExeStr</span><span class="o">.</span><span class="n">upper</span><span class="p">())</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">lGS</span><span class="p">[</span><span class="s2">&quot;ManagersProcessDict&quot;</span><span class="p">]:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mStartArgDict</span> <span class="o">=</span> <span class="n">inStartArgDict</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mAgentHostNameStr</span> <span class="o">=</span> <span class="n">inAgentHostNameStr</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mAgentUserNameStr</span> <span class="o">=</span> <span class="n">inAgentUserNameStr</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mStartPathStr</span> <span class="o">=</span> <span class="n">inStartPathStr</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mStartCMDStr</span> <span class="o">=</span> <span class="n">inStartCMDStr</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mProcessNameWOExeStr</span> <span class="o">=</span> <span class="n">inProcessNameWOExeStr</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mStopSafeTimeoutSecFloat</span> <span class="o">=</span> <span class="n">inStopSafeTimeoutSecFloat</span>
<span class="n">lGS</span><span class="p">[</span><span class="s2">&quot;ManagersProcessDict&quot;</span><span class="p">][(</span><span class="n">inAgentHostNameStr</span><span class="o">.</span><span class="n">upper</span><span class="p">(),</span> <span class="n">inAgentUserNameStr</span><span class="o">.</span><span class="n">upper</span><span class="p">(),</span> <span class="n">inProcessNameWOExeStr</span><span class="o">.</span><span class="n">upper</span><span class="p">())]</span><span class="o">=</span><span class="bp">self</span>
<span class="n">lActivityDict</span> <span class="o">=</span> <span class="n">__Orchestrator__</span><span class="o">.</span><span class="n">ProcessorActivityItemCreate</span><span class="p">(</span><span class="n">inDef</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">StatusCheck</span><span class="p">,</span><span class="n">inArgList</span><span class="o">=</span><span class="p">[],</span> <span class="n">inThreadBool</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
<span class="n">__Orchestrator__</span><span class="o">.</span><span class="n">ProcessorActivityItemAppend</span><span class="p">(</span><span class="n">inActivityItemDict</span><span class="o">=</span><span class="n">lActivityDict</span><span class="p">)</span>
<span class="k">if</span> <span class="n">inStatusCheckIntervalSecFloat</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span> <span class="n">__Orchestrator__</span><span class="o">.</span><span class="n">OrchestratorScheduleGet</span><span class="p">()</span><span class="o">.</span><span class="n">every</span><span class="p">(</span><span class="n">inStatusCheckIntervalSecFloat</span><span class="p">)</span><span class="o">.</span><span class="n">seconds</span><span class="o">.</span><span class="n">do</span><span class="p">(</span><span class="n">Orchestrator</span><span class="o">.</span><span class="n">OrchestratorThreadStart</span><span class="p">,</span><span class="bp">self</span><span class="o">.</span><span class="n">StatusCheck</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mStatusCheckIntervalSecFloat</span> <span class="o">=</span> <span class="n">inStatusCheckIntervalSecFloat</span>
<span class="k">else</span><span class="p">:</span> <span class="k">raise</span> <span class="ne">Exception</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;Managers.Process (</span><span class="si">{</span><span class="n">inAgentHostNameStr</span><span class="si">}</span><span class="s2">, </span><span class="si">{</span><span class="n">inAgentUserNameStr</span><span class="si">}</span><span class="s2">, </span><span class="si">{</span><span class="n">inProcessNameWOExeStr</span><span class="si">}</span><span class="s2">): Can&#39;t init the Process instance because it already inited in early (see ProcessInitSafe)&quot;</span><span class="p">)</span>
<div class="viewcode-block" id="Process.ManualStopTriggerSet"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.ManualStopTriggerSet">[документация]</a> <span class="k">def</span> <span class="nf">ManualStopTriggerSet</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">inMSTdTSecFloat</span><span class="p">:</span> <span class="nb">float</span><span class="p">,</span> <span class="n">inMSTdNInt</span><span class="p">:</span> <span class="nb">int</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Set ManualStopTrigger (MST) to switch to STOPPED MANUAL if specified count of start fails will be catched in specified time period</span>
<span class="sd"> :param inMSTdTSecFloat: Time perios in seconds</span>
<span class="sd"> :param inMSTdNInt: Counts of the start tries</span>
<span class="sd"> :return: None</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="c1"># MST - Manual Stop Trigger</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mMSTdTSecFloat</span> <span class="o">=</span> <span class="n">inMSTdTSecFloat</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mMSTdNInt</span> <span class="o">=</span> <span class="n">inMSTdNInt</span></div>
<div class="viewcode-block" id="Process.ManualStopTriggerNewStart"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.ManualStopTriggerNewStart">[документация]</a> <span class="k">def</span> <span class="nf">ManualStopTriggerNewStart</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Log new start event. Check if it is applicable. Change status if ManualStop trigger criteria is applied</span>
<span class="sd"> :return: # 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">mMSTdTSecFloat</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span> <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">mMSTdNInt</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
<span class="n">lTimeNowSecFloat</span> <span class="o">=</span> <span class="n">time</span><span class="o">.</span><span class="n">time</span><span class="p">()</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mMSTStartTimeList</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">lTimeNowSecFloat</span><span class="p">)</span> <span class="c1"># Append current time to MST list</span>
<span class="c1"># Remove old items from list</span>
<span class="n">lMSTStartTimeList</span> <span class="o">=</span> <span class="p">[]</span>
<span class="k">for</span> <span class="n">lTimeItemSecFloat</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">mMSTStartTimeList</span><span class="p">:</span>
<span class="n">ldTSecFloat</span> <span class="o">=</span> <span class="n">lTimeNowSecFloat</span> <span class="o">-</span> <span class="n">lTimeItemSecFloat</span>
<span class="c1"># Move to the new list if dT less</span>
<span class="k">if</span> <span class="n">ldTSecFloat</span> <span class="o">&lt;</span> <span class="bp">self</span><span class="o">.</span><span class="n">mMSTdTSecFloat</span><span class="p">:</span> <span class="n">lMSTStartTimeList</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">lTimeItemSecFloat</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mMSTStartTimeList</span> <span class="o">=</span> <span class="n">lMSTStartTimeList</span> <span class="c1"># Set new list</span>
<span class="c1"># Check count in list</span>
<span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">lMSTStartTimeList</span><span class="p">)</span> <span class="o">&gt;</span> <span class="bp">self</span><span class="o">.</span><span class="n">mMSTdNInt</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="o">=</span> <span class="s2">&quot;1_STOPPED_MANUAL&quot;</span>
<span class="c1"># Log info about process</span>
<span class="n">lL</span> <span class="o">=</span> <span class="n">__Orchestrator__</span><span class="o">.</span><span class="n">OrchestratorLoggerGet</span><span class="p">()</span>
<span class="n">lL</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;Managers.Process (</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">mAgentHostNameStr</span><span class="si">}</span><span class="s2">, </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">mAgentUserNameStr</span><span class="si">}</span><span class="s2">, </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">mProcessNameWOExeStr</span><span class="si">}</span><span class="s2">): ManualStopTrigger is activated. </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">mMSTdNInt</span><span class="si">}</span><span class="s2"> start tries in </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">mMSTdTSecFloat</span><span class="si">}</span><span class="s2"> sec.&quot;</span><span class="p">)</span>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span></div>
<div class="viewcode-block" id="Process.ManualStopListClear"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.ManualStopListClear">[документация]</a> <span class="k">def</span> <span class="nf">ManualStopListClear</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Clear the last start tries list.</span>
<span class="sd"> :return: None</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mMSTStartTimeList</span><span class="o">=</span><span class="p">[]</span></div>
<div class="viewcode-block" id="Process.Manual2Auto"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.Manual2Auto">[документация]</a> <span class="k">def</span> <span class="nf">Manual2Auto</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Remove Manual flag from process (if exists) - it will allow the schedule operations via def StatusCheckStart(self): def StatusCheckStorForce(self): def StatusCheckStopSafe(self):</span>
<span class="sd"> :return: Process status. See self.mStatusStr. 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">lLogBool</span> <span class="o">=</span> <span class="kc">False</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span><span class="o">==</span><span class="s2">&quot;1_STOPPED_MANUAL&quot;</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="o">=</span> <span class="s2">&quot;0_STOPPED&quot;</span><span class="p">;</span> <span class="n">lLogBool</span><span class="o">=</span><span class="kc">True</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span><span class="o">==</span><span class="s2">&quot;3_STOP_SAFE_MANUAL&quot;</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="o">=</span> <span class="s2">&quot;2_STOP_SAFE&quot;</span><span class="p">;</span> <span class="n">lLogBool</span><span class="o">=</span><span class="kc">True</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span><span class="o">==</span><span class="s2">&quot;5_STARTED_MANUAL&quot;</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="o">=</span> <span class="s2">&quot;4_STARTED&quot;</span><span class="p">;</span> <span class="n">lLogBool</span><span class="o">=</span><span class="kc">True</span>
<span class="c1"># Log info about process</span>
<span class="k">if</span> <span class="n">lLogBool</span> <span class="o">==</span> <span class="kc">True</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">StatusChangeLog</span><span class="p">()</span>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span></div>
<div class="viewcode-block" id="Process.Start"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.Start">[документация]</a> <span class="k">def</span> <span class="nf">Start</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">inIsManualBool</span> <span class="o">=</span> <span class="kc">True</span><span class="p">,</span> <span class="n">inStartArgDict</span><span class="o">=</span><span class="kc">None</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Manual/Auto start. Manual start will block scheduling execution. To return schedule execution use def Manual2Auto.</span>
<span class="sd"> Will not start if STOP SAFE is now and don&#39;t start auto is stopped manual now</span>
<span class="sd"> :param inIsManualBool: Default is True - Mark this operation as manual - StatusCheckStart/Stop will be blocked - only StatusCheck will be working. False - Auto operation</span>
<span class="sd"> :return: Process status. See self.mStatusStr. 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">if</span> <span class="n">inIsManualBool</span> <span class="o">==</span> <span class="kc">False</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">ManualStopTriggerNewStart</span><span class="p">()</span> <span class="c1"># Set the time</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span> <span class="ow">and</span> <span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="o">==</span> <span class="s2">&quot;1_STOPPED_MANUAL&quot;</span> <span class="ow">or</span> <span class="s2">&quot;STOP_SAFE&quot;</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span><span class="p">)</span> <span class="ow">and</span> <span class="n">inIsManualBool</span> <span class="o">==</span> <span class="kc">False</span><span class="p">:</span>
<span class="n">lStr</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot;Managers.Process (</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">mAgentHostNameStr</span><span class="si">}</span><span class="s2">, </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">mAgentUserNameStr</span><span class="si">}</span><span class="s2">, </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">mProcessNameWOExeStr</span><span class="si">}</span><span class="s2">): Process will not start because of stopped manual or stop safe is now.&quot;</span>
<span class="n">__Orchestrator__</span><span class="o">.</span><span class="n">OrchestratorLoggerGet</span><span class="p">()</span><span class="o">.</span><span class="n">warning</span><span class="p">(</span><span class="n">lStr</span><span class="p">)</span>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span>
<span class="c1"># Send activity item to agent - wait result</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStartPathStr</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span> <span class="n">lCMDStr</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">abspath</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">mStartPathStr</span><span class="p">)</span>
<span class="k">elif</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStartCMDStr</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span> <span class="n">lCMDStr</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStartCMDStr</span>
<span class="c1"># Append args</span>
<span class="k">if</span> <span class="n">inStartArgDict</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStartArgDict</span> <span class="o">=</span> <span class="n">inStartArgDict</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStartArgDict</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
<span class="k">for</span> <span class="n">lItemKeyStr</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStartArgDict</span><span class="p">:</span>
<span class="n">lItemValueStr</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStartArgDict</span><span class="p">[</span><span class="n">lItemKeyStr</span><span class="p">]</span>
<span class="n">lCMDStr</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="n">lCMDStr</span><span class="si">}</span><span class="s2"> </span><span class="si">{</span><span class="n">lItemKeyStr</span><span class="si">}</span><span class="s2"> </span><span class="si">{</span><span class="n">lItemValueStr</span><span class="si">}</span><span class="s2">&quot;</span>
<span class="c1">#import pdb</span>
<span class="c1">#pdb.set_trace()</span>
<span class="bp">self</span><span class="o">.</span><span class="n">MuteWait</span><span class="p">()</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mAgentMuteBool</span><span class="o">=</span><span class="kc">True</span>
<span class="n">lActivityItemStart</span> <span class="o">=</span> <span class="n">__Orchestrator__</span><span class="o">.</span><span class="n">ProcessorActivityItemCreate</span><span class="p">(</span><span class="n">inDef</span><span class="o">=</span><span class="s2">&quot;OSCMD&quot;</span><span class="p">,</span>
<span class="n">inArgDict</span><span class="o">=</span><span class="p">{</span><span class="s2">&quot;inCMDStr&quot;</span><span class="p">:</span><span class="n">lCMDStr</span><span class="p">,</span><span class="s2">&quot;inSendOutputToOrchestratorLogsBool&quot;</span><span class="p">:</span><span class="kc">False</span><span class="p">,</span> <span class="s2">&quot;inCaptureBool&quot;</span><span class="p">:</span><span class="kc">False</span><span class="p">},</span>
<span class="n">inArgGSettingsStr</span><span class="o">=</span><span class="s2">&quot;inGSettings&quot;</span><span class="p">)</span>
<span class="n">lGUIDStr</span> <span class="o">=</span> <span class="n">__Orchestrator__</span><span class="o">.</span><span class="n">AgentActivityItemAdd</span><span class="p">(</span><span class="n">inHostNameStr</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">mAgentHostNameStr</span><span class="p">,</span>
<span class="n">inUserStr</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">mAgentUserNameStr</span><span class="p">,</span>
<span class="n">inActivityItemDict</span><span class="o">=</span><span class="n">lActivityItemStart</span><span class="p">)</span>
<span class="n">lStartResult</span> <span class="o">=</span> <span class="n">__Orchestrator__</span><span class="o">.</span><span class="n">AgentActivityItemReturnGet</span><span class="p">(</span><span class="n">inGUIDStr</span><span class="o">=</span><span class="n">lGUIDStr</span><span class="p">)</span>
<span class="k">if</span> <span class="n">inIsManualBool</span><span class="o">==</span><span class="kc">True</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="o">=</span> <span class="s2">&quot;5_STARTED_MANUAL&quot;</span>
<span class="k">else</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="o">=</span> <span class="s2">&quot;4_STARTED&quot;</span>
<span class="c1"># Log info about process</span>
<span class="bp">self</span><span class="o">.</span><span class="n">StatusChangeLog</span><span class="p">()</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mAgentMuteBool</span> <span class="o">=</span> <span class="kc">False</span>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span></div>
<div class="viewcode-block" id="Process.StartCheck"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.StartCheck">[документация]</a> <span class="k">def</span> <span class="nf">StartCheck</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Start program if auto stopped (0_STOPPED).</span>
<span class="sd"> :return: Process status. See self.mStatusStr. 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="bp">self</span><span class="o">.</span><span class="n">MuteWait</span><span class="p">()</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="o">==</span> <span class="s2">&quot;0_STOPPED&quot;</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">Start</span><span class="p">(</span><span class="n">inIsManualBool</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span></div>
<div class="viewcode-block" id="Process.StopSafe"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.StopSafe">[документация]</a> <span class="k">def</span> <span class="nf">StopSafe</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">inIsManualBool</span> <span class="o">=</span> <span class="kc">True</span><span class="p">,</span> <span class="n">inStopSafeTimeoutSecFloat</span> <span class="o">=</span> <span class="kc">None</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Manual/Auto stop safe. Stop safe is the operation which send signal to process to terminate own work (send term signal to process). Managers.Process wait for the mStopSafeTimeoutSecFloat seconds. After that, if process is not terminated - self will StopForce it.</span>
<span class="sd"> Manual stop safe will block scheduling execution. To return schedule execution use def Manual2Auto</span>
<span class="sd"> :param inIsManualBool: Default is True - Mark this operation as manual - StatusCheckStart/Stop will be blocked - only StatusCheck will be working. False - Auto operation</span>
<span class="sd"> :param inStopSafeTimeoutSecFloat: Default value goes from the instance. You can specify time is second to wait while safe stop. After that program will stop force</span>
<span class="sd"> :return: Process status. See self.mStatusStr. 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">if</span> <span class="n">inStopSafeTimeoutSecFloat</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span> <span class="n">inStopSafeTimeoutSecFloat</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStopSafeTimeoutSecFloat</span>
<span class="bp">self</span><span class="o">.</span><span class="n">MuteWait</span><span class="p">()</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mAgentMuteBool</span><span class="o">=</span><span class="kc">True</span>
<span class="c1"># Send activity item to agent - wait result</span>
<span class="n">lCMDStr</span> <span class="o">=</span> <span class="sa">f</span><span class="s1">&#39;taskkill /im &quot;</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">mProcessNameWOExeStr</span><span class="si">}</span><span class="s1">.exe&quot; /fi &quot;username eq %USERNAME%&quot;&#39;</span>
<span class="n">lActivityItemStart</span> <span class="o">=</span> <span class="n">__Orchestrator__</span><span class="o">.</span><span class="n">ProcessorActivityItemCreate</span><span class="p">(</span>
<span class="n">inDef</span><span class="o">=</span><span class="s2">&quot;OSCMD&quot;</span><span class="p">,</span><span class="n">inArgDict</span><span class="o">=</span><span class="p">{</span><span class="s2">&quot;inCMDStr&quot;</span><span class="p">:</span> <span class="n">lCMDStr</span><span class="p">,</span><span class="s2">&quot;inSendOutputToOrchestratorLogsBool&quot;</span><span class="p">:</span><span class="kc">False</span><span class="p">,</span> <span class="s2">&quot;inCaptureBool&quot;</span><span class="p">:</span> <span class="kc">False</span><span class="p">},</span><span class="n">inArgGSettingsStr</span><span class="o">=</span><span class="s2">&quot;inGSettings&quot;</span><span class="p">)</span>
<span class="n">lGUIDStr</span> <span class="o">=</span> <span class="n">__Orchestrator__</span><span class="o">.</span><span class="n">AgentActivityItemAdd</span><span class="p">(</span><span class="n">inHostNameStr</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">mAgentHostNameStr</span><span class="p">,</span>
<span class="n">inUserStr</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">mAgentUserNameStr</span><span class="p">,</span>
<span class="n">inActivityItemDict</span><span class="o">=</span><span class="n">lActivityItemStart</span><span class="p">)</span>
<span class="n">lStartResult</span> <span class="o">=</span> <span class="n">__Orchestrator__</span><span class="o">.</span><span class="n">AgentActivityItemReturnGet</span><span class="p">(</span><span class="n">inGUIDStr</span><span class="o">=</span><span class="n">lGUIDStr</span><span class="p">)</span>
<span class="k">if</span> <span class="n">inIsManualBool</span><span class="o">==</span><span class="kc">True</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="o">=</span> <span class="s2">&quot;3_STOP_SAFE_MANUAL&quot;</span>
<span class="k">else</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="o">=</span> <span class="s2">&quot;2_STOP_SAFE&quot;</span>
<span class="c1"># Log info about process</span>
<span class="bp">self</span><span class="o">.</span><span class="n">StatusChangeLog</span><span class="p">()</span>
<span class="c1"># Interval check is stopped</span>
<span class="n">lTimeStartFloat</span> <span class="o">=</span> <span class="n">time</span><span class="o">.</span><span class="n">time</span><span class="p">()</span>
<span class="n">lIntervalCheckSafeStatusFLoat</span> <span class="o">=</span> <span class="mf">15.0</span>
<span class="k">while</span> <span class="s2">&quot;SAFE&quot;</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="ow">and</span> <span class="p">(</span><span class="n">time</span><span class="o">.</span><span class="n">time</span><span class="p">()</span> <span class="o">-</span> <span class="n">lTimeStartFloat</span><span class="p">)</span> <span class="o">&lt;</span> <span class="n">inStopSafeTimeoutSecFloat</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">StatusCheck</span><span class="p">()</span>
<span class="k">if</span> <span class="s2">&quot;SAFE&quot;</span> <span class="ow">not</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span><span class="p">:</span> <span class="k">break</span>
<span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="n">lIntervalCheckSafeStatusFLoat</span><span class="p">)</span>
<span class="k">if</span> <span class="s2">&quot;SAFE&quot;</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span><span class="p">:</span>
<span class="c1"># Log info about process</span>
<span class="n">lL</span> <span class="o">=</span> <span class="n">__Orchestrator__</span><span class="o">.</span><span class="n">OrchestratorLoggerGet</span><span class="p">()</span>
<span class="n">lL</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;Managers.Process (</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">mAgentHostNameStr</span><span class="si">}</span><span class="s2">, </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">mAgentUserNameStr</span><span class="si">}</span><span class="s2">, </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">mProcessNameWOExeStr</span><span class="si">}</span><span class="s2">): Safe stop has been wait for </span><span class="si">{</span><span class="n">inStopSafeTimeoutSecFloat</span><span class="si">}</span><span class="s2"> sec. Now do the force stop.&quot;</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">StopForce</span><span class="p">(</span><span class="n">inIsManualBool</span><span class="o">=</span><span class="n">inIsManualBool</span><span class="p">,</span><span class="n">inMuteIgnoreBool</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
<span class="c1"># Log info about process</span>
<span class="c1"># self.StatusChangeLog() status check has already log status (see above)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mAgentMuteBool</span> <span class="o">=</span> <span class="kc">False</span>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span></div>
<div class="viewcode-block" id="Process.StopSafeCheck"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.StopSafeCheck">[документация]</a> <span class="k">def</span> <span class="nf">StopSafeCheck</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">inStopSafeTimeoutSecFloat</span> <span class="o">=</span> <span class="kc">None</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Stop safe program if auto started (4_STARTED).</span>
<span class="sd"> :param inStopSafeTimeoutSecFloat: Default value goes from the instance. You can specify time is second to wait while safe stop. After that program will stop force</span>
<span class="sd"> :return: Process status. See self.mStatusStr. 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="bp">self</span><span class="o">.</span><span class="n">MuteWait</span><span class="p">()</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="o">==</span> <span class="s2">&quot;4_STARTED&quot;</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">StopSafe</span><span class="p">(</span><span class="n">inIsManualBool</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">inStopSafeTimeoutSecFloat</span> <span class="o">=</span> <span class="n">inStopSafeTimeoutSecFloat</span><span class="p">)</span>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span></div>
<div class="viewcode-block" id="Process.StopForce"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.StopForce">[документация]</a> <span class="k">def</span> <span class="nf">StopForce</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">inIsManualBool</span> <span class="o">=</span> <span class="kc">True</span><span class="p">,</span> <span class="n">inMuteIgnoreBool</span> <span class="o">=</span> <span class="kc">False</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Manual/Auto stop force. Force stop don&#39;t wait process termination - it just terminate process now.</span>
<span class="sd"> Manual stop safe will block scheduling execution. To return schedule execution use def Manual2Auto</span>
<span class="sd"> :param inIsManualBool: Default is True - Mark this operation as manual - StatusCheckStart/Stop will be blocked - only StatusCheck will be working. False - Auto operation</span>
<span class="sd"> :return: Process status. See self.mStatusStr. 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">if</span> <span class="n">inMuteIgnoreBool</span> <span class="o">==</span> <span class="kc">False</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">MuteWait</span><span class="p">()</span>
<span class="n">lMuteWorkBool</span> <span class="o">=</span> <span class="kc">False</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">mAgentMuteBool</span><span class="o">==</span><span class="kc">False</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">mAgentMuteBool</span><span class="o">=</span><span class="kc">True</span><span class="p">;</span> <span class="n">lMuteWorkBool</span><span class="o">=</span><span class="kc">True</span>
<span class="c1"># Send activity item to agent - wait result</span>
<span class="n">lCMDStr</span> <span class="o">=</span> <span class="sa">f</span><span class="s1">&#39;taskkill /F /im &quot;</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">mProcessNameWOExeStr</span><span class="si">}</span><span class="s1">.exe&quot; /fi &quot;username eq %USERNAME%&quot;&#39;</span>
<span class="n">lActivityItemStart</span> <span class="o">=</span> <span class="n">__Orchestrator__</span><span class="o">.</span><span class="n">ProcessorActivityItemCreate</span><span class="p">(</span>
<span class="n">inDef</span><span class="o">=</span><span class="s2">&quot;OSCMD&quot;</span><span class="p">,</span><span class="n">inArgDict</span><span class="o">=</span><span class="p">{</span><span class="s2">&quot;inCMDStr&quot;</span><span class="p">:</span> <span class="n">lCMDStr</span><span class="p">,</span><span class="s2">&quot;inSendOutputToOrchestratorLogsBool&quot;</span><span class="p">:</span><span class="kc">False</span><span class="p">,</span> <span class="s2">&quot;inCaptureBool&quot;</span><span class="p">:</span> <span class="kc">False</span><span class="p">},</span><span class="n">inArgGSettingsStr</span><span class="o">=</span><span class="s2">&quot;inGSettings&quot;</span><span class="p">)</span>
<span class="n">lGUIDStr</span> <span class="o">=</span> <span class="n">__Orchestrator__</span><span class="o">.</span><span class="n">AgentActivityItemAdd</span><span class="p">(</span><span class="n">inHostNameStr</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">mAgentHostNameStr</span><span class="p">,</span>
<span class="n">inUserStr</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">mAgentUserNameStr</span><span class="p">,</span>
<span class="n">inActivityItemDict</span><span class="o">=</span><span class="n">lActivityItemStart</span><span class="p">)</span>
<span class="n">lStartResult</span> <span class="o">=</span> <span class="n">__Orchestrator__</span><span class="o">.</span><span class="n">AgentActivityItemReturnGet</span><span class="p">(</span><span class="n">inGUIDStr</span><span class="o">=</span><span class="n">lGUIDStr</span><span class="p">)</span>
<span class="k">if</span> <span class="n">inIsManualBool</span><span class="o">==</span><span class="kc">True</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="o">=</span> <span class="s2">&quot;1_STOPPED_MANUAL&quot;</span>
<span class="k">else</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="o">=</span> <span class="s2">&quot;0_STOPPED&quot;</span>
<span class="c1"># Log info about process</span>
<span class="bp">self</span><span class="o">.</span><span class="n">StatusChangeLog</span><span class="p">()</span>
<span class="k">if</span> <span class="n">lMuteWorkBool</span> <span class="o">==</span> <span class="kc">True</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mAgentMuteBool</span><span class="o">=</span><span class="kc">False</span>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span></div>
<div class="viewcode-block" id="Process.StopForceCheck"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.StopForceCheck">[документация]</a> <span class="k">def</span> <span class="nf">StopForceCheck</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Stop force program if auto started (4_STARTED).</span>
<span class="sd"> :return: Process status. See self.mStatusStr. 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="bp">self</span><span class="o">.</span><span class="n">MuteWait</span><span class="p">()</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="o">==</span> <span class="s2">&quot;4_STARTED&quot;</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">StopForce</span><span class="p">(</span><span class="n">inIsManualBool</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span></div>
<div class="viewcode-block" id="Process.RestartSafe"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.RestartSafe">[документация]</a> <span class="k">def</span> <span class="nf">RestartSafe</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">inIsManualBool</span> <span class="o">=</span> <span class="kc">True</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Manual/Auto restart safe. Restart safe is the operation which send signal to process to terminate own work (send term signal to process). Then it run process. Managers.Process wait for the mStopSafeTimeoutSecFloat seconds. After that, if process is not terminated - self will StopForce it.</span>
<span class="sd"> Manual stop safe will block scheduling execution. To return schedule execution use def Manual2Auto</span>
<span class="sd"> :param inIsManualBool: Default is True - Mark this operation as manual - StatusCheckStart/Stop will be blocked - only StatusCheck will be working. False - Auto operation</span>
<span class="sd"> :return: Process status. See self.mStatusStr. 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="bp">self</span><span class="o">.</span><span class="n">StopSafe</span><span class="p">(</span><span class="n">inIsManualBool</span><span class="o">=</span><span class="n">inIsManualBool</span><span class="p">)</span>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">Start</span><span class="p">(</span><span class="n">inIsManualBool</span><span class="o">=</span><span class="n">inIsManualBool</span><span class="p">)</span></div>
<div class="viewcode-block" id="Process.RestartForce"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.RestartForce">[документация]</a> <span class="k">def</span> <span class="nf">RestartForce</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">inIsManualBool</span> <span class="o">=</span> <span class="kc">True</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Manual/Auto restart force. Force restart dont wait process termination - it just terminate process now ant then start it.</span>
<span class="sd"> Manual restart will block scheduling execution. To return schedule execution use def Manual2Auto</span>
<span class="sd"> :param inIsManualBool: Default is True - Mark this operation as manual - StatusCheckStart/Stop will be blocked - only StatusCheck will be working. False - Auto operation</span>
<span class="sd"> :return: Process status. See self.mStatusStr. 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="bp">self</span><span class="o">.</span><span class="n">StopForce</span><span class="p">(</span><span class="n">inIsManualBool</span><span class="o">=</span><span class="n">inIsManualBool</span><span class="p">)</span>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">Start</span><span class="p">(</span><span class="n">inIsManualBool</span><span class="o">=</span><span class="n">inIsManualBool</span><span class="p">)</span></div>
<div class="viewcode-block" id="Process.StatusSave"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.StatusSave">[документация]</a> <span class="k">def</span> <span class="nf">StatusSave</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Save current status of the process. After that you can restore process activity. Work when orchestrator is restarted. Don&#39;t save &quot;STOP_SAFE&quot; status &gt; &quot;STOPPED&quot;</span>
<span class="sd"> :return: Process status. See self.mStatusStr. 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">lWarnSafeBool</span> <span class="o">=</span> <span class="kc">True</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="o">==</span> <span class="s2">&quot;2_STOP_SAFE&quot;</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusSavedStr</span> <span class="o">=</span> <span class="s2">&quot;0_STOPPED&quot;</span>
<span class="k">elif</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="o">==</span> <span class="s2">&quot;3_STOP_SAFE_MANUAL&quot;</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusSavedStr</span> <span class="o">=</span> <span class="s2">&quot;1_STOPPED_MANUAL&quot;</span>
<span class="k">else</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusSavedStr</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span><span class="p">;</span> <span class="n">lWarnSafeBool</span> <span class="o">=</span> <span class="kc">False</span>
<span class="k">if</span> <span class="n">lWarnSafeBool</span><span class="o">==</span><span class="kc">True</span><span class="p">:</span> <span class="n">__Orchestrator__</span><span class="o">.</span><span class="n">OrchestratorLoggerGet</span><span class="p">()</span><span class="o">.</span><span class="n">warning</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;Managers.Process (</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">mAgentHostNameStr</span><span class="si">}</span><span class="s2">, </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">mAgentUserNameStr</span><span class="si">}</span><span class="s2">, </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">mProcessNameWOExeStr</span><span class="si">}</span><span class="s2">): Safe status has been catched when safe &gt; change saved status to stopped.&quot;</span><span class="p">)</span>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span></div>
<div class="viewcode-block" id="Process.StatusCheckIntervalRestore"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.StatusCheckIntervalRestore">[документация]</a> <span class="k">def</span> <span class="nf">StatusCheckIntervalRestore</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Call from orchestrator when init</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusCheckIntervalSecFloat</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
<span class="n">__Orchestrator__</span><span class="o">.</span><span class="n">OrchestratorLoggerGet</span><span class="p">()</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;Managers.Process (</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">mAgentHostNameStr</span><span class="si">}</span><span class="s2">, </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">mAgentUserNameStr</span><span class="si">}</span><span class="s2">, </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">mProcessNameWOExeStr</span><span class="si">}</span><span class="s2">): Restore schedule to StatusCheck in interval of </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">mStatusCheckIntervalSecFloat</span><span class="si">}</span><span class="s2"> sec.&quot;</span><span class="p">)</span>
<span class="n">__Orchestrator__</span><span class="o">.</span><span class="n">OrchestratorScheduleGet</span><span class="p">()</span><span class="o">.</span><span class="n">every</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">mStatusCheckIntervalSecFloat</span><span class="p">)</span><span class="o">.</span><span class="n">seconds</span><span class="o">.</span><span class="n">do</span><span class="p">(</span><span class="n">Orchestrator</span><span class="o">.</span><span class="n">OrchestratorThreadStart</span><span class="p">,</span><span class="bp">self</span><span class="o">.</span><span class="n">StatusCheck</span><span class="p">)</span></div>
<div class="viewcode-block" id="Process.StatusRestore"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.StatusRestore">[документация]</a> <span class="k">def</span> <span class="nf">StatusRestore</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Execute the StatusCheck, after that restore status to the saved state (see StatusSave). Work when orchestrator is restarted.</span>
<span class="sd"> :return: Process status. See self.mStatusStr. 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="bp">self</span><span class="o">.</span><span class="n">StatusCheck</span><span class="p">()</span> <span class="c1"># check current status</span>
<span class="c1"># Do some action</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusSavedStr</span> <span class="o">!=</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusSavedStr</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
<span class="c1">#lManualBool = False</span>
<span class="c1">#if &quot;MANUAL&quot; in self.mStatusSavedStr:</span>
<span class="c1"># lManualBool = True</span>
<span class="k">if</span> <span class="s2">&quot;STOPPED&quot;</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusSavedStr</span> <span class="ow">and</span> <span class="s2">&quot;STOPPED&quot;</span> <span class="ow">not</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">StopSafe</span><span class="p">(</span><span class="n">inIsManualBool</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
<span class="k">if</span> <span class="s2">&quot;STARTED&quot;</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusSavedStr</span> <span class="ow">and</span> <span class="s2">&quot;STARTED&quot;</span> <span class="ow">not</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">Start</span><span class="p">(</span><span class="n">inIsManualBool</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
<span class="n">Orchestrator</span><span class="o">.</span><span class="n">OrchestratorLoggerGet</span><span class="p">()</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;Managers.Process (</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">mAgentHostNameStr</span><span class="si">}</span><span class="s2">, </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">mAgentUserNameStr</span><span class="si">}</span><span class="s2">, </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">mProcessNameWOExeStr</span><span class="si">}</span><span class="s2">): Status has been restored to </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">mStatusSavedStr</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusSavedStr</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mStatusSavedStr</span> <span class="o">=</span> <span class="kc">None</span>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span></div>
<div class="viewcode-block" id="Process.StatusChangeLog"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.StatusChangeLog">[документация]</a> <span class="k">def</span> <span class="nf">StatusChangeLog</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Lof information about status change</span>
<span class="sd"> :return:</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="c1"># Log info about process</span>
<span class="n">lL</span> <span class="o">=</span> <span class="n">__Orchestrator__</span><span class="o">.</span><span class="n">OrchestratorLoggerGet</span><span class="p">()</span>
<span class="n">lL</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;Managers.Process (</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">mAgentHostNameStr</span><span class="si">}</span><span class="s2">, </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">mAgentUserNameStr</span><span class="si">}</span><span class="s2">, </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">mProcessNameWOExeStr</span><span class="si">}</span><span class="s2">): Status has been changed to </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span><span class="si">}</span><span class="s2">)&quot;</span><span class="p">)</span></div>
<div class="viewcode-block" id="Process.StatusCheck"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.StatusCheck">[документация]</a> <span class="k">def</span> <span class="nf">StatusCheck</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Check if process is alive. The def will save the manual flag is exists. Don&#39;t wait mute but set mute if it is not set.</span>
<span class="sd"> :return: Process status. See self.mStatusStr. 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="c1"># Send activity item to agent - wait result</span>
<span class="n">lLogBool</span> <span class="o">=</span> <span class="kc">False</span>
<span class="n">lActivityItemUserProcessList</span> <span class="o">=</span> <span class="n">__Orchestrator__</span><span class="o">.</span><span class="n">ProcessorActivityItemCreate</span><span class="p">(</span><span class="n">inDef</span><span class="o">=</span><span class="s2">&quot;ProcessWOExeUpperUserListGet&quot;</span><span class="p">)</span>
<span class="c1">#self.MuteWait()</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mAgentMuteBool</span><span class="o">=</span><span class="kc">True</span>
<span class="n">lGUIDStr</span> <span class="o">=</span> <span class="n">__Orchestrator__</span><span class="o">.</span><span class="n">AgentActivityItemAdd</span><span class="p">(</span><span class="n">inHostNameStr</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">mAgentHostNameStr</span><span class="p">,</span><span class="n">inUserStr</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">mAgentUserNameStr</span><span class="p">,</span><span class="n">inActivityItemDict</span><span class="o">=</span><span class="n">lActivityItemUserProcessList</span><span class="p">)</span>
<span class="n">lUserProcessList</span> <span class="o">=</span> <span class="n">__Orchestrator__</span><span class="o">.</span><span class="n">AgentActivityItemReturnGet</span><span class="p">(</span><span class="n">inGUIDStr</span><span class="o">=</span><span class="n">lGUIDStr</span><span class="p">)</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">mProcessNameWOExeStr</span><span class="o">.</span><span class="n">upper</span><span class="p">()</span> <span class="ow">in</span> <span class="n">lUserProcessList</span><span class="p">:</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="o">==</span> <span class="s2">&quot;1_STOPPED_MANUAL&quot;</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="o">=</span> <span class="s2">&quot;5_STARTED_MANUAL&quot;</span><span class="p">;</span> <span class="n">lLogBool</span><span class="o">=</span><span class="kc">True</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="o">==</span> <span class="s2">&quot;0_STOPPED&quot;</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="o">=</span> <span class="s2">&quot;4_STARTED&quot;</span><span class="p">;</span> <span class="n">lLogBool</span><span class="o">=</span><span class="kc">True</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="o">=</span> <span class="s2">&quot;4_STARTED&quot;</span><span class="p">;</span> <span class="n">lLogBool</span><span class="o">=</span><span class="kc">True</span>
<span class="k">else</span><span class="p">:</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="o">==</span> <span class="s2">&quot;2_STOP_SAFE&quot;</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="o">=</span> <span class="s2">&quot;0_STOPPED&quot;</span><span class="p">;</span> <span class="n">lLogBool</span> <span class="o">=</span> <span class="kc">True</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="o">==</span> <span class="s2">&quot;3_STOP_SAFE_MANUAL&quot;</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="o">=</span> <span class="s2">&quot;1_STOPPED_MANUAL&quot;</span><span class="p">;</span> <span class="n">lLogBool</span> <span class="o">=</span> <span class="kc">True</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="o">==</span> <span class="s2">&quot;5_STARTED_MANUAL&quot;</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="o">=</span> <span class="s2">&quot;1_STOPPED_MANUAL&quot;</span><span class="p">;</span> <span class="n">lLogBool</span><span class="o">=</span><span class="kc">True</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="o">==</span> <span class="s2">&quot;4_STARTED&quot;</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="o">=</span> <span class="s2">&quot;0_STOPPED&quot;</span><span class="p">;</span> <span class="n">lLogBool</span><span class="o">=</span><span class="kc">True</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="o">=</span> <span class="s2">&quot;0_STOPPED&quot;</span><span class="p">;</span> <span class="n">lLogBool</span><span class="o">=</span><span class="kc">True</span>
<span class="c1"># Log info about process</span>
<span class="k">if</span> <span class="n">lLogBool</span> <span class="o">==</span> <span class="kc">True</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">StatusChangeLog</span><span class="p">()</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mAgentMuteBool</span> <span class="o">=</span> <span class="kc">False</span>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span></div>
<div class="viewcode-block" id="Process.StatusCheckStart"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.StatusCheckStart">[документация]</a> <span class="k">def</span> <span class="nf">StatusCheckStart</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Check process status and run it if auto stopped self.mStatusStr is &quot;0_STOPPED&quot;</span>
<span class="sd"> :return: Process status. See self.mStatusStr. 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">lStatusStr</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">StatusCheck</span><span class="p">()</span>
<span class="k">if</span> <span class="n">lStatusStr</span> <span class="o">==</span> <span class="s2">&quot;0_STOPPED&quot;</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">Start</span><span class="p">(</span><span class="n">inIsManualBool</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span></div>
<div class="viewcode-block" id="Process.StatusCheckStopForce"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.StatusCheckStopForce">[документация]</a> <span class="k">def</span> <span class="nf">StatusCheckStopForce</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Check process status and auto stop force it if self.mStatusStr is 4_STARTED</span>
<span class="sd"> :return: Process status. See self.mStatusStr. 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">lStatusStr</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">StatusCheck</span><span class="p">()</span>
<span class="k">if</span> <span class="n">lStatusStr</span> <span class="o">==</span> <span class="s2">&quot;4_STARTED&quot;</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">StopForce</span><span class="p">(</span><span class="n">inIsManualBool</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span></div>
<div class="viewcode-block" id="Process.StatusCheckStopSafe"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.StatusCheckStopSafe">[документация]</a> <span class="k">def</span> <span class="nf">StatusCheckStopSafe</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Check process status and auto stop safe it if self.mStatusStr is 4_STARTED</span>
<span class="sd"> :return:</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">lStatusStr</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">StatusCheck</span><span class="p">()</span>
<span class="k">if</span> <span class="n">lStatusStr</span> <span class="o">==</span> <span class="s2">&quot;4_STARTED&quot;</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">StopSafe</span><span class="p">(</span><span class="n">inIsManualBool</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span></div></div>
<div class="viewcode-block" id="ProcessInitSafe"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessInitSafe">[документация]</a><span class="k">def</span> <span class="nf">ProcessInitSafe</span><span class="p">(</span><span class="n">inAgentHostNameStr</span><span class="p">,</span> <span class="n">inAgentUserNameStr</span><span class="p">,</span> <span class="n">inProcessNameWOExeStr</span><span class="p">,</span> <span class="n">inStartPathStr</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">inStartCMDStr</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span> <span class="n">inStopSafeTimeoutSecFloat</span><span class="o">=</span><span class="mi">300</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Process</span><span class="p">:</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Exception safe function. Check if process instance is not exists in GSettings (it can be after restart because Orchestrator restore objects from dump of the previous Orchestrator session)</span>
<span class="sd"> Return existing instance (if exists) or create new instance and return it.</span>
<span class="sd"> :param inAgentHostNameStr: Agent hostname in any case. Required to identify Process</span>
<span class="sd"> :param inAgentUserNameStr: Agent user name in any case. Required to identify Process</span>
<span class="sd"> :param inProcessNameWOExeStr: The process name without extension .exe (the key of the Process instance). Any case - will be processed to the upper case</span>
<span class="sd"> :param inStartPathStr: Path to start process (.cmd/ .exe or something else). Path can be relative (from orc working directory) or absolute</span>
<span class="sd"> :param inStartCMDStr: CMD script to start program (if no start file is exists)</span>
<span class="sd"> :param inStopSafeTimeoutSecFloat: Time to wait for stop safe. After that do the stop force (if process is not stopped)</span>
<span class="sd"> :return: Process instance</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">lProcess</span> <span class="o">=</span> <span class="n">ProcessGet</span><span class="p">(</span><span class="n">inAgentHostNameStr</span> <span class="o">=</span> <span class="n">inAgentHostNameStr</span><span class="p">,</span> <span class="n">inAgentUserNameStr</span> <span class="o">=</span> <span class="n">inAgentUserNameStr</span><span class="p">,</span> <span class="n">inProcessNameWOExeStr</span><span class="o">=</span><span class="n">inProcessNameWOExeStr</span><span class="p">)</span>
<span class="k">if</span> <span class="n">lProcess</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span> <span class="k">return</span> <span class="n">lProcess</span>
<span class="k">else</span><span class="p">:</span> <span class="k">return</span> <span class="n">Process</span><span class="p">(</span><span class="n">inAgentHostNameStr</span><span class="o">=</span><span class="n">inAgentHostNameStr</span><span class="p">,</span><span class="n">inAgentUserNameStr</span><span class="o">=</span><span class="n">inAgentUserNameStr</span><span class="p">,</span><span class="n">inProcessNameWOExeStr</span><span class="o">=</span><span class="n">inProcessNameWOExeStr</span><span class="p">,</span>
<span class="n">inStartPathStr</span><span class="o">=</span><span class="n">inStartPathStr</span><span class="p">,</span><span class="n">inStartCMDStr</span><span class="o">=</span><span class="n">inStartCMDStr</span><span class="p">,</span><span class="n">inStopSafeTimeoutSecFloat</span><span class="o">=</span><span class="n">inStopSafeTimeoutSecFloat</span><span class="p">)</span></div>
<div class="viewcode-block" id="ProcessExists"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessExists">[документация]</a><span class="k">def</span> <span class="nf">ProcessExists</span><span class="p">(</span><span class="n">inAgentHostNameStr</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">inAgentUserNameStr</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">inProcessNameWOExeStr</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">bool</span><span class="p">:</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Check if the Process instance is exists in GSettings by the (inAgentHostNameStr: str, inAgentUserNameStr: str, inProcessNameWOExeStr: str)</span>
<span class="sd"> :param inAgentHostNameStr: Agent hostname in any case. Required to identify Process</span>
<span class="sd"> :param inAgentUserNameStr: Agent user name in any case. Required to identify Process</span>
<span class="sd"> :param inProcessNameWOExeStr: The process name without extension .exe (the key of the Process instance). Any case - will be processed to the upper case</span>
<span class="sd"> :return: True - process exists in gsettings; False - else</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">return</span> <span class="p">(</span><span class="n">inAgentHostNameStr</span><span class="o">.</span><span class="n">upper</span><span class="p">(),</span> <span class="n">inAgentUserNameStr</span><span class="o">.</span><span class="n">upper</span><span class="p">(),</span> <span class="n">inProcessNameWOExeStr</span><span class="o">.</span><span class="n">upper</span><span class="p">())</span> <span class="ow">in</span> <span class="n">__Orchestrator__</span><span class="o">.</span><span class="n">GSettingsGet</span><span class="p">()[</span><span class="s2">&quot;ManagersProcessDict&quot;</span><span class="p">]</span></div>
<div class="viewcode-block" id="ProcessGet"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessGet">[документация]</a><span class="k">def</span> <span class="nf">ProcessGet</span><span class="p">(</span><span class="n">inAgentHostNameStr</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">inAgentUserNameStr</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">inProcessNameWOExeStr</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Process</span><span class="p">:</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Return the process instance by the inProcessNameWOExeStr</span>
<span class="sd"> :param inAgentHostNameStr: Agent hostname in any case. Required to identify Process</span>
<span class="sd"> :param inAgentUserNameStr: Agent user name in any case. Required to identify Process</span>
<span class="sd"> :param inProcessNameWOExeStr: The process name without extension .exe (the key of the Process instance). Any case - will be processed to the upper case</span>
<span class="sd"> :return: Process instance (if exists) Else None</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">return</span> <span class="n">__Orchestrator__</span><span class="o">.</span><span class="n">GSettingsGet</span><span class="p">()[</span><span class="s2">&quot;ManagersProcessDict&quot;</span><span class="p">]</span><span class="o">.</span><span class="n">get</span><span class="p">((</span><span class="n">inAgentHostNameStr</span><span class="o">.</span><span class="n">upper</span><span class="p">(),</span> <span class="n">inAgentUserNameStr</span><span class="o">.</span><span class="n">upper</span><span class="p">(),</span> <span class="n">inProcessNameWOExeStr</span><span class="o">.</span><span class="n">upper</span><span class="p">()),</span><span class="kc">None</span><span class="p">)</span></div>
<div class="viewcode-block" id="ProcessStatusStrGet"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessStatusStrGet">[документация]</a><span class="k">def</span> <span class="nf">ProcessStatusStrGet</span><span class="p">(</span><span class="n">inAgentHostNameStr</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">inAgentUserNameStr</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">inProcessNameWOExeStr</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Get the status of the Process instance.</span>
<span class="sd"> :param inAgentHostNameStr: Agent hostname in any case. Required to identify Process</span>
<span class="sd"> :param inAgentUserNameStr: Agent user name in any case. Required to identify Process</span>
<span class="sd"> :param inProcessNameWOExeStr: The process name without extension .exe (the key of the Process instance). Any case - will be processed to the upper case</span>
<span class="sd"> :return: Process status. See self.mStatusStr.</span>
<span class="sd"> Process instance has the following statuses:</span>
<span class="sd"> - 0_STOPPED</span>
<span class="sd"> - 1_STOPPED_MANUAL</span>
<span class="sd"> - 2_STOP_SAFE</span>
<span class="sd"> - 3_STOP_SAFE_MANUAL</span>
<span class="sd"> - 4_STARTED</span>
<span class="sd"> - 5_STARTED_MANUAL</span>
<span class="sd"> - None (if Process instance not exists)</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">lProcess</span> <span class="o">=</span> <span class="n">ProcessGet</span><span class="p">(</span><span class="n">inAgentHostNameStr</span> <span class="o">=</span> <span class="n">inAgentHostNameStr</span><span class="p">,</span> <span class="n">inAgentUserNameStr</span> <span class="o">=</span> <span class="n">inAgentUserNameStr</span><span class="p">,</span> <span class="n">inProcessNameWOExeStr</span><span class="o">=</span><span class="n">inProcessNameWOExeStr</span><span class="p">)</span>
<span class="k">if</span> <span class="n">lProcess</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span> <span class="k">return</span> <span class="n">lProcess</span><span class="o">.</span><span class="n">mStatusStr</span></div>
<div class="viewcode-block" id="ProcessStart"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessStart">[документация]</a><span class="k">def</span> <span class="nf">ProcessStart</span><span class="p">(</span><span class="n">inAgentHostNameStr</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">inAgentUserNameStr</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">inProcessNameWOExeStr</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">inIsManualBool</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">True</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Manual/Auto start. Manual start will block scheduling execution. To return schedule execution use def Manual2Auto</span>
<span class="sd"> :param inAgentHostNameStr: Agent hostname in any case. Required to identify Process</span>
<span class="sd"> :param inAgentUserNameStr: Agent user name in any case. Required to identify Process</span>
<span class="sd"> :param inProcessNameWOExeStr: The process name without extension .exe (the key of the Process instance). Any case - will be processed to the upper case</span>
<span class="sd"> :param inIsManualBool: Default is True - Mark this operation as manual - StatusCheckStart/Stop will be blocked - only StatusCheck will be working. False - Auto operation</span>
<span class="sd"> :return: Process status. See self.mStatusStr.</span>
<span class="sd"> Process instance has the following statuses:</span>
<span class="sd"> - 0_STOPPED</span>
<span class="sd"> - 1_STOPPED_MANUAL</span>
<span class="sd"> - 2_STOP_SAFE</span>
<span class="sd"> - 3_STOP_SAFE_MANUAL</span>
<span class="sd"> - 4_STARTED</span>
<span class="sd"> - 5_STARTED_MANUAL</span>
<span class="sd"> - None (if Process instance not exists)</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">lProcess</span> <span class="o">=</span> <span class="n">ProcessGet</span><span class="p">(</span><span class="n">inAgentHostNameStr</span> <span class="o">=</span> <span class="n">inAgentHostNameStr</span><span class="p">,</span> <span class="n">inAgentUserNameStr</span> <span class="o">=</span> <span class="n">inAgentUserNameStr</span><span class="p">,</span> <span class="n">inProcessNameWOExeStr</span><span class="o">=</span><span class="n">inProcessNameWOExeStr</span><span class="p">)</span>
<span class="k">if</span> <span class="n">lProcess</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span> <span class="k">return</span> <span class="n">lProcess</span><span class="o">.</span><span class="n">Start</span><span class="p">(</span><span class="n">inIsManualBool</span><span class="o">=</span><span class="n">inIsManualBool</span><span class="p">)</span></div>
<div class="viewcode-block" id="ProcessStopSafe"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessStopSafe">[документация]</a><span class="k">def</span> <span class="nf">ProcessStopSafe</span><span class="p">(</span><span class="n">inAgentHostNameStr</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">inAgentUserNameStr</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">inProcessNameWOExeStr</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">inIsManualBool</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">True</span><span class="p">,</span> <span class="n">inStopSafeTimeoutSecFloat</span> <span class="o">=</span> <span class="kc">None</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Manual/Auto stop safe. Stop safe is the operation which send signal to process to terminate own work (send term signal to process). Managers.Process wait for the mStopSafeTimeoutSecFloat seconds. After that, if process is not terminated - self will StopForce it.</span>
<span class="sd"> Manual stop safe will block scheduling execution. To return schedule execution use def Manual2Auto</span>
<span class="sd"> :param inAgentHostNameStr: Agent hostname in any case. Required to identify Process</span>
<span class="sd"> :param inAgentUserNameStr: Agent user name in any case. Required to identify Process</span>
<span class="sd"> :param inProcessNameWOExeStr: The process name without extension .exe (the key of the Process instance). Any case - will be processed to the upper case</span>
<span class="sd"> :param inIsManualBool: Default is True - Mark this operation as manual - StatusCheckStart/Stop will be blocked - only StatusCheck will be working. False - Auto operation</span>
<span class="sd"> :param inStopSafeTimeoutSecFloat: Default value goes from the instance. You can specify time is second to wait while safe stop. After that program will stop force</span>
<span class="sd"> :return: Process status. See self.mStatusStr.</span>
<span class="sd"> Process instance has the following statuses:</span>
<span class="sd"> - 0_STOPPED</span>
<span class="sd"> - 1_STOPPED_MANUAL</span>
<span class="sd"> - 2_STOP_SAFE</span>
<span class="sd"> - 3_STOP_SAFE_MANUAL</span>
<span class="sd"> - 4_STARTED</span>
<span class="sd"> - 5_STARTED_MANUAL</span>
<span class="sd"> - None (if Process instance not exists)</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">lProcess</span> <span class="o">=</span> <span class="n">ProcessGet</span><span class="p">(</span><span class="n">inAgentHostNameStr</span> <span class="o">=</span> <span class="n">inAgentHostNameStr</span><span class="p">,</span> <span class="n">inAgentUserNameStr</span> <span class="o">=</span> <span class="n">inAgentUserNameStr</span><span class="p">,</span> <span class="n">inProcessNameWOExeStr</span><span class="o">=</span><span class="n">inProcessNameWOExeStr</span><span class="p">)</span>
<span class="k">if</span> <span class="n">lProcess</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span> <span class="k">return</span> <span class="n">lProcess</span><span class="o">.</span><span class="n">StopSafe</span><span class="p">(</span><span class="n">inIsManualBool</span><span class="o">=</span><span class="n">inIsManualBool</span><span class="p">)</span></div>
<div class="viewcode-block" id="ProcessStopForce"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessStopForce">[документация]</a><span class="k">def</span> <span class="nf">ProcessStopForce</span><span class="p">(</span><span class="n">inAgentHostNameStr</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">inAgentUserNameStr</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">inProcessNameWOExeStr</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">inIsManualBool</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">True</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Manual/Auto stop force. Force stop dont wait process termination - it just terminate process now.</span>
<span class="sd"> Manual stop safe will block scheduling execution. To return schedule execution use def Manual2Auto</span>
<span class="sd"> :param inAgentHostNameStr: Agent hostname in any case. Required to identify Process</span>
<span class="sd"> :param inAgentUserNameStr: Agent user name in any case. Required to identify Process</span>
<span class="sd"> :param inProcessNameWOExeStr: The process name without extension .exe (the key of the Process instance). Any case - will be processed to the upper case</span>
<span class="sd"> :param inIsManualBool: Default is True - Mark this operation as manual - StatusCheckStart/Stop will be blocked - only StatusCheck will be working. False - Auto operation</span>
<span class="sd"> :return: Process status. See self.mStatusStr.</span>
<span class="sd"> Process instance has the following statuses:</span>
<span class="sd"> - 0_STOPPED</span>
<span class="sd"> - 1_STOPPED_MANUAL</span>
<span class="sd"> - 2_STOP_SAFE</span>
<span class="sd"> - 3_STOP_SAFE_MANUAL</span>
<span class="sd"> - 4_STARTED</span>
<span class="sd"> - 5_STARTED_MANUAL</span>
<span class="sd"> - None (if Process instance not exists)</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">lProcess</span> <span class="o">=</span> <span class="n">ProcessGet</span><span class="p">(</span><span class="n">inAgentHostNameStr</span> <span class="o">=</span> <span class="n">inAgentHostNameStr</span><span class="p">,</span> <span class="n">inAgentUserNameStr</span> <span class="o">=</span> <span class="n">inAgentUserNameStr</span><span class="p">,</span> <span class="n">inProcessNameWOExeStr</span><span class="o">=</span><span class="n">inProcessNameWOExeStr</span><span class="p">)</span>
<span class="k">if</span> <span class="n">lProcess</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span> <span class="k">return</span> <span class="n">lProcess</span><span class="o">.</span><span class="n">StopForce</span><span class="p">(</span><span class="n">inIsManualBool</span><span class="o">=</span><span class="n">inIsManualBool</span><span class="p">)</span></div>
<div class="viewcode-block" id="ProcessStatusSave"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessStatusSave">[документация]</a><span class="k">def</span> <span class="nf">ProcessStatusSave</span><span class="p">(</span><span class="n">inAgentHostNameStr</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">inAgentUserNameStr</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">inProcessNameWOExeStr</span><span class="p">:</span> <span class="nb">str</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Save current status of the process. After that you can restore process activity. Work when orchestrator is restarted. Don&#39;t save &quot;STOP_SAFE&quot; status &gt; &quot;STOPPED&quot;</span>
<span class="sd"> :return: Process status. See self.mStatusStr. 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">lProcess</span> <span class="o">=</span> <span class="n">ProcessGet</span><span class="p">(</span><span class="n">inAgentHostNameStr</span><span class="o">=</span><span class="n">inAgentHostNameStr</span><span class="p">,</span> <span class="n">inAgentUserNameStr</span><span class="o">=</span><span class="n">inAgentUserNameStr</span><span class="p">,</span>
<span class="n">inProcessNameWOExeStr</span><span class="o">=</span><span class="n">inProcessNameWOExeStr</span><span class="p">)</span>
<span class="k">if</span> <span class="n">lProcess</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
<span class="n">lProcess</span><span class="o">.</span><span class="n">StatusSave</span><span class="p">()</span>
<span class="k">return</span> <span class="n">lProcess</span><span class="o">.</span><span class="n">mStatusStr</span></div>
<div class="viewcode-block" id="ProcessStatusRestore"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessStatusRestore">[документация]</a><span class="k">def</span> <span class="nf">ProcessStatusRestore</span><span class="p">(</span><span class="n">inAgentHostNameStr</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">inAgentUserNameStr</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">inProcessNameWOExeStr</span><span class="p">:</span> <span class="nb">str</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Execute the StatusCheck, after that restore status to the saved state (see StatusSave). Work when orchestrator is restarted.</span>
<span class="sd"> :return: Process status. See self.mStatusStr. 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">lProcess</span> <span class="o">=</span> <span class="n">ProcessGet</span><span class="p">(</span><span class="n">inAgentHostNameStr</span><span class="o">=</span><span class="n">inAgentHostNameStr</span><span class="p">,</span> <span class="n">inAgentUserNameStr</span><span class="o">=</span><span class="n">inAgentUserNameStr</span><span class="p">,</span>
<span class="n">inProcessNameWOExeStr</span><span class="o">=</span><span class="n">inProcessNameWOExeStr</span><span class="p">)</span>
<span class="k">if</span> <span class="n">lProcess</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
<span class="n">lProcess</span><span class="o">.</span><span class="n">StatusRestore</span><span class="p">()</span>
<span class="k">return</span> <span class="n">lProcess</span><span class="o">.</span><span class="n">mStatusStr</span></div>
<div class="viewcode-block" id="ProcessStatusCheck"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessStatusCheck">[документация]</a><span class="k">def</span> <span class="nf">ProcessStatusCheck</span><span class="p">(</span><span class="n">inAgentHostNameStr</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">inAgentUserNameStr</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">inProcessNameWOExeStr</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Check if process is alive. The def will save the manual flag is exists.</span>
<span class="sd"> :param inAgentHostNameStr: Agent hostname in any case. Required to identify Process</span>
<span class="sd"> :param inAgentUserNameStr: Agent user name in any case. Required to identify Process</span>
<span class="sd"> :param inProcessNameWOExeStr: The process name without extension .exe (the key of the Process instance). Any case - will be processed to the upper case</span>
<span class="sd"> :return: Process status. See self.mStatusStr.</span>
<span class="sd"> Process instance has the following statuses:</span>
<span class="sd"> - 0_STOPPED</span>
<span class="sd"> - 1_STOPPED_MANUAL</span>
<span class="sd"> - 2_STOP_SAFE</span>
<span class="sd"> - 3_STOP_SAFE_MANUAL</span>
<span class="sd"> - 4_STARTED</span>
<span class="sd"> - 5_STARTED_MANUAL</span>
<span class="sd"> - None (if Process instance not exists)</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">lProcess</span> <span class="o">=</span> <span class="n">ProcessGet</span><span class="p">(</span><span class="n">inAgentHostNameStr</span><span class="o">=</span><span class="n">inAgentHostNameStr</span><span class="p">,</span> <span class="n">inAgentUserNameStr</span><span class="o">=</span><span class="n">inAgentUserNameStr</span><span class="p">,</span>
<span class="n">inProcessNameWOExeStr</span><span class="o">=</span><span class="n">inProcessNameWOExeStr</span><span class="p">)</span>
<span class="k">if</span> <span class="n">lProcess</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
<span class="n">lProcess</span><span class="o">.</span><span class="n">StatusCheck</span><span class="p">()</span>
<span class="k">return</span> <span class="n">lProcess</span><span class="o">.</span><span class="n">mStatusStr</span></div>
<div class="viewcode-block" id="ProcessManual2Auto"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessManual2Auto">[документация]</a><span class="k">def</span> <span class="nf">ProcessManual2Auto</span><span class="p">(</span><span class="n">inAgentHostNameStr</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">inAgentUserNameStr</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">inProcessNameWOExeStr</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Remove Manual flag from process (if exists) - it will allow the schedule operations via def StatusCheckStart(self): def StatusCheckStorForce(self): def StatusCheckStopSafe(self):</span>
<span class="sd"> :param inAgentHostNameStr: Agent hostname in any case. Required to identify Process</span>
<span class="sd"> :param inAgentUserNameStr: Agent user name in any case. Required to identify Process</span>
<span class="sd"> :param inProcessNameWOExeStr: The process name without extension .exe (the key of the Process instance). Any case - will be processed to the upper case</span>
<span class="sd"> :return: Process status. See self.mStatusStr.</span>
<span class="sd"> Process instance has the following statuses:</span>
<span class="sd"> - 0_STOPPED</span>
<span class="sd"> - 1_STOPPED_MANUAL</span>
<span class="sd"> - 2_STOP_SAFE</span>
<span class="sd"> - 3_STOP_SAFE_MANUAL</span>
<span class="sd"> - 4_STARTED</span>
<span class="sd"> - 5_STARTED_MANUAL</span>
<span class="sd"> - None (if Process instance not exists)</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">lProcess</span> <span class="o">=</span> <span class="n">ProcessGet</span><span class="p">(</span><span class="n">inAgentHostNameStr</span><span class="o">=</span><span class="n">inAgentHostNameStr</span><span class="p">,</span> <span class="n">inAgentUserNameStr</span><span class="o">=</span><span class="n">inAgentUserNameStr</span><span class="p">,</span>
<span class="n">inProcessNameWOExeStr</span><span class="o">=</span><span class="n">inProcessNameWOExeStr</span><span class="p">)</span>
<span class="k">if</span> <span class="n">lProcess</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span> <span class="k">return</span> <span class="n">lProcess</span><span class="o">.</span><span class="n">Manual2Auto</span><span class="p">()</span></div>
<div class="viewcode-block" id="ProcessManualStopTriggerSet"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessManualStopTriggerSet">[документация]</a><span class="k">def</span> <span class="nf">ProcessManualStopTriggerSet</span><span class="p">(</span><span class="n">inAgentHostNameStr</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">inAgentUserNameStr</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">inProcessNameWOExeStr</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">inMSTdTSecFloat</span><span class="p">:</span> <span class="nb">float</span><span class="p">,</span> <span class="n">inMSTdNInt</span><span class="p">:</span> <span class="nb">int</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Remove Manual flag from process (if exists) - it will allow the schedule operations via def StatusCheckStart(self): def StatusCheckStorForce(self): def StatusCheckStopSafe(self):</span>
<span class="sd"> :param inAgentHostNameStr: Agent hostname in any case. Required to identify Process</span>
<span class="sd"> :param inAgentUserNameStr: Agent user name in any case. Required to identify Process</span>
<span class="sd"> :param inProcessNameWOExeStr: The process name without extension .exe (the key of the Process instance). Any case - will be processed to the upper case</span>
<span class="sd"> :param inMSTdTSecFloat: Time periods in seconds</span>
<span class="sd"> :param inMSTdNInt: Counts of the start tries</span>
<span class="sd"> :return: None</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">lProcess</span> <span class="o">=</span> <span class="n">ProcessGet</span><span class="p">(</span><span class="n">inAgentHostNameStr</span><span class="o">=</span><span class="n">inAgentHostNameStr</span><span class="p">,</span> <span class="n">inAgentUserNameStr</span><span class="o">=</span><span class="n">inAgentUserNameStr</span><span class="p">,</span>
<span class="n">inProcessNameWOExeStr</span><span class="o">=</span><span class="n">inProcessNameWOExeStr</span><span class="p">)</span>
<span class="k">if</span> <span class="n">lProcess</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span> <span class="n">lProcess</span><span class="o">.</span><span class="n">ManualStopTriggerSet</span><span class="p">(</span><span class="n">inMSTdTSecFloat</span> <span class="o">=</span> <span class="n">inMSTdTSecFloat</span><span class="p">,</span> <span class="n">inMSTdNInt</span> <span class="o">=</span> <span class="n">inMSTdNInt</span><span class="p">)</span></div>
<div class="viewcode-block" id="ProcessManualStopListClear"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessManualStopListClear">[документация]</a><span class="k">def</span> <span class="nf">ProcessManualStopListClear</span><span class="p">(</span><span class="n">inAgentHostNameStr</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">inAgentUserNameStr</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">inProcessNameWOExeStr</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Clear the last start tries list.</span>
<span class="sd"> :param inAgentHostNameStr: Agent hostname in any case. Required to identify Process</span>
<span class="sd"> :param inAgentUserNameStr: Agent user name in any case. Required to identify Process</span>
<span class="sd"> :param inProcessNameWOExeStr: The process name without extension .exe (the key of the Process instance). Any case - will be processed to the upper case</span>
<span class="sd"> :return: None</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">lProcess</span> <span class="o">=</span> <span class="n">ProcessGet</span><span class="p">(</span><span class="n">inAgentHostNameStr</span><span class="o">=</span><span class="n">inAgentHostNameStr</span><span class="p">,</span> <span class="n">inAgentUserNameStr</span><span class="o">=</span><span class="n">inAgentUserNameStr</span><span class="p">,</span>
<span class="n">inProcessNameWOExeStr</span><span class="o">=</span><span class="n">inProcessNameWOExeStr</span><span class="p">)</span>
<span class="k">if</span> <span class="n">lProcess</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span> <span class="n">lProcess</span><span class="o">.</span><span class="n">ManualStopListClear</span><span class="p">()</span></div>
<div class="viewcode-block" id="ProcessScheduleStatusCheckEverySeconds"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessScheduleStatusCheckEverySeconds">[документация]</a><span class="k">def</span> <span class="nf">ProcessScheduleStatusCheckEverySeconds</span><span class="p">(</span><span class="n">inAgentHostNameStr</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">inAgentUserNameStr</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">inProcessNameWOExeStr</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span><span class="n">inIntervalSecondsInt</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">120</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Run status check every interval in second you specify.</span>
<span class="sd"> :param inAgentHostNameStr: Agent hostname in any case. Required to identify Process</span>
<span class="sd"> :param inAgentUserNameStr: Agent user name in any case. Required to identify Process</span>
<span class="sd"> :param inProcessNameWOExeStr: The process name without extension .exe (the key of the Process instance). Any case - will be processed to the upper case</span>
<span class="sd"> :param inIntervalSecondsInt: Interval in seconds. Default is 120</span>
<span class="sd"> :return: None</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">lProcess</span> <span class="o">=</span> <span class="n">ProcessGet</span><span class="p">(</span><span class="n">inAgentHostNameStr</span><span class="o">=</span><span class="n">inAgentHostNameStr</span><span class="p">,</span> <span class="n">inAgentUserNameStr</span><span class="o">=</span><span class="n">inAgentUserNameStr</span><span class="p">,</span>
<span class="n">inProcessNameWOExeStr</span><span class="o">=</span><span class="n">inProcessNameWOExeStr</span><span class="p">)</span>
<span class="c1"># Check job in threaded way</span>
<span class="n">__Orchestrator__</span><span class="o">.</span><span class="n">OrchestratorScheduleGet</span><span class="p">()</span><span class="o">.</span><span class="n">every</span><span class="p">(</span><span class="n">inIntervalSecondsInt</span><span class="p">)</span><span class="o">.</span><span class="n">seconds</span><span class="o">.</span><span class="n">do</span><span class="p">(</span><span class="n">__Orchestrator__</span><span class="o">.</span><span class="n">OrchestratorThreadStart</span><span class="p">,</span><span class="n">lProcess</span><span class="o">.</span><span class="n">StatusCheck</span><span class="p">)</span></div>
</pre></div>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>
&#169; Copyright 2022, ООО &#34;ОПЕН РПА&#34;.
</p>
</div>
Собрано при помощи <a href="https://www.sphinx-doc.org/">Sphinx</a> с использованием
<a href="https://github.com/readthedocs/sphinx_rtd_theme">темы,</a>
предоставленной <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>

@ -0,0 +1,375 @@
<!DOCTYPE html>
<html class="writer-html5" lang="ru" >
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>pyOpenRPA.Orchestrator.Web.Basic &mdash; документация pyOpenRPA v1.2.12 v1.2.12</title>
<link rel="stylesheet" href="../../../../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../../../../_static/pygments.css" type="text/css" />
<link rel="shortcut icon" href="../../../../_static/favicon.ico"/>
<!--[if lt IE 9]>
<script src="../../../../_static/js/html5shiv.min.js"></script>
<![endif]-->
<script type="text/javascript" id="documentation_options" data-url_root="../../../../" src="../../../../_static/documentation_options.js"></script>
<script src="../../../../_static/jquery.js"></script>
<script src="../../../../_static/underscore.js"></script>
<script src="../../../../_static/doctools.js"></script>
<script src="../../../../_static/translations.js"></script>
<script type="text/javascript" src="../../../../_static/js/theme.js"></script>
<link rel="index" title="Алфавитный указатель" href="../../../../genindex.html" />
<link rel="search" title="Поиск" href="../../../../search.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../../../../index.html" class="icon icon-home"> pyOpenRPA v1.2.12
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../../../search.html" method="get">
<input type="text" name="q" placeholder="Поиск в документации" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<p class="caption"><span class="caption-text">ОБЩЕЕ</span></p>
<ul>
<li class="toctree-l1"><a class="reference external" href="https://pyopenrpa.ru/wiki/guide/index">Выбрать версию</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../01_HowToInstall.html">1. Первый запуск</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../03_Copyrights_Contacts.html">2. Права &amp; Контакты</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ РОБОТ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../../Robot/01_Robot.html">1. Описание</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../Robot/02_Defs.html">2. Функции</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../Robot/03_HowToUse.html">3. Как использовать?</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../Robot/04_Dependencies.html">4. Зависимости</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ СТУДИЯ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../../Studio/01_Studio.html">1. Описание</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../Studio/02_HowToUse.html">2. Как использовать?</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ ОРКЕСТРАТОР</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../../Orchestrator/01_Orchestrator.html">1. Description</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../Orchestrator/02_Defs.html">2. Defs</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../Orchestrator/03_gSettingsTemplate.html">3. gSettings Template</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../Orchestrator/04_HowToUse.html">4. How to use</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../Orchestrator/05_UAC.html">5. UAC - User Access Control</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../Orchestrator/06_Defs%20Managers.html">6. Defs Managers</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ АГЕНТ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../../Agent/02_Defs.html">2. Defs</a></li>
</ul>
<p class="caption"><span class="caption-text">ИНСТРУМЕНТЫ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../../Tools/02_Defs.html">2. Defs StopSafe</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../../../../index.html">pyOpenRPA v1.2.12</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="../../../../index.html" class="icon icon-home"></a> &raquo;</li>
<li><a href="../../../index.html">Код модуля</a> &raquo;</li>
<li>pyOpenRPA.Orchestrator.Web.Basic</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<h1>Исходный код pyOpenRPA.Orchestrator.Web.Basic</h1><div class="highlight"><pre>
<span></span><span class="kn">import</span> <span class="nn">json</span><span class="o">,</span> <span class="nn">copy</span>
<span class="kn">from</span> <span class="nn">..</span> <span class="kn">import</span> <span class="n">__Orchestrator__</span>
<span class="kn">from</span> <span class="nn">..</span> <span class="kn">import</span> <span class="n">Processor</span>
<span class="c1"># Escape JS to the safe JS for the inline JS in HTML tags ATTENTION! Use it only if want to paste JS into HTML tag - not in &lt;script&gt;</span>
<span class="c1"># USAGE: JSEscapeForHTMLInline(inJSStr=&quot;lTest=\&quot;Hello World\&quot;; alert(\&quot;lTest\&quot;)&quot;)</span>
<span class="k">def</span> <span class="nf">JSEscapeForHTMLInline</span><span class="p">(</span><span class="n">inJSStr</span><span class="p">):</span>
<span class="n">lResult</span> <span class="o">=</span> <span class="n">inJSStr</span><span class="o">.</span><span class="n">replace</span><span class="p">(</span><span class="s2">&quot;</span><span class="se">\&quot;</span><span class="s2">&quot;</span><span class="p">,</span><span class="s2">&quot;&amp;quot;&quot;</span><span class="p">)</span>
<span class="k">return</span> <span class="n">lResult</span>
<div class="viewcode-block" id="JSProcessorActivityListAdd"><a class="viewcode-back" href="../../../../Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.Web.Basic.JSProcessorActivityListAdd">[документация]</a><span class="k">def</span> <span class="nf">JSProcessorActivityListAdd</span><span class="p">(</span><span class="n">inActivityList</span><span class="p">,</span> <span class="n">inGUIDRemoveBool</span> <span class="o">=</span> <span class="kc">True</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> # Create JS for send activity list/ activity to the processor</span>
<span class="sd"> # USAGE: Orchestrator.Web.Basic.JSProcessorActivityListAdd(inActivityList)</span>
<span class="sd"> :param inActivityList: List of the activities (See __Orchestrator__.ProcessorActivityItemCreate)</span>
<span class="sd"> :param inGUIDRemoveBool: True - remove GUID before generate JS (if GUID is not important)</span>
<span class="sd"> :return: JavaScript string for the front end</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">Processor</span><span class="o">.</span><span class="n">__ActivityListVerify__</span><span class="p">(</span><span class="n">inActivityList</span><span class="o">=</span><span class="n">inActivityList</span><span class="p">)</span> <span class="c1"># DO VERIFICATION FOR THE inActivityList</span>
<span class="n">inActivityList</span> <span class="o">=</span> <span class="n">copy</span><span class="o">.</span><span class="n">deepcopy</span><span class="p">(</span><span class="n">inActivityList</span><span class="p">)</span>
<span class="c1"># Check if no def function is here - if exist - replace to alias</span>
<span class="k">for</span> <span class="n">lActivityItem</span> <span class="ow">in</span> <span class="n">inActivityList</span><span class="p">:</span>
<span class="k">if</span> <span class="s2">&quot;GUIDStr&quot;</span> <span class="ow">in</span> <span class="n">lActivityItem</span> <span class="ow">and</span> <span class="n">inGUIDRemoveBool</span> <span class="o">==</span> <span class="kc">True</span><span class="p">:</span> <span class="k">del</span> <span class="n">lActivityItem</span><span class="p">[</span><span class="s2">&quot;GUIDStr&quot;</span><span class="p">]</span> <span class="c1"># Remove GUID from activity items if exists</span>
<span class="n">lDef</span> <span class="o">=</span> <span class="n">lActivityItem</span><span class="p">[</span><span class="s2">&quot;Def&quot;</span><span class="p">]</span>
<span class="k">if</span> <span class="n">callable</span><span class="p">(</span><span class="n">lDef</span><span class="p">):</span> <span class="k">raise</span> <span class="ne">Exception</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;pyOpenRPA Exception: You can&#39;t send ActivityList with def to JS. Use Def Alias (see Orchestrator.ProcessorAliasDefUpdate)&quot;</span><span class="p">)</span>
<span class="n">lJSStr</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot;&quot;&quot;mGlobal.pyOpenRPA.ProcessorQueueAdd(</span><span class="si">{</span><span class="n">json</span><span class="o">.</span><span class="n">dumps</span><span class="p">(</span><span class="n">inActivityList</span><span class="p">)</span><span class="si">}</span><span class="s2">);&quot;&quot;&quot;</span>
<span class="k">return</span> <span class="n">lJSStr</span></div>
<div class="viewcode-block" id="JSActivityListExecute"><a class="viewcode-back" href="../../../../Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.Web.Basic.JSActivityListExecute">[документация]</a><span class="k">def</span> <span class="nf">JSActivityListExecute</span><span class="p">(</span><span class="n">inActivityList</span><span class="p">,</span> <span class="n">inGUIDRemoveBool</span> <span class="o">=</span> <span class="kc">True</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Create JS for execute activity list/ activity permanent</span>
<span class="sd"> USAGE: Orchestrator.Web.Basic.JSActivityListExecute(inActivityList, inGUIDRemoveBool = True)</span>
<span class="sd"> :param inActivityList: List of the activities (See __Orchestrator__.ProcessorActivityItemCreate)</span>
<span class="sd"> :param inGUIDRemoveBool: True - remove GUID before generate JS (if GUID is not important)</span>
<span class="sd"> :return: JavaScript string for the front end</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">Processor</span><span class="o">.</span><span class="n">__ActivityListVerify__</span><span class="p">(</span><span class="n">inActivityList</span><span class="o">=</span><span class="n">inActivityList</span><span class="p">)</span> <span class="c1"># DO VERIFICATION FOR THE inActivityList</span>
<span class="n">inActivityList</span> <span class="o">=</span> <span class="n">copy</span><span class="o">.</span><span class="n">deepcopy</span><span class="p">(</span><span class="n">inActivityList</span><span class="p">)</span>
<span class="c1"># Check if no def function is here - if exist - replace to alias</span>
<span class="k">for</span> <span class="n">lActivityItem</span> <span class="ow">in</span> <span class="n">inActivityList</span><span class="p">:</span>
<span class="k">if</span> <span class="s2">&quot;GUIDStr&quot;</span> <span class="ow">in</span> <span class="n">lActivityItem</span> <span class="ow">and</span> <span class="n">inGUIDRemoveBool</span> <span class="o">==</span> <span class="kc">True</span><span class="p">:</span> <span class="k">del</span> <span class="n">lActivityItem</span><span class="p">[</span><span class="s2">&quot;GUIDStr&quot;</span><span class="p">]</span> <span class="c1"># Remove GUID from activity items if exists</span>
<span class="n">lDef</span> <span class="o">=</span> <span class="n">lActivityItem</span><span class="p">[</span><span class="s2">&quot;Def&quot;</span><span class="p">]</span>
<span class="k">if</span> <span class="n">callable</span><span class="p">(</span><span class="n">lDef</span><span class="p">):</span> <span class="k">raise</span> <span class="ne">Exception</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;pyOpenRPA Exception: You can&#39;t send ActivityList with def to JS. Use Def Alias (see Orchestrator.ProcessorAliasDefUpdate)&quot;</span><span class="p">)</span>
<span class="n">lJSStr</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot;&quot;&quot;mGlobal.pyOpenRPA.ActivityListExecute(</span><span class="si">{</span><span class="n">json</span><span class="o">.</span><span class="n">dumps</span><span class="p">(</span><span class="n">inActivityList</span><span class="p">)</span><span class="si">}</span><span class="s2">);&quot;&quot;&quot;</span>
<span class="k">return</span> <span class="n">lJSStr</span></div>
<span class="c1"># Generate HTML code of the simple URL link by the URL</span>
<span class="c1"># USAGE: Orchestrator.Web.Basic.HTMLLinkURL(inURLStr=&quot;test&quot;,inColorStr=&quot;orange&quot;)</span>
<span class="c1"># USAGE: Basic.HTMLLinkURL(inURLStr=&quot;test&quot;,inColorStr=&quot;orange&quot;)</span>
<span class="k">def</span> <span class="nf">HTMLLinkURL</span><span class="p">(</span><span class="n">inURLStr</span><span class="p">,</span> <span class="n">inTitleStr</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">inColorStr</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="n">lCSSStyleStr</span> <span class="o">=</span> <span class="s2">&quot;&quot;</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">inTitleStr</span><span class="p">:</span> <span class="n">inTitleStr</span> <span class="o">=</span> <span class="n">inURLStr</span>
<span class="k">if</span> <span class="n">inColorStr</span><span class="p">:</span> <span class="n">lCSSStyleStr</span><span class="o">=</span><span class="sa">f</span><span class="s2">&quot;style=</span><span class="se">\&quot;</span><span class="s2">color:</span><span class="si">{</span><span class="n">inColorStr</span><span class="si">}</span><span class="se">\&quot;</span><span class="s2">&quot;</span>
<span class="n">lResult</span><span class="o">=</span><span class="sa">f</span><span class="s2">&quot;&lt;a </span><span class="si">{</span><span class="n">lCSSStyleStr</span><span class="si">}</span><span class="s2"> href=</span><span class="se">\&quot;</span><span class="si">{</span><span class="n">inURLStr</span><span class="si">}</span><span class="se">\&quot;</span><span class="s2">&gt;</span><span class="si">{</span><span class="n">inTitleStr</span><span class="si">}</span><span class="s2">&lt;/a&gt;&quot;</span>
<span class="k">return</span> <span class="n">lResult</span>
<span class="c1"># Generate HTML code of the simple URL link by the JS when onclick</span>
<span class="c1"># USAGE: Orchestrator.Web.Basic.HTMLLinkJSOnClick(inJSOnClickStr=&quot;&quot;,inColorStr=&quot;orange&quot;)</span>
<span class="c1"># USAGE: Basic.HTMLLinkJSOnClick(inJSOnClickStr=&quot;test&quot;,inColorStr=&quot;orange&quot;)</span>
<span class="k">def</span> <span class="nf">HTMLLinkJSOnClick</span><span class="p">(</span><span class="n">inJSOnClickStr</span><span class="p">,</span> <span class="n">inTitleStr</span><span class="p">,</span> <span class="n">inColorStr</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="n">lCSSStyleStr</span> <span class="o">=</span> <span class="s2">&quot;&quot;</span>
<span class="k">if</span> <span class="n">inColorStr</span><span class="p">:</span> <span class="n">lCSSStyleStr</span><span class="o">=</span><span class="sa">f</span><span class="s2">&quot;style=</span><span class="se">\&quot;</span><span class="s2">color:</span><span class="si">{</span><span class="n">inColorStr</span><span class="si">}</span><span class="se">\&quot;</span><span class="s2">&quot;</span>
<span class="n">inJSOnClickStr</span><span class="o">=</span> <span class="n">JSEscapeForHTMLInline</span><span class="p">(</span><span class="n">inJSStr</span><span class="o">=</span><span class="n">inJSOnClickStr</span><span class="p">)</span> <span class="c1"># Escape some symbols for the inline JS</span>
<span class="n">lResult</span><span class="o">=</span><span class="sa">f</span><span class="s2">&quot;&lt;a </span><span class="si">{</span><span class="n">lCSSStyleStr</span><span class="si">}</span><span class="s2"> onclick=</span><span class="se">\&quot;</span><span class="si">{</span><span class="n">inJSOnClickStr</span><span class="si">}</span><span class="se">\&quot;</span><span class="s2">&gt;</span><span class="si">{</span><span class="n">inTitleStr</span><span class="si">}</span><span class="s2">&lt;/a&gt;&quot;</span>
<span class="k">return</span> <span class="n">lResult</span>
<span class="c1"># Create HTMLLink by the def, argdict, arglist, gsettingsStr, logger Str titleStr, color, (add in processor queue)</span>
<span class="k">def</span> <span class="nf">HTMLLinkDefProcessor</span><span class="p">(</span><span class="n">inGSettings</span><span class="p">,</span> <span class="n">inDef</span><span class="p">,</span> <span class="n">inArgDict</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">inArgList</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">inArgGSettingsStr</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">inArgLoggerStr</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">inLinkTitleStr</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">inLinkColorStr</span><span class="o">=</span><span class="s2">&quot;&quot;</span><span class="p">):</span>
<span class="n">lDefAliasStr</span> <span class="o">=</span> <span class="n">inDef</span>
<span class="k">if</span> <span class="n">callable</span><span class="p">(</span><span class="n">inDef</span><span class="p">):</span>
<span class="n">lDefAliasStr</span> <span class="o">=</span> <span class="nb">str</span><span class="p">(</span><span class="n">inDef</span><span class="p">)</span>
<span class="n">lDefAliasStr</span> <span class="o">=</span> <span class="n">__Orchestrator__</span><span class="o">.</span><span class="n">ProcessorAliasDefUpdate</span><span class="p">(</span><span class="n">inGSettings</span><span class="o">=</span><span class="n">inGSettings</span><span class="p">,</span> <span class="n">inDef</span><span class="o">=</span><span class="n">inDef</span><span class="p">,</span> <span class="n">inAliasStr</span><span class="o">=</span><span class="n">lDefAliasStr</span><span class="p">)</span>
<span class="k">if</span> <span class="n">inLinkTitleStr</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span> <span class="n">inLinkTitleStr</span> <span class="o">=</span> <span class="n">lDefAliasStr</span>
<span class="n">lActivityList</span> <span class="o">=</span> <span class="p">[</span><span class="n">__Orchestrator__</span><span class="o">.</span><span class="n">ProcessorActivityItemCreate</span><span class="p">(</span><span class="n">inDef</span><span class="o">=</span><span class="n">lDefAliasStr</span><span class="p">,</span><span class="n">inArgList</span><span class="o">=</span><span class="n">inArgList</span><span class="p">,</span><span class="n">inArgDict</span><span class="o">=</span><span class="n">inArgDict</span><span class="p">,</span><span class="n">inArgGSettingsStr</span><span class="o">=</span><span class="n">inArgGSettingsStr</span><span class="p">,</span><span class="n">inArgLoggerStr</span><span class="o">=</span><span class="n">inArgLoggerStr</span><span class="p">)]</span>
<span class="n">lJSStr</span> <span class="o">=</span> <span class="n">JSProcessorActivityListAdd</span><span class="p">(</span><span class="n">lActivityList</span><span class="p">)</span>
<span class="n">lHTMLStr</span> <span class="o">=</span> <span class="n">HTMLLinkJSOnClick</span><span class="p">(</span><span class="n">inJSOnClickStr</span><span class="o">=</span><span class="n">lJSStr</span><span class="p">,</span><span class="n">inTitleStr</span><span class="o">=</span><span class="n">inLinkTitleStr</span><span class="p">,</span> <span class="n">inColorStr</span><span class="o">=</span><span class="n">inLinkColorStr</span><span class="p">)</span>
<span class="k">return</span> <span class="n">lHTMLStr</span>
<span class="c1"># Create HTMLLink by the def, argdict, arglist, gsettingsStr, logger Str titleStr, color, (execute permanently)</span>
<span class="k">def</span> <span class="nf">HTMLLinkDefExecute</span><span class="p">(</span><span class="n">inGSettings</span><span class="p">,</span> <span class="n">inDef</span><span class="p">,</span> <span class="n">inArgDict</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">inArgList</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">inArgGSettingsStr</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">inArgLoggerStr</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">inLinkTitleStr</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">inLinkColorStr</span><span class="o">=</span><span class="s2">&quot;&quot;</span><span class="p">):</span>
<span class="n">lDefAliasStr</span> <span class="o">=</span> <span class="n">inDef</span>
<span class="k">if</span> <span class="n">callable</span><span class="p">(</span><span class="n">inDef</span><span class="p">):</span>
<span class="n">lDefAliasStr</span> <span class="o">=</span> <span class="nb">str</span><span class="p">(</span><span class="n">inDef</span><span class="p">)</span>
<span class="n">lDefAliasStr</span> <span class="o">=</span> <span class="n">__Orchestrator__</span><span class="o">.</span><span class="n">ProcessorAliasDefUpdate</span><span class="p">(</span><span class="n">inGSettings</span><span class="o">=</span><span class="n">inGSettings</span><span class="p">,</span> <span class="n">inDef</span><span class="o">=</span><span class="n">inDef</span><span class="p">,</span> <span class="n">inAliasStr</span><span class="o">=</span><span class="n">lDefAliasStr</span><span class="p">)</span>
<span class="k">if</span> <span class="n">inLinkTitleStr</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span> <span class="n">inLinkTitleStr</span> <span class="o">=</span> <span class="n">lDefAliasStr</span>
<span class="n">lActivityList</span> <span class="o">=</span> <span class="p">[</span><span class="n">__Orchestrator__</span><span class="o">.</span><span class="n">ProcessorActivityItemCreate</span><span class="p">(</span><span class="n">inDef</span><span class="o">=</span><span class="n">lDefAliasStr</span><span class="p">,</span><span class="n">inArgList</span><span class="o">=</span><span class="n">inArgList</span><span class="p">,</span><span class="n">inArgDict</span><span class="o">=</span><span class="n">inArgDict</span><span class="p">,</span><span class="n">inArgGSettingsStr</span><span class="o">=</span><span class="n">inArgGSettingsStr</span><span class="p">,</span><span class="n">inArgLoggerStr</span><span class="o">=</span><span class="n">inArgLoggerStr</span><span class="p">)]</span>
<span class="n">lJSStr</span> <span class="o">=</span> <span class="n">JSActivityListExecute</span><span class="p">(</span><span class="n">lActivityList</span><span class="p">)</span>
<span class="n">lHTMLStr</span> <span class="o">=</span> <span class="n">HTMLLinkJSOnClick</span><span class="p">(</span><span class="n">inJSOnClickStr</span><span class="o">=</span><span class="n">lJSStr</span><span class="p">,</span><span class="n">inTitleStr</span><span class="o">=</span><span class="n">inLinkTitleStr</span><span class="p">,</span> <span class="n">inColorStr</span><span class="o">=</span><span class="n">inLinkColorStr</span><span class="p">)</span>
<span class="k">return</span> <span class="n">lHTMLStr</span>
<span class="c1"># HTML Generator for the CP up to v.1.2.0</span>
<span class="k">def</span> <span class="nf">HTMLControlPanelBC</span><span class="p">(</span><span class="n">inCPDict</span><span class="p">):</span>
<span class="c1"># FooterButtonX2List generation</span>
<span class="n">lFooterButtonX2Str</span> <span class="o">=</span> <span class="s2">&quot;&quot;</span>
<span class="k">for</span> <span class="n">lItem</span> <span class="ow">in</span> <span class="n">inCPDict</span><span class="p">[</span><span class="s2">&quot;FooterButtonX2List&quot;</span><span class="p">]:</span>
<span class="n">lFooterButtonX2Str</span><span class="o">+=</span><span class="sa">f</span><span class="s1">&#39;&lt;div class=&quot;ui basic </span><span class="si">{</span><span class="n">lItem</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;Color&quot;</span><span class="p">,</span><span class="s2">&quot;&quot;</span><span class="p">)</span><span class="si">}</span><span class="s1"> button&quot; onclick=&quot;</span><span class="si">{</span><span class="n">JSEscapeForHTMLInline</span><span class="p">(</span><span class="n">lItem</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;OnClick&quot;</span><span class="p">,</span><span class="s2">&quot;&quot;</span><span class="p">))</span><span class="si">}</span><span class="s1">&quot;&gt;</span><span class="si">{</span><span class="n">lItem</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;Text&quot;</span><span class="p">,</span><span class="s2">&quot;&quot;</span><span class="p">)</span><span class="si">}</span><span class="s1">&lt;/div&gt;&#39;</span>
<span class="c1"># FooterButtonX1List generation</span>
<span class="n">lFooterButtonX1Str</span> <span class="o">=</span> <span class="s2">&quot;&quot;</span>
<span class="k">for</span> <span class="n">lItem</span> <span class="ow">in</span> <span class="n">inCPDict</span><span class="p">[</span><span class="s2">&quot;FooterButtonX1List&quot;</span><span class="p">]:</span>
<span class="n">lFooterButtonX1Str</span><span class="o">+=</span><span class="sa">f</span><span class="s1">&#39;&lt;div class=&quot;ui basic </span><span class="si">{</span><span class="n">lItem</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;Color&quot;</span><span class="p">,</span><span class="s2">&quot;&quot;</span><span class="p">)</span><span class="si">}</span><span class="s1"> button&quot; onclick=&quot;</span><span class="si">{</span><span class="n">JSEscapeForHTMLInline</span><span class="p">(</span><span class="n">lItem</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;OnClick&quot;</span><span class="p">,</span><span class="s2">&quot;&quot;</span><span class="p">))</span><span class="si">}</span><span class="s1">&quot;&gt;</span><span class="si">{</span><span class="n">lItem</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;Text&quot;</span><span class="p">,</span><span class="s2">&quot;&quot;</span><span class="p">)</span><span class="si">}</span><span class="s1">&lt;/div&gt;&#39;</span>
<span class="c1"># BodyKeyValue generation</span>
<span class="n">lBodyKeyValueStr</span> <span class="o">=</span> <span class="s2">&quot;&quot;</span>
<span class="k">for</span> <span class="n">lItem</span> <span class="ow">in</span> <span class="n">inCPDict</span><span class="p">[</span><span class="s2">&quot;BodyKeyValueList&quot;</span><span class="p">]:</span>
<span class="n">lBodyKeyValueStr</span><span class="o">+=</span><span class="sa">f</span><span class="s2">&quot;&lt;li&gt;</span><span class="si">{</span><span class="n">lItem</span><span class="p">[</span><span class="s1">&#39;Key&#39;</span><span class="p">]</span><span class="si">}</span><span class="s2">: </span><span class="si">{</span><span class="n">lItem</span><span class="p">[</span><span class="s1">&#39;Value&#39;</span><span class="p">]</span><span class="si">}</span><span class="s2">&lt;/li&gt;&quot;</span>
<span class="c1"># Generate consolidated string</span>
<span class="n">lResultHTMLStr</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot;&quot;&quot;</span>
<span class="s2"> &lt;div class=&quot;card&quot;&gt;</span>
<span class="s2"> &lt;div class=&quot;content&quot;&gt;</span>
<span class="s2"> &lt;div class=&quot;right floated mini ui &quot;&gt;</span>
<span class="s2"> </span><span class="si">{</span><span class="n">inCPDict</span><span class="p">[</span><span class="s1">&#39;HeaderRightText&#39;</span><span class="p">]</span><span class="si">}</span><span class="s2"></span>
<span class="s2"> &lt;/div&gt;</span>
<span class="s2"> &lt;div class=&quot;header&quot;&gt;</span>
<span class="s2"> </span><span class="si">{</span><span class="n">inCPDict</span><span class="p">[</span><span class="s1">&#39;HeaderLeftText&#39;</span><span class="p">]</span><span class="si">}</span><span class="s2"></span>
<span class="s2"> &lt;/div&gt;</span>
<span class="s2"> &lt;div class=&quot;meta&quot;&gt;</span>
<span class="s2"> </span><span class="si">{</span><span class="n">inCPDict</span><span class="p">[</span><span class="s1">&#39;SubheaderText&#39;</span><span class="p">]</span><span class="si">}</span><span class="s2"></span>
<span class="s2"> &lt;/div&gt;</span>
<span class="s2"> &lt;div class=&quot;description&quot;&gt;</span>
<span class="s2"> &lt;ul style=&quot;padding-inline-start:16px;margin:0px&quot;&gt;</span>
<span class="s2"> </span><span class="si">{</span><span class="n">lBodyKeyValueStr</span><span class="si">}</span><span class="s2"></span>
<span class="s2"> &lt;/ul&gt;</span>
<span class="s2"> &lt;/div&gt;</span>
<span class="s2"> &lt;/div&gt;</span>
<span class="s2"> &lt;div class=&quot;extra content&quot;&gt;</span>
<span class="s2"> </span><span class="si">{</span><span class="n">inCPDict</span><span class="p">[</span><span class="s1">&#39;FooterText&#39;</span><span class="p">]</span><span class="si">}</span><span class="s2"></span>
<span class="s2"> &lt;/div&gt;</span>
<span class="s2"> &lt;div class=&quot;extra content&quot;&gt;</span>
<span class="s2"> &lt;div class=&quot;ui two buttons&quot;&gt;</span>
<span class="s2"> </span><span class="si">{</span><span class="n">lFooterButtonX2Str</span><span class="si">}</span><span class="s2"></span>
<span class="s2"> &lt;/div&gt;</span>
<span class="s2"> &lt;div class=&quot;ui horizontal divider&quot;&gt;Add. controls&lt;/div&gt;</span>
<span class="s2"> &lt;div class=&quot;ui one buttons&quot;&gt;</span>
<span class="s2"> </span><span class="si">{</span><span class="n">lFooterButtonX1Str</span><span class="si">}</span><span class="s2"></span>
<span class="s2"> &lt;/div&gt;</span>
<span class="s2"> &lt;/div&gt;</span>
<span class="s2"> &lt;/div&gt;</span>
<span class="s2"> &quot;&quot;&quot;</span>
<span class="k">return</span> <span class="n">lResultHTMLStr</span>
</pre></div>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>
&#169; Copyright 2022, ООО &#34;ОПЕН РПА&#34;.
</p>
</div>
Собрано при помощи <a href="https://www.sphinx-doc.org/">Sphinx</a> с использованием
<a href="https://github.com/readthedocs/sphinx_rtd_theme">темы,</a>
предоставленной <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>

File diff suppressed because it is too large Load Diff

@ -0,0 +1,256 @@
<!DOCTYPE html>
<html class="writer-html5" lang="ru" >
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>pyOpenRPA.Tools.Debugger &mdash; документация pyOpenRPA v1.2.12 v1.2.12</title>
<link rel="stylesheet" href="../../../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
<link rel="shortcut icon" href="../../../_static/favicon.ico"/>
<!--[if lt IE 9]>
<script src="../../../_static/js/html5shiv.min.js"></script>
<![endif]-->
<script type="text/javascript" id="documentation_options" data-url_root="../../../" src="../../../_static/documentation_options.js"></script>
<script src="../../../_static/jquery.js"></script>
<script src="../../../_static/underscore.js"></script>
<script src="../../../_static/doctools.js"></script>
<script src="../../../_static/translations.js"></script>
<script type="text/javascript" src="../../../_static/js/theme.js"></script>
<link rel="index" title="Алфавитный указатель" href="../../../genindex.html" />
<link rel="search" title="Поиск" href="../../../search.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../../../index.html" class="icon icon-home"> pyOpenRPA v1.2.12
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../../search.html" method="get">
<input type="text" name="q" placeholder="Поиск в документации" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<p class="caption"><span class="caption-text">ОБЩЕЕ</span></p>
<ul>
<li class="toctree-l1"><a class="reference external" href="https://pyopenrpa.ru/wiki/guide/index">Выбрать версию</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../01_HowToInstall.html">1. Первый запуск</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../03_Copyrights_Contacts.html">2. Права &amp; Контакты</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ РОБОТ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../Robot/01_Robot.html">1. Описание</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../Robot/02_Defs.html">2. Функции</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../Robot/03_HowToUse.html">3. Как использовать?</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../Robot/04_Dependencies.html">4. Зависимости</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ СТУДИЯ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../Studio/01_Studio.html">1. Описание</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../Studio/02_HowToUse.html">2. Как использовать?</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ ОРКЕСТРАТОР</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../Orchestrator/01_Orchestrator.html">1. Description</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../Orchestrator/02_Defs.html">2. Defs</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../Orchestrator/03_gSettingsTemplate.html">3. gSettings Template</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../Orchestrator/04_HowToUse.html">4. How to use</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../Orchestrator/05_UAC.html">5. UAC - User Access Control</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../Orchestrator/06_Defs%20Managers.html">6. Defs Managers</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ АГЕНТ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../Agent/02_Defs.html">2. Defs</a></li>
</ul>
<p class="caption"><span class="caption-text">ИНСТРУМЕНТЫ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../Tools/02_Defs.html">2. Defs StopSafe</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../../../index.html">pyOpenRPA v1.2.12</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="../../../index.html" class="icon icon-home"></a> &raquo;</li>
<li><a href="../../index.html">Код модуля</a> &raquo;</li>
<li>pyOpenRPA.Tools.Debugger</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<h1>Исходный код pyOpenRPA.Tools.Debugger</h1><div class="highlight"><pre>
<span></span><span class="kn">import</span> <span class="nn">os</span>
<span class="kn">import</span> <span class="nn">threading</span>
<span class="kn">import</span> <span class="nn">pdb</span>
<span class="kn">import</span> <span class="nn">time</span>
<span class="sd">&quot;&quot;&quot;Module wait file &quot;init_debug&quot; in working directory</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="n">gKWARGS</span> <span class="o">=</span> <span class="kc">None</span>
<span class="k">def</span> <span class="nf">LiveDebugCheckLoop</span><span class="p">():</span>
<span class="k">while</span> <span class="kc">True</span><span class="p">:</span>
<span class="k">if</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">exists</span><span class="p">(</span><span class="s2">&quot;init_debug&quot;</span><span class="p">):</span>
<span class="n">pdb</span><span class="o">.</span><span class="n">set_trace</span><span class="p">()</span>
<span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mf">30.0</span><span class="p">)</span>
<div class="viewcode-block" id="LiveDebugCheckThread"><a class="viewcode-back" href="../../../Tools/02_Defs.html#pyOpenRPA.Tools.Debugger.LiveDebugCheckThread">[документация]</a><span class="k">def</span> <span class="nf">LiveDebugCheckThread</span><span class="p">(</span><span class="o">**</span><span class="n">inKWARGS</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Create thread to wait file appear &quot;init_debug&quot; in the working directory. </span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">global</span> <span class="n">gKWARGS</span>
<span class="n">gKWARGS</span> <span class="o">=</span> <span class="n">inKWARGS</span>
<span class="n">lThread</span> <span class="o">=</span> <span class="n">threading</span><span class="o">.</span><span class="n">Thread</span><span class="p">(</span><span class="n">target</span><span class="o">=</span><span class="n">LiveDebugCheckLoop</span><span class="p">)</span>
<span class="n">lThread</span><span class="o">.</span><span class="n">start</span><span class="p">()</span></div>
</pre></div>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>
&#169; Copyright 2022, ООО &#34;ОПЕН РПА&#34;.
</p>
</div>
Собрано при помощи <a href="https://www.sphinx-doc.org/">Sphinx</a> с использованием
<a href="https://github.com/readthedocs/sphinx_rtd_theme">темы,</a>
предоставленной <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>

@ -0,0 +1,299 @@
<!DOCTYPE html>
<html class="writer-html5" lang="ru" >
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>pyOpenRPA.Tools.StopSafe &mdash; документация pyOpenRPA v1.2.12 v1.2.12</title>
<link rel="stylesheet" href="../../../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
<link rel="shortcut icon" href="../../../_static/favicon.ico"/>
<!--[if lt IE 9]>
<script src="../../../_static/js/html5shiv.min.js"></script>
<![endif]-->
<script type="text/javascript" id="documentation_options" data-url_root="../../../" src="../../../_static/documentation_options.js"></script>
<script src="../../../_static/jquery.js"></script>
<script src="../../../_static/underscore.js"></script>
<script src="../../../_static/doctools.js"></script>
<script src="../../../_static/translations.js"></script>
<script type="text/javascript" src="../../../_static/js/theme.js"></script>
<link rel="index" title="Алфавитный указатель" href="../../../genindex.html" />
<link rel="search" title="Поиск" href="../../../search.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../../../index.html" class="icon icon-home"> pyOpenRPA v1.2.12
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../../search.html" method="get">
<input type="text" name="q" placeholder="Поиск в документации" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<p class="caption"><span class="caption-text">ОБЩЕЕ</span></p>
<ul>
<li class="toctree-l1"><a class="reference external" href="https://pyopenrpa.ru/wiki/guide/index">Выбрать версию</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../01_HowToInstall.html">1. Первый запуск</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../03_Copyrights_Contacts.html">2. Права &amp; Контакты</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ РОБОТ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../Robot/01_Robot.html">1. Описание</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../Robot/02_Defs.html">2. Функции</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../Robot/03_HowToUse.html">3. Как использовать?</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../Robot/04_Dependencies.html">4. Зависимости</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ СТУДИЯ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../Studio/01_Studio.html">1. Описание</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../Studio/02_HowToUse.html">2. Как использовать?</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ ОРКЕСТРАТОР</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../Orchestrator/01_Orchestrator.html">1. Description</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../Orchestrator/02_Defs.html">2. Defs</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../Orchestrator/03_gSettingsTemplate.html">3. gSettings Template</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../Orchestrator/04_HowToUse.html">4. How to use</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../Orchestrator/05_UAC.html">5. UAC - User Access Control</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../Orchestrator/06_Defs%20Managers.html">6. Defs Managers</a></li>
</ul>
<p class="caption"><span class="caption-text">МОДУЛЬ АГЕНТ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../Agent/02_Defs.html">2. Defs</a></li>
</ul>
<p class="caption"><span class="caption-text">ИНСТРУМЕНТЫ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../Tools/02_Defs.html">2. Defs StopSafe</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../../../index.html">pyOpenRPA v1.2.12</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="../../../index.html" class="icon icon-home"></a> &raquo;</li>
<li><a href="../../index.html">Код модуля</a> &raquo;</li>
<li>pyOpenRPA.Tools.StopSafe</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<h1>Исходный код pyOpenRPA.Tools.StopSafe</h1><div class="highlight"><pre>
<span></span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"># How to use</span>
<span class="sd"># from pyOpenRPA.Tools import StopSafe</span>
<span class="sd"># StopSafe.Init(inLogger=None)</span>
<span class="sd"># StopSafe.IsSafeStop() # True - WM_CLOSE SIGNAL has come. taskkill /im someprocess.exe</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="kn">import</span> <span class="nn">win32con</span>
<span class="kn">import</span> <span class="nn">win32gui</span>
<span class="kn">import</span> <span class="nn">os</span>
<span class="n">gIsSignalCloseBool</span> <span class="o">=</span> <span class="kc">False</span>
<span class="n">gLogger</span> <span class="o">=</span> <span class="kc">None</span>
<span class="n">gWindowTitleStr</span> <span class="o">=</span> <span class="s2">&quot;PythonTerminator&quot;</span> <span class="c1"># Title of the phantom window</span>
<span class="n">gWindowDescriptionStr</span> <span class="o">=</span> <span class="s2">&quot;pyOpenRPA library for safe turn off the program (by send the WM_CLOSE signal from task kill)&quot;</span> <span class="c1"># Description of the phantom window</span>
<div class="viewcode-block" id="Init"><a class="viewcode-back" href="../../../Tools/02_Defs.html#pyOpenRPA.Tools.StopSafe.Init">[документация]</a><span class="k">def</span> <span class="nf">Init</span><span class="p">(</span><span class="n">inLogger</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Init the StopSafe module. After that you can use def IsStopSafe() to check if close signal has come.</span>
<span class="sd"> :param inLogger: Logger to log messages about StopSafe</span>
<span class="sd"> :return:</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">global</span> <span class="n">gLogger</span>
<span class="k">global</span> <span class="n">gIsSignalCloseBool</span>
<span class="n">gIsSignalCloseBool</span> <span class="o">=</span> <span class="kc">False</span> <span class="c1"># Init default</span>
<span class="n">gLogger</span> <span class="o">=</span> <span class="n">inLogger</span>
<span class="kn">import</span> <span class="nn">threading</span>
<span class="k">if</span> <span class="n">gLogger</span><span class="p">:</span> <span class="n">gLogger</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;StopSafe: Init termination catch thread&quot;</span><span class="p">)</span>
<span class="n">shutdown_thread</span> <span class="o">=</span> <span class="n">threading</span><span class="o">.</span><span class="n">Thread</span><span class="p">(</span><span class="n">target</span><span class="o">=</span><span class="n">_shutdown_monitor</span><span class="p">)</span>
<span class="n">shutdown_thread</span><span class="o">.</span><span class="n">start</span><span class="p">()</span></div>
<span class="c1">#shutdown_thread.join()</span>
<span class="c1">#shutdown_monitor()</span>
<div class="viewcode-block" id="IsStopSafe"><a class="viewcode-back" href="../../../Tools/02_Defs.html#pyOpenRPA.Tools.StopSafe.IsStopSafe">[документация]</a><span class="k">def</span> <span class="nf">IsStopSafe</span><span class="p">():</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Check if stop signal has come.</span>
<span class="sd"> :return:</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">global</span> <span class="n">gIsSignalCloseBool</span> <span class="c1"># Init the global variable</span>
<span class="k">return</span> <span class="n">gIsSignalCloseBool</span> <span class="c1"># Return the result</span></div>
<span class="k">def</span> <span class="nf">_shutdown_monitor</span><span class="p">():</span>
<span class="k">global</span> <span class="n">gIsSignalCloseBool</span> <span class="c1"># Init the global variable</span>
<span class="k">global</span> <span class="n">gLogger</span>
<span class="k">def</span> <span class="nf">wndproc</span><span class="p">(</span><span class="n">hwnd</span><span class="p">,</span> <span class="n">msg</span><span class="p">,</span> <span class="n">wparam</span><span class="p">,</span> <span class="n">lparam</span><span class="p">):</span>
<span class="k">if</span> <span class="n">msg</span> <span class="o">==</span> <span class="n">win32con</span><span class="o">.</span><span class="n">WM_CLOSE</span><span class="p">:</span>
<span class="n">win32gui</span><span class="o">.</span><span class="n">DestroyWindow</span><span class="p">(</span><span class="n">hwnd</span><span class="p">)</span>
<span class="k">return</span> <span class="mi">0</span>
<span class="k">elif</span> <span class="n">msg</span> <span class="o">==</span> <span class="n">win32con</span><span class="o">.</span><span class="n">WM_DESTROY</span><span class="p">:</span>
<span class="n">win32gui</span><span class="o">.</span><span class="n">PostQuitMessage</span><span class="p">(</span><span class="mi">0</span><span class="p">)</span>
<span class="k">return</span> <span class="mi">0</span>
<span class="k">return</span> <span class="n">win32gui</span><span class="o">.</span><span class="n">DefWindowProc</span><span class="p">(</span><span class="n">hwnd</span><span class="p">,</span> <span class="n">msg</span><span class="p">,</span> <span class="n">wparam</span><span class="p">,</span> <span class="n">lparam</span><span class="p">)</span>
<span class="n">wc</span> <span class="o">=</span> <span class="n">win32gui</span><span class="o">.</span><span class="n">WNDCLASS</span><span class="p">()</span>
<span class="n">wc</span><span class="o">.</span><span class="n">lpszClassName</span> <span class="o">=</span> <span class="n">gWindowTitleStr</span>
<span class="n">wc</span><span class="o">.</span><span class="n">lpfnWndProc</span> <span class="o">=</span> <span class="n">wndproc</span>
<span class="n">win32gui</span><span class="o">.</span><span class="n">RegisterClass</span><span class="p">(</span><span class="n">wc</span><span class="p">)</span>
<span class="n">hwnd</span> <span class="o">=</span> <span class="n">win32gui</span><span class="o">.</span><span class="n">CreateWindow</span><span class="p">(</span><span class="n">gWindowTitleStr</span><span class="p">,</span> <span class="n">gWindowDescriptionStr</span><span class="p">,</span>
<span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span>
<span class="n">win32gui</span><span class="o">.</span><span class="n">PumpMessages</span><span class="p">()</span>
<span class="n">gIsSignalCloseBool</span> <span class="o">=</span> <span class="kc">True</span> <span class="c1"># WM_CLOSE message has come</span>
<span class="k">if</span> <span class="n">gLogger</span><span class="p">:</span>
<span class="n">gLogger</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;StopSafe: Program has catch VM_CLOSE signal - do safe exit&quot;</span><span class="p">)</span>
</pre></div>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>
&#169; Copyright 2022, ООО &#34;ОПЕН РПА&#34;.
</p>
</div>
Собрано при помощи <a href="https://www.sphinx-doc.org/">Sphinx</a> с использованием
<a href="https://github.com/readthedocs/sphinx_rtd_theme">темы,</a>
предоставленной <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>

@ -0,0 +1,32 @@
####################################
1. Первый запуск
####################################
Are you ready to install the pyOpenRPA solution on your machine?
Ok, we start.
**Do the following operations:**
- Download the pyOpenRPA package from master branch on GitLab [Download ZIP](https://gitlab.com/UnicodeLabs/OpenRPA/-/archive/master/OpenRPA-master.zip)
- Unzip the package
**Installation has been completed :)**
**************************************************
How to check installation
**************************************************
- Run portable python (built in the pyOpenRPA)
- x32 python (GIT\\Resources\\WPy32-3720\\python-3.7.2\\python.exe)
- x64 python (GIT\\Resources\\WPy64-3720\\python-3.7.2.amd64\\python.exe)
**The pyOpenRPA has been successfully installed if the portable python 3.7.2 was started without any exceptions (see screenshot).**
.. image:: /img/cb5dec8cecafa7d64f6cd14b2672acce.png
:alt: cb5dec8cecafa7d64f6cd14b2672acce.png
**************************************************
System requirements
**************************************************
- OS Windows 7+. *Need Windows package KB2999226 if use windows Vista/7/8/8.1/Server 2008/Server 2012 (https://support.microsoft.com/ru-ru/help/2999226)*
- For OpenCV: OS Windows 7/8/8/10 only (no Windows Server)

@ -0,0 +1,42 @@
.. _3.-Copyrights-&-Contacts:
####################################
2. Права & Контакты
####################################
pyOpenRPA is created by Ivan Maslov (Russia).
Hosted by PYOPENRPA LLC (Russia)
My purpose is to create #IT4Business models in the companies.
I can help you to create the new #IT4Business in your company.
#IT4Business homepage - https://www.facebook.com/RU.IT4Business
#IT4Busines is the methodology which is created for build compact fast and reliable IT function in company.
If you has many IT specialists, very long deadlines for the IT tasks, many bugs in IT software - #IT4Business is for you :)
If you need some IT help - feel free to contact me (prefer e-mail or skype).
If you will find some issue in pyOpenRPA - write about it to me via e-mail/skype/gitlab issue.
Thank you!
**************************************************
Ivan Maslov (CEO & FOUNDER)
**************************************************
Our contacts:
- E-mail: Ivan.Maslov@pyOpenRPA.ru
- Skype: MegaFinder
- Web: https://pyopenrpa.ru/
- Telegram: https://t.me/pyopenrpa
- WhatsApp | Telegram: +7 906 722 39 25 | @IvanMaslov
**************************************************
3-rd party components license dependencies
**************************************************
- WinPython 3.7.1 32-bit & 64-bit, license MIT (https://github.com/winpython/winpython)
- Selenium v..., license Apache 2.0
- pywinauto 0.6.5, license BSD 3-Clause (https://github.com/pywinauto/pywinauto)
- Semantic UI ..., license MIT (https://github.com/Semantic-Org/Semantic-UI)
- PyAutoGUI ..., license BSD 3-Clause (https://github.com/asweigart/pyautogui)
- keyboard ..., license MIT (https://github.com/boppreh/keyboard)
- pywin32 ..., Python Software Foundation License (PSF) (https://github.com/mhammond/pywin32)

@ -0,0 +1,23 @@
####################################
2. Defs
####################################
**************************************************
pyOpenRPA.Agent.__Agent__
**************************************************
.. automodule:: pyOpenRPA.Agent.__Agent__
:members:
:autosummary:
**********
References
**********
`reStructuredText`_
.. target-notes::
.. _`reStructuredText`: http://docutils.sourceforge.net/rst.html

@ -0,0 +1,90 @@
####################################
1. Description
####################################
pyOpenRPA Orchestrator is the executable process.
The features of the orchestrator is:
- Centralized/decentralized user control interface (applicable and for business users and for technical users). Web based, support desktop, tablet, phone.
- Automatized robots control (customized algorithms, robots scheduling)
- Source code mega flexibility: Light Orchestrator architecture is good for own customization
************************************
Global settings dict concept
************************************
pyOpenRPA project is complex tool which consist of several executable modules such as Robot, Orchestrator, Studio,
Because of module compexity, we use 1 init arg - inGSettings
inGSettings is a complex dictionary which has all reqired parameters for the module execution.
The description of the GSettings you can find in executable module details.
************************************
Orchestrator how to configure
************************************
To init pyOpenRPA Orchestrator instance use script:
from pyOpenRPA import Orchestrator # Import orchestrator main
gSettings = SettingsTemplate.Create(inModeStr="BASIC") # Create GSettings with basic configuration
Orchestrator.Orchestrator(inGSettings=gSettings) # Call the orchestrator def
gSettings structure
************************************
Orchestrator architecture
************************************
Orchestrator has several source code components:
- User/robot activity consolidated queue single thread (Processor)
- User/robot activity asynchonus many threads (Processor)
- Scheduler single thread (main)
- RDP keep active many thread
- Autocleaner single thread
- GUI keep active single thread
- HTTP web server single thread (create user socket threads)
-
Below you can find more information about all of the component.
***************************
Component Processor
***************************
Sync - Append activity list to consolidated processor queue. Execution goes sequency by the activity list order
Async - Create New thread to execute the activity list
- Activity list
List of the activity item
- Activity item
Activity item is universal mechanism to execute different algorythms from any sources.
The core feature of the Activity is to call python defs with args and kwargs.
If you need to init do some activity you can write some python def, then create Activity item with current def.
ATTENTION: In some cases (such as web transmition), when you can't transmit python def as object you can use symbolic names for python defs. It is apply you to init all of you want from the web UI.
?Why i cant transmit python def from the web
Because the WEB space is not the Python executable space. Interaction between it spaces create by JSON protocol. So, we know than JSON apply int, float, str, bool, None, list, dict - that is all.
.. note::
Example
{
"Def":"DefAliasTest", # def link or def alias (look gSettings["Processor"]["AliasDefDict"])
"ArgList":[1,2,3], # Args list
"ArgDict":{"ttt":1,"222":2,"dsd":3}, # Args dictionary
"ArgGSettings": None # Name of GSettings attribute: str (ArgDict) or index (for ArgList)
"ArgLogger": None # Name of GSettings attribute: str (ArgDict) or index (for ArgList)
}# Pay attention! Do not left comma symbol after the end of the dict - it can be interpretated like a turple..
**********
References
**********
`Python-sphinx`_
.. target-notes::
.. _`reStructuredText`: http://docutils.sourceforge.net/rst.html

@ -0,0 +1,88 @@
####################################
2. Defs
####################################
**************************************************
pyOpenRPA.Orchestrator.__Orchestrator__
**************************************************
.. code-block:: python
# EXAMPLE 1
from pyOpenRPA import Orchestrator
Orchestrator.OSCMD(inCMDStr = "git status", inRunAsyncBool=True)
# EXAMPLE 2
from pyOpenRPA.Orchestrator import __Orchestrator__
__Orchestrator__.OSCMD(inCMDStr = "git status", inRunAsyncBool=True)
Group Agent...
######################
Interaction between Orchestrator and pyOpenRPA.Agent daemon process, which can be deployed in another user session.
Group GSettings...
######################
Basic defs to work with singleton gSettings.
Group Storage...
######################
Defs to work with special locations in Orchestrator: Robot, User (TODO), User + Robot (TODO)
Group OS...
######################
Interaction with shell on the Orchestrator user session.
Group Process...
######################
Interaction with some process on the Orchestrator user session.
Group Processor...
######################
Work with Processor queue (see ...).
Group Python...
######################
Work with extra python modules.
Group RDPSession...
######################
Interaction with RDP session, where you can manage some robots.
Group Web...
######################
Manipulate the Orchestrator WEB side.
Group UAC...
######################
Manipulate the User Access Controls (actual for the Orchestrator WEB access for the business users)
Group Scheduler...
######################
Work with activity scheduling.
.. automodule:: pyOpenRPA.Orchestrator.__Orchestrator__
:members:
:autosummary:
**************************************************
pyOpenRPA.Orchestrator.Web.Basic
**************************************************
.. automodule:: pyOpenRPA.Orchestrator.Web.Basic
:members:
:autosummary:
**********
References
**********
`reStructuredText`_
.. target-notes::
.. _`reStructuredText`: http://docutils.sourceforge.net/rst.html

@ -0,0 +1,9 @@
.. _gSettingsTemplate:
************************
3. gSettings Template
************************
gSettings structure
.. include:: ../../pyOpenRPA/Orchestrator/SettingsTemplate.py
:literal:

@ -0,0 +1,19 @@
************************
4. How to use
************************
You need to run orchestrator process?
.. code-block:: python
if __name__ == "__main__": # New init way - allow run as module -m PyOpenRPA.Orchestrator
from pyOpenRPA import Orchestrator # Import orchestrator main
gSettings = SettingsTemplate.Create(inModeStr="BASIC") # Create GSettings with basic configuration - no more config is available from the box - you can create own
# Call the orchestrator main def
Orchestrator.Orchestrator(inGSettings=gSettings)
If you need more configurations - so you can see here:
.. include:: ../../../Orchestrator/OrchestratorSettings.py
:literal:

@ -0,0 +1,58 @@
####################################
5. UAC - User Access Control
####################################
*****************
About
*****************
Orchestrator has mega feature - user access control (UAC). This feature allow you to manipulate access of the web UI for the all users!
If you need to give admin rights - you don't customize UAC dict.
If you need to give some little rights for user only for one robot in orchestrator web panel - you can set the following properties in UAC dict.
To work with UAC you can use defs ``Orchestrator.UAC`` group.
!!!ATTENTION!!!
Need practice example to work with UAC! - too hard to understand
***************************************************
UAC Dict for Orchestrator WEB UI rights
***************************************************
UAC Dict for pyOpenRPA Orchestrator WEB UI rights.
.. code-block:: python
"pyOpenRPADict":{
"CPKeyDict":{ # Empty dict - all access
# "CPKeyStr"{
# }
},
"RDPKeyDict":{ # Empty dict - all access
#"RDPKeyStr"{
# "FullscreenBool": True,
# "IgnoreBool":True,
# "ReconnectBool": True
# "NothingBool": True # USe option if you dont want to give some access to the RDP controls
# }
},
"AgentKeyDict": { # Empty dict - all access
# "AgentKeyStr"{
# }
},
"AdminDict":{ # Empty dict - all access
"LogViewerBool":True, # Show log viewer on the web page
"CMDInputBool":True, # Execute CMD on the server side and result to the logs
"ScreenshotViewerBool":True, # Show button to look screenshots
"RestartOrchestratorBool": True, # Restart orchestrator activity
"RestartOrchestratorGITPullBool": True, # Turn off (RDP remember) orc + git pull + Turn on (rdp remember)
"RestartPCBool": True, # Send CMD to restart pc
"NothingBool":True # USe option if you dont want to give some access to the RDP controls
},
"ActivityDict": { # Empty dict - all access
"ActivityListExecuteBool": True, # Execute activity at the current thread
"ActivityListAppendProcessorQueueBool": True # Append activity to the processor queue
}
}

@ -0,0 +1,52 @@
####################################
6. Defs Managers
####################################
**************************************************
Process (General)
**************************************************
.. code-block:: python
# EXAMPLE
from pyOpenRPA.Orchestrator import Orchestrator
lProcess = Orchestrator.Managers.Process(inAgentHostNameStr="PC-DESKTOP",inAgentUserNameStr="ND", inProcessNameWOExeStr="notepad",inStartCMDStr="notepad")
.. automodule:: pyOpenRPA.Orchestrator.Managers.Process
:members:
:autosummary:
**************************************************
Process (Details)
**************************************************
.. automodule:: pyOpenRPA.Orchestrator.Managers.Process
:members:
:autosummary:
**************************************************
ControlPanel (General)
**************************************************
.. code-block:: python
# EXAMPLE
from pyOpenRPA.Orchestrator import Orchestrator
lCP = Orchestrator.Managers.ControlPanel(inControlPanelNameStr="TestTTT",inRefreshHTMLJinja2TemplatePathStr="ControlPanel\\test.html", inJinja2TemplateRefreshBool = True)
.. automodule:: pyOpenRPA.Orchestrator.Managers.ControlPanel
:members:
:autosummary:
**************************************************
ControlPanel (Details)
**************************************************
.. automodule:: pyOpenRPA.Orchestrator.Managers.ControlPanel
:members:
:autosummary:

@ -0,0 +1,22 @@
************************
1. Описание
************************
pyOpenRPA Robot is the python package which allow you to create best RPA program.
The description of the functions you can find page 'Defs' (see menu)
Here is the example of the pyOpenRPA usage.
.. code-block:: python
# EXAMPLE 1
from pyOpenRPA.Robot import UIDesktop
lNotepadOKButton = UIDesktop.UIOSelector_Get_UIO(
inSpecificationList=[
{"title":"notepad.exe"},{"title":"OK"}],
inElement=None,
inFlagRaiseException=True)
lNotepadOKButton.click()

@ -0,0 +1,36 @@
####################################
2. Функции
####################################
Here you can find the functions description for interaction with desktop GUI applications
How to use both x32 and x64 python processes (it can be helpfully, if another app GUI is on another bitness than your app)
.. code-block:: python
from pyOpenRPA.Robot import UIDesktop
#Section for robot init
lPyOpenRPA_SettingsDict = {
"Python32FullPath": "..\\Resources\\WPy32-3720\\python-3.7.2\\python.exe", #Set from user: "..\\Resources\\WPy32-3720\\python-3.7.2\\OpenRPARobotGUIx32.exe"
"Python64FullPath": "..\\Resources\\WPy64-3720\\python-3.7.2.amd64\\python.exe", #Set from user
"Python32ProcessName": "pyOpenRPA_UIDesktopX32.exe", #Config set once
"Python64ProcessName": "pyOpenRPA_UIDesktopX64.exe" #Config set once
}
# Init the pyOpenRPA configuration
UIDesktop.Utils.ProcessBitness.SettingsInit(lPyOpenRPA_SettingsDict)
# Now you can use pyOpenRPA with both bitness.
.. automodule:: pyOpenRPA.Robot.UIDesktop
:members:
:autosummary:
**********
References
**********
`reStructuredText`_
.. target-notes::
.. _`reStructuredText`: http://docutils.sourceforge.net/rst.html

@ -0,0 +1,226 @@
####################################
3. Как использовать?
####################################
The Robot tool is the main module for production process automation. It has no graphic/console interface. All low-level actions to OS are perfoming by the Robot tool in pyOpenRPA.
**************************************************
How to execute RPA script
**************************************************
You can use the robot by the several ways:
- In Python script
- In Studio script (n/a)
Create python script
############################################
In order to use robot just add Robot tool folder in work directory and add line "import GUI" in your script.
.. code-block:: python
import sys
sys.path.append('../../')
import selenium # [Web app access](https://gitlab.com/UnicodeLabs/OpenRPA/wikis/05.1.-Theory-&-practice:-Web-app-access-(Chrome,-Firefox,-Opera))<br>
import GUI # [Win32 & UI Automation access](https://gitlab.com/UnicodeLabs/OpenRPA/wikis/05.2.-Theory-&-practice:-Desktop-app-UI-access-(win32-and-UI-automation-dlls)) <br>
import pyautogui #[Screen capture/recognition](https://gitlab.com/UnicodeLabs/OpenRPA/wikis/05.4.-Theory-&-practice:-Screen-capture-&-image-recognition) [#Mouse manipulation](https://gitlab.com/UnicodeLabs/OpenRPA/wikis/05.3.-Theory-&-practice:-Keyboard-&-mouse-manipulation)<br>
import cv2 # [Computer vision](https://gitlab.com/UnicodeLabs/OpenRPA/wikis/05.4.-Theory-&-practice:-Screen-capture-&-image-recognition)<br>
import keyboard #[Keyboard manipulation](https://gitlab.com/UnicodeLabs/OpenRPA/wikis/05.3.-Theory-&-practice:-Keyboard-&-mouse-manipulation)<br>
Execute python script
############################################
The pyOpenRPA is fully portable solution. It contains own python enviroment both 32 and 64 bit versions. So, you can execute your python script in several ways:
- Execute in python x32 (\OpenRPA\Resources\WPy32-3720\python-3.7.2)
- Execute in python x64 (\OpenRPA\Resources\WPy64-3720\python-3.7.2.amd64)
- Execute from .cmd file
Execute in the Python x32
############################################
To execute your python script in x32 bit version just write in command line from x32 python directory:
.. code-block:: python
cd "\OpenRPA\Resources\WPy32-3720\python-3.7.2"
python.exe "path to your python script.py"
Execute in the Python x64
############################################
To execute your python script in x32 bit version just write in command line from x32 python directory:
.. code-block:: python
cd "\OpenRPA\Resources\WPy64-3720\python-3.7.2.amd64"
python.exe "path to your python script.py"
Execute from .cmd file
############################################
In order to simplify the execution process you can write several code lines in file with the .cmd extension:
.. code-block:: python
cd %~dp0
copy /Y ..\Resources\WPy32-3720\python-3.7.2\python.exe ..\Resources\WPy32-3720\python-3.7.2\OpenRPAOrchestrator.exe
.\..\Resources\WPy32-3720\python-3.7.2\OpenRPAOrchestrator.exe orchestratorMain.py
pause >nul
Use in studio script (n/a)
############################################
.. code-block:: python
import sys
sys.path.append('../../')
import GUI
import keyboard
import subprocess
import time
#Highlight the UI Object in Folder explorer
GUI.UIOSelector_FocusHighlight([{"class_name":"CabinetWClass","backend":"uia"},{"ctrl_index":2},{"ctrl_index":0},{"ctrl_index":2},{"ctrl_index":0}])
#Wait 2 seconds
time.sleep(3)
#Loop: get child element of UI List
for lItem in GUI.UIOSelector_Get_UIO([{"class_name":"CabinetWClass","backend":"uia"},{"ctrl_index":2},{"ctrl_index":0},{"ctrl_index":2},{"ctrl_index":0}]).children():
print(str(lItem))
Here you can find the docs and examples of the OpenRPA desktop (GUI) app access.
****************************************************************************************************
Desktop app UI access (win32 and UI automation dlls)
****************************************************************************************************
Definitions
############################################
- **UIO** - UI Object (class of pywinauto UI object) [pywinauto.base_wrapper]
- **UIOSelector** - List of dict (key attributes)
- **PWA** - PyWinAuto
- **PWASpecification** - List of dict (key attributes in pywinauto.find_window notation)
- **UIOTree** - Recursive Dict of Dict ... (UI Parent -> Child hierarchy)
- **UIOInfo** - Dict of UIO attributes
- **UIOActivity** - Activity of the UIO (UI object) from the Pywinauto module
- **UIOEI** - UI Object info object
What is UIO?
############################################
UIO is a User Interface Object (pyOpenRPA terminology). For maximum compatibility, this instance is inherited from the object model developed in the [pywinauto library (click to get a list of available class functions)](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.base_wrapper.html).
This approach allows us to implement useful functionality that has already been successfully developed in other libraries, and Supplement it with the missing functionality. In our case, the missing functionality is the ability to dynamically access UIO objects using UIO selectors.
UIOSelector structure & example
############################################
UIOSelector is the list of condition items for the UIO in GUI. Each item has condition attributes for detect applicable UIO. Here is the description of the available condition attributes in item.
**Desciption**
.. code-block:: python
[
{
"depth_start" :: [int, start from 1] :: the depth index, where to start check the condition list (default 1),
"depth_end" :: [int, start from 1] :: the depth index, where to stop check the condition list (default 1),
"ctrl_index" || "index" :: [int, starts from 0] :: the index of the UIO in parent UIO child list,
"title" :: [str] :: the condition for the UIO attribute *title*,
"title_re" :: [str] :: regular expression (python ver) for the condition for the UIO attribute *title*,
"rich_text" :: [str] :: the condition for the UIO attribute *rich_text*,
"rich_text_re" :: [str] :: regular expression (python ver) for the condition for the UIO attribute *rich_text*,
"class_name" :: [str] :: the condition for the UIO attribute *class_name*,
"class_name_re" :: [str] :: regular expression (python ver) for the condition for the UIO attribute *class_name*,
"friendly_class_name" :: [str] :: the condition for the UIO attribute *friendly_class_name*,
"friendly_class_name_re" :: [str] :: regular expression (python ver) for the condition for the UIO attribute *friendly_class_name*,
"control_type" :: [str] :: the condition for the UIO attribute *control_type*,
"control_type_re" :: [str] :: regular expression (python ver) for the condition for the UIO attribute *control_type*,
"is_enabled" :: [bool] :: the condition for the UIO attribute *is_enabled*. If UI object is enabled on GUI,
"is_visible" :: [bool] :: the condition for the UIO attribute *is_visible*. If UI object is visible on GUI,
"backend" :: [str, "win32" || "uia"] :: the method of UIO extraction (default "win32"). ATTENTION! Current option can be only for the first item of the UIO selector. For the next items this option will be implemented from the first item.
},
{ ... specification next level UIO }
]
**The UIO selector example**
.. code-block:: python
[
{"class_name":"CalcFrame", "backend":"win32"}, # 1-st level UIO specification
{"title":"Hex", "depth_start":3, "depth_end": 3} # 3-rd level specification (because of attribute depth_start|depth_stop)
]
The UIDesktop module (OpenRPA/Robot/UIDesktop.py)
########################################################################################
The UIDesktop is extension of the pywinauto module which provide access to the desktop apps by the **win32** and **ui automation** dll frameworks (big thx to the Microsoft :) ).
.. code-block:: python
# EXAMPLE 1
from pyOpenRPA.Robot import UIDesktop
UIDesktop.UIOSelector_Get_UIO(
inSpecificationList=[
{"title":"notepad.exe"},{"title":"OK"}],
inElement=None,
inFlagRaiseException=True)
The UIDesktop module (OpenRPA/Robot/UIDesktop.py)
########################################################################################
The UIDesktop is extension of the pywinauto module which provide access to the desktop apps by the **win32** and **ui automation** dll frameworks (big thx to the Microsoft :) ).
*Naming convention: \<InArgument\>\_\<ActivityName\>\_\<OutArgument - if exist>*<br>
****************************************************************************************************
Theory & practice. WEB app UI access (selenium)
****************************************************************************************************
About
###############################################
The pyOpenRPA support web app manipulation (by the Selenium lib).
More docs about selenium you can find here (https://selenium-python.readthedocs.io/)
How to use
###############################################
To start use selenium just import selenium modules in the robot tool. Here is the example of the usage.
.. code-block:: python
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
driver = webdriver.Chrome()
driver.get("http://www.python.org")
assert "Python" in driver.title
elem = driver.find_element_by_name("q")
elem.clear()
elem.send_keys("pycon")
elem.send_keys(Keys.RETURN)
assert "No results found." not in driver.page_source
driver.close()
****************************************************************************************************
Theory & practice. Keyboard & mouse manipulation
****************************************************************************************************
****************************************************************************************************
Theory & practice. Screen capture & image recognition
****************************************************************************************************
How to automate image recognition on PC
###########################################
Here you can find any ways you need to use in your business case:
- Find the exact match on the screen with the other image
- Use text recognition module (OCR)
- Use computer vision (CV) to identify the objects on screen/image/video
- Use artificial intelligence (AI) to make custom identification/classification/text recognition

@ -0,0 +1,10 @@
####################################
4. Зависимости
####################################
Python 3 x32 [psutil, pywinauto, wmi, PIL, keyboard, pyautogui, win32api (pywin32), selenium, openCV, tesseract, requests, lxml, PyMuPDF]
Python 3 x64 [psutil, pywinauto, wmi, PIL, keyboard, pyautogui, win32api (pywin32), selenium, openCV, tesseract, requests, lxml, PyMuPDF]
pywinauto (Windows GUI automation)
Semantic UI CSS framework
JsRender by https://www.jsviews.com (switch to Handlebars)
Handlebars

@ -0,0 +1,5 @@
************************
1. Описание
************************
pyOpenRPA Studio is the executable process.

@ -0,0 +1,126 @@
####################################
2. Как использовать?
####################################
Content
=======
- `How to run <#how-to-run>`__
- `UI Description <#ui-description>`__
- `How to extract UI tree <#how-to-extract-ui-tree>`__
- `How to search UI object by mouse
hover <#how-to-search-ui-object-by-mouse-hover>`__
- `How to extract UI object
properties <#how-to-extract-ui-object-properties>`__
How to run
==========
- For OS x32
- Run (double click): OpenRPA\_32.cmd (for OS x32)
- For OS x64
- Run (double click): OpenRPA\_64.cmd (for OS x64)
- Wait text "running server" in console. Default browser will be open
automatically
- **Attention!** The studio tool does not support the Internet explorer
(any version) for GUI rendering (lol)
.. image:: /img/504b98f76747f63900a2943532a946bb.png
:alt: 504b98f76747f63900a2943532a946bb.png
UI Description
==============
**The studio tool GUI contains of:**
1. UI tree viewer
2. Selected UI object hierarchy list
3. Selected UI object property list
4. UIO selector editor
5. UIO action panel
6. Another Python activity panel
7. Action/activity list
*Look it on the GUI screenshots are listed below*
GUI Screenshot 1
----------------
.. image:: /img/d3d6ad14a7e50843bd89d2b14a092fee.png
:alt: 504b98f76747f63900a2943532a946bb.png
GUI Screenshot 2
----------------
.. image:: /img/65b7d51c0a5b21e6b27dc23d4062d3ca.png
:alt: 65b7d51c0a5b21e6b27dc23d4062d3ca.png
How to extract UI tree
======================
In order to extract the UI tree do the following: in ``UI tree viewer``
choose the object you are interested and click the button "Expand". ##
Action: Click the button "Expand"
---------------------------------------
.. image:: /img/6effc376ff6ea928840674bd744caced.png
:alt: 6effc376ff6ea928840674bd744caced.png
Result
---------------------------------------
.. image:: /img/18b9ab36126c8c32168bf5bbb9330701.png
:alt: 18b9ab36126c8c32168bf5bbb9330701.png
How to search UI object by mouse hover
---------------------------------------
In order to search UI object do the
following: in ``UI tree viewer`` choose the parent object, where you are
want to search UI object, and click the button "Mouse search". The mouse
search mode will start. Turn mouse on the UI object you are interested
and wait when the studio will highlight the UI object. After the
hightlight hold the "Ctrl" key and wait 3 seconds. The interested UI
object will be shown in ``UI tree viewer``.
Action: Click the button "Mouse search"
---------------------------------------
.. image:: /img/84d7e4de0c840631f87cf7b325b53ad8.png
:alt: 84d7e4de0c840631f87cf7b325b53ad8.png
Action: Turn mouse on the UI object you are interested and hold the "Ctrl" key for 3 seconds
--------------------------------------------------------------------------------------------
.. image:: /img/b7c38d622bf5b7afa5b26d1686d7302a.png
:alt: b7c38d622bf5b7afa5b26d1686d7302a.png
Result: The interested UI object will be shown in ``UI tree viewer``
--------------------------------------------------------------------
.. image:: /img/629bbf4db2c01b9c640194230949fcd2.png
:alt: 629bbf4db2c01b9c640194230949fcd2.png
How to extract UI object properties
===================================
In order to extract UI object properties do the following: in
``Selected UI object hierarchy list`` choose the UI object you are
interested and click it. The UI object property list will be shown in
``Selected UI object property list``
Action: Choose the UI object you are interested and click it
------------------------------------------------------------------------------
.. image:: /img/2c27be5bdde20b5d062cbb40e74eaec5.png
:alt: 2c27be5bdde20b5d062cbb40e74eaec5.png
Result: The UI object property list will be shown in ``Selected UI object property list``
-----------------------------------------------------------------------------------------
.. image:: /img/f235ae29099a713e0246cd574ac3a17c.png
:alt: f235ae29099a713e0246cd574ac3a17c.png

@ -0,0 +1,30 @@
####################################
2. Defs StopSafe
####################################
How to use StopSafe on the robot side
.. code-block:: python
from pyOpenRPA.Tools import StopSafe
StopSafe.Init(inLogger=None)
StopSafe.IsSafeStop() # True - WM_CLOSE SIGNAL has come. taskkill /im someprocess.exe
.. automodule:: pyOpenRPA.Tools.StopSafe
:members:
:autosummary:
.. automodule:: pyOpenRPA.Tools.Debugger
:members:
:autosummary:
**********
References
**********
`reStructuredText`_
.. target-notes::
.. _`reStructuredText`: http://docutils.sourceforge.net/rst.html

@ -0,0 +1,197 @@
.. pyOpenRPA documentation master file, created by
sphinx-quickstart on Sat Dec 19 23:59:00 2020.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
####################################
Портал документации pyOpenRPA
####################################
.. image:: /img/ModalGuide.png
:alt: ModalGuide.png
**************************************************
Дорогие коллеги!
**************************************************
Добро пожаловать на портал документации pyOpenRPA.
pyOpenRPA - это самое прогрессивное и технологичное RPA решение на рынке роботизации. Наших роботов невозможно отключить принудительно - управлять ими будете только вы!
Вместе с pyOpenRPA стало возможно сочетать в рамках одного проекта все перспективные технологии, такие как:
* распознавание,
* искусственный интеллект,
* машинное обучение,
* большие данные,
* голосовые и чат-боты,
* речевая аналитика,
* компьютерное зрение.
В компании pyOpenRPA LLC мы создаем стандарты вендора нового поколения. Предлагаем не просто платформу роботизации RPA, а уникальный набор услуг для каждого клиента в зависимости от решаемой задачи.
Мы знаем, что реальная ценность роботизации RPA для вас заключается не в каком-то софте. Софт - это лишь 1 из 3 компонентов. Остальные 2 компонента - это люди и вычислительные мощности (железо). Вам нужно комплексное и системное решение проблемы, и мы вам в этом поможем!
Наша открытость и ряд стратегических инициатив позволяют с легкостью привлекать сотни новых специалистов и клиентов. Быть предельно прозрачными перед всеми участниками рынка. Предлагать индивидуальный набор услуг, нацеленный именно на решение проблем клиента.
С презентацией pyOpenRPA вы можете ознакомиться по ссылке: `[СМОТРЕТЬ PDF] <https://pyopenrpa.ru/Index/pyOpenRPA_product_service.pdf>`_ Если возникнут вопросы, то вы всегда можете обратиться к нам!
pyOpenRPA - роботы вам помогут!
**Иван Маслов, основатель и генеральный директор pyOpenRPA LLC**
ВЕРСИЯ |release|
*by Ivan Maslov (Russia)* - see :ref:`3.-Copyrights-&-Contacts`.
! ATTENTION ! pyOpenRPA works only on MS Windows 7+/Server 2008+. Guys from Unix/Mac - sorry. We will come to you soon :)
**************************************************
About
**************************************************
Dear RPA-tors. Let me congratulate you with great change in the RPA world. Since 2019 the first enterprise level open source RPA platform is here!
pyOpenRPA is absolutely open source commercial project. Hosted by LLC PYOPENRPA (RUSSIA)
The pyOpenRPA - free, fast and reliable
Powerful OpenSource RPA tool for business (based on python 3). Best performance and absolutely free!
The pyOpenRPA is based on Python and using well known OpenSource solutions such as Selenium, OpenCV, Win32, UI automation and others. Thanks to it we were able to create consolidated platform with all possible features.
The pyOpenRPA is distributed under the PYOPENRPA open license.
At the time of this writing the pyOpenRPA is successfully using in several big Russian companies. Companies in which it was decided to develop own RPA division with no dependencies on expensive licenses.
**************************************************
Repo structure
**************************************************
The description of the each folder in GitLab repo is going below:
- **Agent**: template build for the pyOpenRPA.Agent component
- **Orchestrator**: template build for the pyOpenRPA.Orchestrator component
- **Resources**: 3rd party resources which is needed to provide pyOpenRPA encapsulation from the Operating System (OS) dependencies.
- **Robot**: template build for the robot
- **Sources**: pyOpenRPA python package sources + sphinx sources
- **Studio**: build for the pyOpenRPA.Studio which support Desktop UI (support x32 and x64 desktop UI apps)
- **Utils**: many additional good tools for the python developer
- **Wiki**: compiled wiki documentation
**************************************************
The pyOpenRPA structure
**************************************************
The pyOpenRPA has 4 main tools:
############################################
- Studio
- Robot
- Orchestrator
- Agent
Studio
######################
The pyOpenRPA.Studio tool has been developed to help RPA-tors to create the robot algorythms.
**Features**
- Run actions
- Create visual algorythms of the robot
- Desktop app: Analyze desktop app ui tree
- Desktop app: Search desktop app ui by mouse
- Desktop app: Generate & edit the UIO Selector
Robot
######################
The pyOpenRPA.Robot package is the core of any action execution in the pyOpenRPA. All action from algorythms are perfoming by the Robot tool. It looks like a console process without graphic user interface.
**Features**
- Based on Python (killer feature)
- Support Win32 GUI framework (desktop app)
- Support UI automation framework (desktop app)
- Support Selenium (web app)
- Support PyAutoGUI (screen capture & mouse)
- Support OpenCV (computer vision)
Orchestrator
######################
The pyOpenRPA.Orchestrator package has been developed to maintain robot infrastructure (2+ robots algorythm).
**Features**
- Start/Stop robot algorithm
- Robot scheduler
- Remote machine screenshot viewer
- Remote machine cmd shell
- Remote machine logs storage
Agent
######################
The pyOpenRPA.Agent tool has been developed to maintain robot infrastructure (2+ robots algorythm).
**Features**
- Send CMD to the RPA GUI session (start/safe stop/force stop/logout)
- Get screenshots from the RPA GUI session
- Get the list of the running processes
**************************************************
Wiki structure
**************************************************
In wiki you can use the following docs:
- ENG Guide HTML `[|OPEN GITLAB|] <https://gitlab.com/UnicodeLabs/OpenRPA/-/tree/master/Wiki/ENG_Guide/html/index.html>`_
- ENG Guide MarkDown `[|OPEN GITLAB|] <https://gitlab.com/UnicodeLabs/OpenRPA/-/tree/master/Wiki/ENG_Guide/markdown/index.md>`_
- ENG Guide PDF `[|OPEN GITLAB|] <https://gitlab.com/UnicodeLabs/OpenRPA/-/tree/master/Wiki/ENG_Guide/pdf/pyOpenRPA_Guide_ENG.pdf>`_
- RUS Article: Less cost - no paid RPA `[|OPEN HABR|] <https://habr.com/ru/post/506766/>`_
- RUS Tutorial Desktop UI `[|OPEN HABR|] <https://habr.com/ru/post/509644/>`_; `[|OPEN GITLAB|] <https://gitlab.com/UnicodeLabs/OpenRPA/-/tree/master/Wiki/RUS_Tutorial/DesktopGUI_Habr/index.md>`_
- RUS Tutorial Web UI `[|OPEN HABR|] <https://habr.com/ru/post/515310/>`_; `[|OPEN GITLAB|] <https://gitlab.com/UnicodeLabs/OpenRPA/-/tree/master/Wiki/RUS_Tutorial/WebGUI_Habr/readme.md>`_
- RUS Leaflet pyOpenRPA v4.pdf `[|OPEN GITLAB|] <https://gitlab.com/UnicodeLabs/OpenRPA/-/tree/master/Wiki/RUS_Leaflet/RUS%20Leaflet%20pyOpenRPA%20v4.pdf>`_
**************************************************
Guide content
**************************************************
.. toctree::
:maxdepth: 2
:caption: ОБЩЕЕ
:glob:
Выбрать версию <https://pyopenrpa.ru/wiki/guide/index>
*
.. toctree::
:maxdepth: 2
:caption: МОДУЛЬ РОБОТ
:glob:
Robot/*
.. toctree::
:maxdepth: 2
:caption: МОДУЛЬ СТУДИЯ
:glob:
Studio/*
.. toctree::
:maxdepth: 3
:caption: МОДУЛЬ ОРКЕСТРАТОР
:glob:
Orchestrator/*
.. toctree::
:maxdepth: 3
:caption: МОДУЛЬ АГЕНТ
:glob:
Agent/*
.. toctree::
:maxdepth: 2
:caption: ИНСТРУМЕНТЫ
:glob:
Tools/*

File diff suppressed because it is too large Load Diff

@ -0,0 +1,856 @@
/*
* basic.css
* ~~~~~~~~~
*
* Sphinx stylesheet -- basic theme.
*
* :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
/* -- main layout ----------------------------------------------------------- */
div.clearer {
clear: both;
}
div.section::after {
display: block;
content: '';
clear: left;
}
/* -- relbar ---------------------------------------------------------------- */
div.related {
width: 100%;
font-size: 90%;
}
div.related h3 {
display: none;
}
div.related ul {
margin: 0;
padding: 0 0 0 10px;
list-style: none;
}
div.related li {
display: inline;
}
div.related li.right {
float: right;
margin-right: 5px;
}
/* -- sidebar --------------------------------------------------------------- */
div.sphinxsidebarwrapper {
padding: 10px 5px 0 10px;
}
div.sphinxsidebar {
float: left;
width: 230px;
margin-left: -100%;
font-size: 90%;
word-wrap: break-word;
overflow-wrap : break-word;
}
div.sphinxsidebar ul {
list-style: none;
}
div.sphinxsidebar ul ul,
div.sphinxsidebar ul.want-points {
margin-left: 20px;
list-style: square;
}
div.sphinxsidebar ul ul {
margin-top: 0;
margin-bottom: 0;
}
div.sphinxsidebar form {
margin-top: 10px;
}
div.sphinxsidebar input {
border: 1px solid #98dbcc;
font-family: sans-serif;
font-size: 1em;
}
div.sphinxsidebar #searchbox form.search {
overflow: hidden;
}
div.sphinxsidebar #searchbox input[type="text"] {
float: left;
width: 80%;
padding: 0.25em;
box-sizing: border-box;
}
div.sphinxsidebar #searchbox input[type="submit"] {
float: left;
width: 20%;
border-left: none;
padding: 0.25em;
box-sizing: border-box;
}
img {
border: 0;
max-width: 100%;
}
/* -- search page ----------------------------------------------------------- */
ul.search {
margin: 10px 0 0 20px;
padding: 0;
}
ul.search li {
padding: 5px 0 5px 20px;
background-image: url(file.png);
background-repeat: no-repeat;
background-position: 0 7px;
}
ul.search li a {
font-weight: bold;
}
ul.search li div.context {
color: #888;
margin: 2px 0 0 30px;
text-align: left;
}
ul.keywordmatches li.goodmatch a {
font-weight: bold;
}
/* -- index page ------------------------------------------------------------ */
table.contentstable {
width: 90%;
margin-left: auto;
margin-right: auto;
}
table.contentstable p.biglink {
line-height: 150%;
}
a.biglink {
font-size: 1.3em;
}
span.linkdescr {
font-style: italic;
padding-top: 5px;
font-size: 90%;
}
/* -- general index --------------------------------------------------------- */
table.indextable {
width: 100%;
}
table.indextable td {
text-align: left;
vertical-align: top;
}
table.indextable ul {
margin-top: 0;
margin-bottom: 0;
list-style-type: none;
}
table.indextable > tbody > tr > td > ul {
padding-left: 0em;
}
table.indextable tr.pcap {
height: 10px;
}
table.indextable tr.cap {
margin-top: 10px;
background-color: #f2f2f2;
}
img.toggler {
margin-right: 3px;
margin-top: 3px;
cursor: pointer;
}
div.modindex-jumpbox {
border-top: 1px solid #ddd;
border-bottom: 1px solid #ddd;
margin: 1em 0 1em 0;
padding: 0.4em;
}
div.genindex-jumpbox {
border-top: 1px solid #ddd;
border-bottom: 1px solid #ddd;
margin: 1em 0 1em 0;
padding: 0.4em;
}
/* -- domain module index --------------------------------------------------- */
table.modindextable td {
padding: 2px;
border-collapse: collapse;
}
/* -- general body styles --------------------------------------------------- */
div.body {
min-width: 450px;
max-width: 800px;
}
div.body p, div.body dd, div.body li, div.body blockquote {
-moz-hyphens: auto;
-ms-hyphens: auto;
-webkit-hyphens: auto;
hyphens: auto;
}
a.headerlink {
visibility: hidden;
}
a.brackets:before,
span.brackets > a:before{
content: "[";
}
a.brackets:after,
span.brackets > a:after {
content: "]";
}
h1:hover > a.headerlink,
h2:hover > a.headerlink,
h3:hover > a.headerlink,
h4:hover > a.headerlink,
h5:hover > a.headerlink,
h6:hover > a.headerlink,
dt:hover > a.headerlink,
caption:hover > a.headerlink,
p.caption:hover > a.headerlink,
div.code-block-caption:hover > a.headerlink {
visibility: visible;
}
div.body p.caption {
text-align: inherit;
}
div.body td {
text-align: left;
}
.first {
margin-top: 0 !important;
}
p.rubric {
margin-top: 30px;
font-weight: bold;
}
img.align-left, .figure.align-left, object.align-left {
clear: left;
float: left;
margin-right: 1em;
}
img.align-right, .figure.align-right, object.align-right {
clear: right;
float: right;
margin-left: 1em;
}
img.align-center, .figure.align-center, object.align-center {
display: block;
margin-left: auto;
margin-right: auto;
}
img.align-default, .figure.align-default {
display: block;
margin-left: auto;
margin-right: auto;
}
.align-left {
text-align: left;
}
.align-center {
text-align: center;
}
.align-default {
text-align: center;
}
.align-right {
text-align: right;
}
/* -- sidebars -------------------------------------------------------------- */
div.sidebar {
margin: 0 0 0.5em 1em;
border: 1px solid #ddb;
padding: 7px;
background-color: #ffe;
width: 40%;
float: right;
clear: right;
overflow-x: auto;
}
p.sidebar-title {
font-weight: bold;
}
div.admonition, div.topic, blockquote {
clear: left;
}
/* -- topics ---------------------------------------------------------------- */
div.topic {
border: 1px solid #ccc;
padding: 7px;
margin: 10px 0 10px 0;
}
p.topic-title {
font-size: 1.1em;
font-weight: bold;
margin-top: 10px;
}
/* -- admonitions ----------------------------------------------------------- */
div.admonition {
margin-top: 10px;
margin-bottom: 10px;
padding: 7px;
}
div.admonition dt {
font-weight: bold;
}
p.admonition-title {
margin: 0px 10px 5px 0px;
font-weight: bold;
}
div.body p.centered {
text-align: center;
margin-top: 25px;
}
/* -- content of sidebars/topics/admonitions -------------------------------- */
div.sidebar > :last-child,
div.topic > :last-child,
div.admonition > :last-child {
margin-bottom: 0;
}
div.sidebar::after,
div.topic::after,
div.admonition::after,
blockquote::after {
display: block;
content: '';
clear: both;
}
/* -- tables ---------------------------------------------------------------- */
table.docutils {
margin-top: 10px;
margin-bottom: 10px;
border: 0;
border-collapse: collapse;
}
table.align-center {
margin-left: auto;
margin-right: auto;
}
table.align-default {
margin-left: auto;
margin-right: auto;
}
table caption span.caption-number {
font-style: italic;
}
table caption span.caption-text {
}
table.docutils td, table.docutils th {
padding: 1px 8px 1px 5px;
border-top: 0;
border-left: 0;
border-right: 0;
border-bottom: 1px solid #aaa;
}
table.footnote td, table.footnote th {
border: 0 !important;
}
th {
text-align: left;
padding-right: 5px;
}
table.citation {
border-left: solid 1px gray;
margin-left: 1px;
}
table.citation td {
border-bottom: none;
}
th > :first-child,
td > :first-child {
margin-top: 0px;
}
th > :last-child,
td > :last-child {
margin-bottom: 0px;
}
/* -- figures --------------------------------------------------------------- */
div.figure {
margin: 0.5em;
padding: 0.5em;
}
div.figure p.caption {
padding: 0.3em;
}
div.figure p.caption span.caption-number {
font-style: italic;
}
div.figure p.caption span.caption-text {
}
/* -- field list styles ----------------------------------------------------- */
table.field-list td, table.field-list th {
border: 0 !important;
}
.field-list ul {
margin: 0;
padding-left: 1em;
}
.field-list p {
margin: 0;
}
.field-name {
-moz-hyphens: manual;
-ms-hyphens: manual;
-webkit-hyphens: manual;
hyphens: manual;
}
/* -- hlist styles ---------------------------------------------------------- */
table.hlist {
margin: 1em 0;
}
table.hlist td {
vertical-align: top;
}
/* -- other body styles ----------------------------------------------------- */
ol.arabic {
list-style: decimal;
}
ol.loweralpha {
list-style: lower-alpha;
}
ol.upperalpha {
list-style: upper-alpha;
}
ol.lowerroman {
list-style: lower-roman;
}
ol.upperroman {
list-style: upper-roman;
}
:not(li) > ol > li:first-child > :first-child,
:not(li) > ul > li:first-child > :first-child {
margin-top: 0px;
}
:not(li) > ol > li:last-child > :last-child,
:not(li) > ul > li:last-child > :last-child {
margin-bottom: 0px;
}
ol.simple ol p,
ol.simple ul p,
ul.simple ol p,
ul.simple ul p {
margin-top: 0;
}
ol.simple > li:not(:first-child) > p,
ul.simple > li:not(:first-child) > p {
margin-top: 0;
}
ol.simple p,
ul.simple p {
margin-bottom: 0;
}
dl.footnote > dt,
dl.citation > dt {
float: left;
margin-right: 0.5em;
}
dl.footnote > dd,
dl.citation > dd {
margin-bottom: 0em;
}
dl.footnote > dd:after,
dl.citation > dd:after {
content: "";
clear: both;
}
dl.field-list {
display: grid;
grid-template-columns: fit-content(30%) auto;
}
dl.field-list > dt {
font-weight: bold;
word-break: break-word;
padding-left: 0.5em;
padding-right: 5px;
}
dl.field-list > dt:after {
content: ":";
}
dl.field-list > dd {
padding-left: 0.5em;
margin-top: 0em;
margin-left: 0em;
margin-bottom: 0em;
}
dl {
margin-bottom: 15px;
}
dd > :first-child {
margin-top: 0px;
}
dd ul, dd table {
margin-bottom: 10px;
}
dd {
margin-top: 3px;
margin-bottom: 10px;
margin-left: 30px;
}
dl > dd:last-child,
dl > dd:last-child > :last-child {
margin-bottom: 0;
}
dt:target, span.highlighted {
background-color: #fbe54e;
}
rect.highlighted {
fill: #fbe54e;
}
dl.glossary dt {
font-weight: bold;
font-size: 1.1em;
}
.optional {
font-size: 1.3em;
}
.sig-paren {
font-size: larger;
}
.versionmodified {
font-style: italic;
}
.system-message {
background-color: #fda;
padding: 5px;
border: 3px solid red;
}
.footnote:target {
background-color: #ffa;
}
.line-block {
display: block;
margin-top: 1em;
margin-bottom: 1em;
}
.line-block .line-block {
margin-top: 0;
margin-bottom: 0;
margin-left: 1.5em;
}
.guilabel, .menuselection {
font-family: sans-serif;
}
.accelerator {
text-decoration: underline;
}
.classifier {
font-style: oblique;
}
.classifier:before {
font-style: normal;
margin: 0.5em;
content: ":";
}
abbr, acronym {
border-bottom: dotted 1px;
cursor: help;
}
/* -- code displays --------------------------------------------------------- */
pre {
overflow: auto;
overflow-y: hidden; /* fixes display issues on Chrome browsers */
}
pre, div[class*="highlight-"] {
clear: both;
}
span.pre {
-moz-hyphens: none;
-ms-hyphens: none;
-webkit-hyphens: none;
hyphens: none;
}
div[class*="highlight-"] {
margin: 1em 0;
}
td.linenos pre {
border: 0;
background-color: transparent;
color: #aaa;
}
table.highlighttable {
display: block;
}
table.highlighttable tbody {
display: block;
}
table.highlighttable tr {
display: flex;
}
table.highlighttable td {
margin: 0;
padding: 0;
}
table.highlighttable td.linenos {
padding-right: 0.5em;
}
table.highlighttable td.code {
flex: 1;
overflow: hidden;
}
.highlight .hll {
display: block;
}
div.highlight pre,
table.highlighttable pre {
margin: 0;
}
div.code-block-caption + div {
margin-top: 0;
}
div.code-block-caption {
margin-top: 1em;
padding: 2px 5px;
font-size: small;
}
div.code-block-caption code {
background-color: transparent;
}
table.highlighttable td.linenos,
span.linenos,
div.doctest > div.highlight span.gp { /* gp: Generic.Prompt */
user-select: none;
}
div.code-block-caption span.caption-number {
padding: 0.1em 0.3em;
font-style: italic;
}
div.code-block-caption span.caption-text {
}
div.literal-block-wrapper {
margin: 1em 0;
}
code.descname {
background-color: transparent;
font-weight: bold;
font-size: 1.2em;
}
code.descclassname {
background-color: transparent;
}
code.xref, a code {
background-color: transparent;
font-weight: bold;
}
h1 code, h2 code, h3 code, h4 code, h5 code, h6 code {
background-color: transparent;
}
.viewcode-link {
float: right;
}
.viewcode-back {
float: right;
font-family: sans-serif;
}
div.viewcode-block:target {
margin: -1px -10px;
padding: 0 10px;
}
/* -- math display ---------------------------------------------------------- */
img.math {
vertical-align: middle;
}
div.body div.math p {
text-align: center;
}
span.eqno {
float: right;
}
span.eqno a.headerlink {
position: absolute;
z-index: 1;
}
div.math:hover a.headerlink {
visibility: visible;
}
/* -- printout stylesheet --------------------------------------------------- */
@media print {
div.document,
div.documentwrapper,
div.bodywrapper {
margin: 0 !important;
width: 100%;
}
div.sphinxsidebar,
div.related,
div.footer,
#top-link {
display: none;
}
}

@ -0,0 +1 @@
.fa:before{-webkit-font-smoothing:antialiased}.clearfix{*zoom:1}.clearfix:after,.clearfix:before{display:table;content:""}.clearfix:after{clear:both}@font-face{font-family:FontAwesome;font-style:normal;font-weight:400;src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713?#iefix) format("embedded-opentype"),url(fonts/fontawesome-webfont.woff2?af7ae505a9eed503f8b8e6982036873e) format("woff2"),url(fonts/fontawesome-webfont.woff?fee66e712a8a08eef5805a46892932ad) format("woff"),url(fonts/fontawesome-webfont.ttf?b06871f281fee6b241d60582ae9369b9) format("truetype"),url(fonts/fontawesome-webfont.svg?912ec66d7572ff821749319396470bde#FontAwesome) format("svg")}.fa:before{font-family:FontAwesome;font-style:normal;font-weight:400;line-height:1}.fa:before,a .fa{text-decoration:inherit}.fa:before,a .fa,li .fa{display:inline-block}li .fa-large:before{width:1.875em}ul.fas{list-style-type:none;margin-left:2em;text-indent:-.8em}ul.fas li .fa{width:.8em}ul.fas li .fa-large:before{vertical-align:baseline}.fa-book:before,.icon-book:before{content:"\f02d"}.fa-caret-down:before,.icon-caret-down:before{content:"\f0d7"}.fa-caret-up:before,.icon-caret-up:before{content:"\f0d8"}.fa-caret-left:before,.icon-caret-left:before{content:"\f0d9"}.fa-caret-right:before,.icon-caret-right:before{content:"\f0da"}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;z-index:400}.rst-versions a{color:#2980b9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27ae60}.rst-versions .rst-current-version:after{clear:both;content:"";display:block}.rst-versions .rst-current-version .fa{color:#fcfcfc}.rst-versions .rst-current-version .fa-book,.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#e74c3c;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#f1c40f;color:#000}.rst-versions.shift-up{height:auto;max-height:100%;overflow-y:scroll}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:grey;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:1px solid #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px;max-height:90%}.rst-versions.rst-badge .fa-book,.rst-versions.rst-badge .icon-book{float:none;line-height:30px}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book,.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge>.rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width:768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}}

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 434 KiB

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save