Wiki rus in progress

dev-linux
Ivan Maslov 2 years ago
parent 3f6183f268
commit 52fb23bc1d

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

@ -1,22 +1,34 @@
.. _3.-Copyrights-&-Contacts: .. _3.-Copyrights-&-Contacts:
#################################### ####################################
2. Права & Контакты 2. Лицензия & Контакты
#################################### ####################################
pyOpenRPA is created by Ivan Maslov (Russia). **************************************************
Hosted by PYOPENRPA LLC (Russia) Лицензия
**************************************************
Лицензия pyOpenRPA разрешает бесплатное использование только для некоммерческих организаций и физических лиц (не ИП и не самозанятый). В остальных случаях требуется получение цифрового сертификата от правообладателя (ООО "ОПЕН РПА").
Получить, проверить сертификат, а также ознакомиться с текстом лицензионного соглашения Вы можете по адресу:
https://pyopenrpa.ru/verification
pyOpenRPA не использует какие-либо инструменты физической блокировки функциональности своего ПО.
По всем вопросам Вы можете обратиться к правообладателю, контакты см. по адресу:
https://pyopenrpa.ru/Index/pyOpenRPA_product_service.pdf
Используя ПО pyOpenRPA Вы осознаете свою ответственность в случаях нарушения лицензионного законодательства и совершения неправомерных действий.
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). pyOpenRPA - роботы Вам помогут!
If you will find some issue in pyOpenRPA - write about it to me via e-mail/skype/gitlab issue.
Thank you! **************************************************
Правообладатель
**************************************************
ООО "ОПЕН РПА", ОГРН 1227700251350, ИНН/КПП 9718191421/771801001
г. Москва: 125310, улица Муравская
г. Санкт-Петербург: 197022, улица Льва Толстого
************************************************** **************************************************
Центр поддержки клиентов Центр поддержки клиентов
@ -26,9 +38,9 @@ Thank you!
- Телефон/WhatsApp: +7 (995) 233-45-31 - Телефон/WhatsApp: +7 (995) 233-45-31
- Почта: Support@pyOpenRPA.ru - Почта: Support@pyOpenRPA.ru
- Телеграм: @pyOpenRPA_support - Телеграм: @pyOpenRPA_support :: `Написать <https://t.me/pyOpenRPA_support>`_
- Портал: https://pyopenrpa.ru/ - Портал: https://pyopenrpa.ru/
- Телеграм канал: @pyOpenRPA_support - Телеграм канал: @pyOpenRPA :: `Присоединиться <https://t.me/pyOpenRPA>`_
************************************************** **************************************************
Иван Маслов (Основатель & генеральный директор) Иван Маслов (Основатель & генеральный директор)
@ -36,26 +48,27 @@ Thank you!
- Телефон/WhatsApp: +7 (906) 722-39-25 - Телефон/WhatsApp: +7 (906) 722-39-25
- Почта: Ivan.Maslov@pyOpenRPA.ru - Почта: Ivan.Maslov@pyOpenRPA.ru
- Телеграм: @IvanMaslov - Телеграм: @IvanMaslov :: `Написать <https://t.me/IvanMaslov>`_
- Портал: https://pyopenrpa.ru/ - Портал: https://pyopenrpa.ru/
- Телеграм канал: @pyOpenRPA_support - Телеграм канал: @pyOpenRPA :: `Присоединиться <https://t.me/pyOpenRPA>`_
************************************************** **********************************************************
Используемые сторонние компоненты (лицензионная чистота) Используемые сторонние компоненты (лицензионная чистота)
************************************************** **********************************************************
- WinPython, v3.7.1 32-bit & 64-bit, лицензия MIT (https://github.com/winpython/winpython) - WinPython, v3.7.1 32-bit & 64-bit, лицензия MIT
- Selenium, v..., лицензия Apache 2.0 (https://github.com/SeleniumHQ/selenium/blob/trunk/LICENSE) https://github.com/winpython/winpython
- Selenium, v3.141.0, лицензия Apache 2.0 https://github.com/SeleniumHQ/selenium/blob/trunk/LICENSE)
- pywinauto, v0.6.5, лицензия BSD 3-Clause (https://github.com/pywinauto/pywinauto) - pywinauto, v0.6.5, лицензия BSD 3-Clause (https://github.com/pywinauto/pywinauto)
- Semantic UI, v..., лицензия MIT (https://github.com/Semantic-Org/Semantic-UI) - Semantic UI, v2.4.1, лицензия MIT (https://github.com/Semantic-Org/Semantic-UI)
- PyAutoGUI, v..., лицензия BSD 3-Clause (https://github.com/asweigart/pyautogui) - PyAutoGUI, v0.9.44, лицензия BSD 3-Clause (https://github.com/asweigart/pyautogui)
- keyboard, v..., лицензия MIT (https://github.com/boppreh/keyboard) - keyboard, v0.13.3, лицензия MIT (https://github.com/boppreh/keyboard)
- pywin32 (win32api), v..., Python Software Foundation лицензия (PSF) (https://github.com/mhammond/pywin32) - pywin32 (win32api), v228, Python Software Foundation лицензия (PSF) (https://github.com/mhammond/pywin32)
- WMI, v..., лицензия MIT, (http://www.opensource.org/licenses/mit-license.php) - WMI, v1.4.9, лицензия MIT, (http://www.opensource.org/licenses/mit-license.php)
- psutil, v..., лицензия BSD 3-Clause (https://github.com/giampaolo/psutil/blob/master/LICENSE) - psutil, v5.6.2, лицензия BSD 3-Clause (https://github.com/giampaolo/psutil/blob/master/LICENSE)
- Pillow PIL, v..., лицензия HPND (https://github.com/python-pillow/Pillow/blob/main/LICENSE) - Pillow PIL, v6.0.0, лицензия HPND (https://github.com/python-pillow/Pillow/blob/main/LICENSE)
- requests, v..., лицензия Apache 2.0 (https://github.com/psf/requests/blob/main/LICENSE) - requests, v2.22.0, лицензия Apache 2.0 (https://github.com/psf/requests/blob/main/LICENSE)
- JsRender, v..., лицензия MIT (https://github.com/BorisMoore/jsrender/blob/master/MIT-LICENSE.txt) - JsRender, v1.0.2, лицензия MIT (https://github.com/BorisMoore/jsrender/blob/master/MIT-LICENSE.txt)
- Handlebars, v..., лицензия MIT, (https://github.com/handlebars-lang/handlebars.js/blob/master/LICENSE) - Handlebars, v4.1.2, лицензия MIT, (https://github.com/handlebars-lang/handlebars.js/blob/master/LICENSE)
- jinja2, v..., лицензия BSD 3-Clause, (https://github.com/pallets/jinja/blob/main/LICENSE.rst) - jinja2, v2.11.2, лицензия BSD 3-Clause, (https://github.com/pallets/jinja/blob/main/LICENSE.rst)

@ -5,6 +5,7 @@
pyOpenRPA Orchestrator is the executable process. pyOpenRPA Orchestrator is the executable process.
The features of the orchestrator is: 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. - 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) - Automatized robots control (customized algorithms, robots scheduling)
- Source code mega flexibility: Light Orchestrator architecture is good for own customization - Source code mega flexibility: Light Orchestrator architecture is good for own customization
@ -37,6 +38,7 @@ gSettings structure
Orchestrator architecture Orchestrator architecture
************************************ ************************************
Orchestrator has several source code components: Orchestrator has several source code components:
- User/robot activity consolidated queue single thread (Processor) - User/robot activity consolidated queue single thread (Processor)
- User/robot activity asynchonus many threads (Processor) - User/robot activity asynchonus many threads (Processor)
- Scheduler single thread (main) - Scheduler single thread (main)
@ -70,21 +72,12 @@ ATTENTION: In some cases (such as web transmition), when you can't transmit pyth
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. 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:: .. 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:: Example
.. _`reStructuredText`: http://docutils.sourceforge.net/rst.html {
"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..

@ -22,6 +22,10 @@ How to use both x32 and x64 python processes (it can be helpfully, if another ap
UIDesktop.Utils.ProcessBitness.SettingsInit(lPyOpenRPA_SettingsDict) UIDesktop.Utils.ProcessBitness.SettingsInit(lPyOpenRPA_SettingsDict)
# Now you can use pyOpenRPA with both bitness. # Now you can use pyOpenRPA with both bitness.
.. automodule:: pyOpenRPA.Robot.Keyboard
:members:
:autosummary:
.. automodule:: pyOpenRPA.Robot.UIDesktop .. automodule:: pyOpenRPA.Robot.UIDesktop
:members: :members:

@ -4,35 +4,221 @@
4. Keyboard 4. Keyboard
#################################### ####################################
**************************************************
Примеры использования
**************************************************
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
How to use both x32 and x64 python processes (it can be helpfully, if another app GUI is on another bitness than your app) 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 .. code-block:: python
from pyOpenRPA.Robot import UIDesktop # Keyboard: Взаимодействие с клавиатурой
#Section for robot init from pyOpenRPA.Robot import Keyboard
lPyOpenRPA_SettingsDict = { from pyOpenRPA.Robot import Clipboard
"Python32FullPath": "..\\Resources\\WPy32-3720\\python-3.7.2\\python.exe", #Set from user: "..\\Resources\\WPy32-3720\\python-3.7.2\\OpenRPARobotGUIx32.exe" Keyboard.send("win+r")
"Python64FullPath": "..\\Resources\\WPy64-3720\\python-3.7.2.amd64\\python.exe", #Set from user time.sleep(0.3)
"Python32ProcessName": "pyOpenRPA_UIDesktopX32.exe", #Config set once Keyboard.write("cmd")
"Python64ProcessName": "pyOpenRPA_UIDesktopX64.exe" #Config set once time.sleep(0.3)
} Keyboard.send("enter")
# Init the pyOpenRPA configuration time.sleep(0.6)
UIDesktop.Utils.ProcessBitness.SettingsInit(lPyOpenRPA_SettingsDict) Keyboard.write("echo %time%")
# Now you can use pyOpenRPA with both bitness. time.sleep(0.3)
Keyboard.send("enter")
time.sleep(0.3)
Keyboard.send("ctrl+a")
time.sleep(0.6)
Clipboard.ClipboardSet("")
Keyboard.send("ctrl+c")
time.sleep(0.6)
lTextRaw = Clipboard.ClipboardGet()
lTimeStr = lTextRaw.split("\n")[-3]
**************************************************
Описание методов
**************************************************
.. automodule:: pyOpenRPA.Robot.UIDesktop .. automodule:: pyOpenRPA.Robot.Keyboard
:members: :members:
:autosummary: :autosummary:
********** **************************************************
References Коды клавиш
********** **************************************************
Ниже представлены коды горячих клавиш, а также символов русской и английской раскладки.
.. code-block:: python
# ШЕСТНАДЦАТИРИЧНЫЙ СКАН-КОД В РУССКОЙ РАСКЛАДКЕ (НЕЗАВИСИМО ОТ ВЫБРАННОГО ЯЗЫКА НА КЛАВИАТУРЕ)
# ОТОБРАЖЕНИЕ СКАН КОДОВ НА КЛАВИАТУРЕ https://snipp.ru/handbk/scan-codes
KEY_RUS_Ф = 0x1E #A
KEY_RUS_И = 0x30 #B
KEY_RUS_С = 0x2E #C
KEY_RUS_В = 0x20 #D
KEY_RUS_У = 0x12 #E
KEY_RUS_А = 0x21 #F
KEY_RUS_П = 0x22 #G
KEY_RUS_Р = 0x23 #H
KEY_RUS_Ш = 0x17 #I
KEY_RUS_О = 0x24 #J
KEY_RUS_Л = 0x25 #K
KEY_RUS_Д = 0x26 #L
KEY_RUS_Ь = 0x32 #M
KEY_RUS_Т = 0x31 #N
KEY_RUS_Щ = 0x18 #O
KEY_RUS_З = 0x19 #P
KEY_RUS_Й = 0x10 #Q
KEY_RUS_К = 0x13 #R
KEY_RUS_Ы = 0x1F #S
KEY_RUS_Е = 0x14 #T
KEY_RUS_Г = 0x16 #U
KEY_RUS_М = 0x2F #V
KEY_RUS_Ц = 0x11 #W
KEY_RUS_Ч = 0x2D #X
KEY_RUS_Н = 0x15 #Y
KEY_RUS_Я = 0x2C #Z
KEY_RUS_Ё = 0x29 #~
KEY_RUS_Ж = 0x27 #:
KEY_RUS_Б = 0x33 #<
KEY_RUS_Ю = 0x34 #>
KEY_RUS_Х = 0x1A #[
KEY_RUS_Ъ = 0x1B #]
KEY_RUS_Э = 0x28 #'
KEY_ENG_A = 0x1E #A
KEY_ENG_B = 0x30 #B
KEY_ENG_C = 0x2E #C
KEY_ENG_D = 0x20 #D
KEY_ENG_E = 0x12 #E
KEY_ENG_F = 0x21 #F
KEY_ENG_G = 0x22 #G
KEY_ENG_H = 0x23 #H
KEY_ENG_I = 0x17 #I
KEY_ENG_J = 0x24 #J
KEY_ENG_K = 0x25 #K
KEY_ENG_L = 0x26 #L
KEY_ENG_M = 0x32 #M
KEY_ENG_N = 0x31 #N
KEY_ENG_O = 0x18 #O
KEY_ENG_P = 0x19 #P
KEY_ENG_Q = 0x10 #Q
KEY_ENG_R = 0x13 #R
KEY_ENG_S = 0x1F #S
KEY_ENG_T = 0x14 #T
KEY_ENG_U = 0x16 #U
KEY_ENG_V = 0x2F #V
KEY_ENG_W = 0x11 #W
KEY_ENG_X = 0x2D #X
KEY_ENG_Y = 0x15 #Y
KEY_ENG_Z = 0x2C #Z
`reStructuredText`_
.. target-notes:: KEY_HOT_NUMPAD_0 = 0x52
.. _`reStructuredText`: http://docutils.sourceforge.net/rst.html KEY_HOT_NUMPAD_1 = 0x4F
KEY_HOT_NUMPAD_2 = 0x50
KEY_HOT_NUMPAD_3 = 0x51
KEY_HOT_NUMPAD_4 = 0x4B
KEY_HOT_NUMPAD_5 = 0x4C
KEY_HOT_NUMPAD_6 = 0x4D
KEY_HOT_NUMPAD_7 = 0x47
KEY_HOT_NUMPAD_8 = 0x48
KEY_HOT_NUMPAD_9 = 0x49
KEY_HOT_NUMPAD_ASTERISK = 0x37 #*
KEY_HOT_NUMPAD_PLUS = 0x4E
KEY_HOT_NUMPAD_MINUS = 0x4A
KEY_HOT_NUMPAD_DELETE = 0x53
KEY_HOT_NUMPAD_SOLIDUS = 0x35 #/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OT_CAPS_LOCK = 0x3A
KEY_HOT_NUM_LOCK = 0x45
KEY_HOT_SCROLL_LOCK = 0x46
KEY_HOT_END = 0x4F
KEY_HOT_HOME = 0x47
KEY_HOT_SPACE = 0x39
KEY_HOT_PAGE_UP = 0x49
KEY_HOT_PAGE_DOWN = 0x51
KEY_HOT_CLEAR = 0x4C
KEY_HOT_LEFT = 0x4B
KEY_HOT_UP = 0x48
KEY_HOT_RIGHT = 0x4D
KEY_HOT_DOWN = 0x50
KEY_HOT_PRINT_SCREEN = 0x137
KEY_HOT_INSERT = 0x52
KEY_HOT_DELETE = 0x53
KEY_HOT_0 = 0xB
KEY_HOT_1 = 0x2
KEY_HOT_2 = 0x3
KEY_HOT_3 = 0x4
KEY_HOT_4 = 0x5
KEY_HOT_5 = 0x6
KEY_HOT_6 = 0x7
KEY_HOT_7 = 0x8
KEY_HOT_8 = 0x9
KEY_HOT_9 = 0xA
**************************************************
Дополнительная функциональность
**************************************************
Дополнительно модуль содержит функции вспомогательной библиотеки. Ознакомиться с описанием можно `Здесь <https://github.com/boppreh/keyboard#api>`_
.. code-block:: python
# Пример использования функции send
from pyOpenRPA.Robot import Keyboard
Keyboard.send(57)

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

@ -13,8 +13,9 @@
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 pyOpenRPA
import datetime import datetime
# -- Project information ----------------------------------------------------- # -- Project information -----------------------------------------------------
@ -30,7 +31,6 @@ author = f'{pyOpenRPA.__author__}'
rst_epilog = """ rst_epilog = """
.. |release| replace:: {release} .. |release| replace:: {release}
.. |author| replace:: {author}
""".format( """.format(
release = release,author = author, release = release,author = author,
) )

@ -44,12 +44,13 @@ pyOpenRPA - роботы вам помогут!
Портал состоит из следующих разделов: Портал состоит из следующих разделов:
############################################ ############################################
- ОБЩЕЕ
- МОДУЛЬ РОБОТ - Общее
- МОДУЛЬ СТУДИЯ - Модуль робот
- МОДУЛЬ ОРКЕСТРАТОР - Модуль студия
- МОДУЛЬ АГЕНТ - Модуль оркестратор
- ИНСТРУМЕНТЫ - Модуль агент
- Инструменты
ОБЩЕЕ ОБЩЕЕ
@ -108,6 +109,11 @@ 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
************************************************** **************************************************
Технические требования Технические требования
************************************************** **************************************************

@ -39,6 +39,7 @@ class ControlPanel():
Jinja2DataUpdateDictSet Jinja2DataUpdateDictSet
.. code-block:: html .. code-block:: html
Hello my control panel! Hello my control panel!
You can use any def from Orchestrator module here in Jinja2 HTML template: You can use any def from Orchestrator module here in Jinja2 HTML template:
Example: OrchestratorModule.OSCMD(inCMDStr="notepad") Example: OrchestratorModule.OSCMD(inCMDStr="notepad")

@ -22,6 +22,7 @@ class Process():
- 5_STARTED_MANUAL - 5_STARTED_MANUAL
.. code-block:: python .. code-block:: python
# For the safe init class use ProcessInitSafe # For the safe init class use ProcessInitSafe
lProcess = Orchestrator.Managers.ProcessInitSafe(inAgentHostNameStr="PCNAME",inAgentUserNameStr="USER", lProcess = Orchestrator.Managers.ProcessInitSafe(inAgentHostNameStr="PCNAME",inAgentUserNameStr="USER",
inProcessNameWOExeStr="notepad",inStartCMDStr="notepad",inStopSafeTimeoutSecFloat=3) inProcessNameWOExeStr="notepad",inStartCMDStr="notepad",inStopSafeTimeoutSecFloat=3)
@ -35,6 +36,7 @@ class Process():
How to use StopSafe on the robot side How to use StopSafe on the robot side
.. code-block:: python .. code-block:: python
from pyOpenRPA.Tools import StopSafe from pyOpenRPA.Tools import StopSafe
StopSafe.Init(inLogger=None) StopSafe.Init(inLogger=None)
StopSafe.IsSafeStop() # True - WM_CLOSE SIGNAL has come. taskkill /im someprocess.exe StopSafe.IsSafeStop() # True - WM_CLOSE SIGNAL has come. taskkill /im someprocess.exe

@ -546,10 +546,10 @@ def OrchestratorLoggerGet() -> logging.Logger:
def OrchestratorScheduleGet() -> schedule: def OrchestratorScheduleGet() -> schedule:
""" """
Get the schedule (schedule.readthedocs.io) from the Orchestrator Get the schedule (schedule.readthedocs.io) from the Orchestrator
For example you can use:
Fro example you can use:
.. code-block:: python .. code-block:: python
# One schedule threaded # One schedule threaded
Orchestrator.OrchestratorScheduleGet().every(5).seconds.do(lProcess.StatusCheckStart) Orchestrator.OrchestratorScheduleGet().every(5).seconds.do(lProcess.StatusCheckStart)
@ -620,6 +620,7 @@ def OrchestratorPySearchInit(inGlobPatternStr, inDefStr = None, inDefArgNameGSet
""" """
Search the py files by the glob and do the safe init (in try except). Also add inited module in sys.modules as imported (module name = file name without extension). Search the py files by the glob and do the safe init (in try except). Also add inited module in sys.modules as imported (module name = file name without extension).
You can init CP in async way! You can init CP in async way!
.. code-block:: python .. code-block:: python
# USAGE VAR 1 (without the def auto call) # USAGE VAR 1 (without the def auto call)
@ -639,7 +640,6 @@ def OrchestratorPySearchInit(inGlobPatternStr, inDefStr = None, inDefArgNameGSet
except Exception as e: except Exception as e:
gSettings["Logger"].exception(f"Exception when init CP. See below.") gSettings["Logger"].exception(f"Exception when init CP. See below.")
:param inGlobPatternStr: example"..\\*\\*\\*X64*.cmd" :param inGlobPatternStr: example"..\\*\\*\\*X64*.cmd"
:param inDefStr: OPTIONAL The string name of the def. For backward compatibility if you need to auto call some def from initialized module :param inDefStr: OPTIONAL The string name of the def. For backward compatibility if you need to auto call some def from initialized module
:param inDefArgNameGSettingsStr: OPTIONAL The name of the GSettings argument in def (if exists) :param inDefArgNameGSettingsStr: OPTIONAL The name of the GSettings argument in def (if exists)
@ -733,7 +733,6 @@ def OrchestratorSessionRestore(inGSettings=None):
Check _SessioLast... files in working directory. if exist - load into gsettings Check _SessioLast... files in working directory. if exist - load into gsettings
(from version 1.2.7) (from version 1.2.7)
_SessionLast_GSettings.pickle (binary) _SessionLast_GSettings.pickle (binary)
(above the version 1.2.7) (above the version 1.2.7)
_SessionLast_RDPList.json (encoding = "utf-8") _SessionLast_RDPList.json (encoding = "utf-8")
_SessionLast_StorageDict.pickle (binary) _SessionLast_StorageDict.pickle (binary)

@ -1 +1,204 @@
from keyboard import * from keyboard import *
import time
# ШЕСТНАДЦАТИРИЧНЫЙ СКАН-КОД В РУССКОЙ РАСКЛАДКЕ (НЕЗАВИСИМО ОТ ВЫБРАННОГО ЯЗЫКА НА КЛАВИАТУРЕ)
# ОТОБРАЖЕНИЕ СКАН КОДОВ НА КЛАВИАТУРЕ https://snipp.ru/handbk/scan-codes
KEY_RUS_Ф = 0x1E #A
KEY_RUS_И = 0x30 #B
KEY_RUS_С = 0x2E #C
KEY_RUS_В = 0x20 #D
KEY_RUS_У = 0x12 #E
KEY_RUS_А = 0x21 #F
KEY_RUS_П = 0x22 #G
KEY_RUS_Р = 0x23 #H
KEY_RUS_Ш = 0x17 #I
KEY_RUS_О = 0x24 #J
KEY_RUS_Л = 0x25 #K
KEY_RUS_Д = 0x26 #L
KEY_RUS_Ь = 0x32 #M
KEY_RUS_Т = 0x31 #N
KEY_RUS_Щ = 0x18 #O
KEY_RUS_З = 0x19 #P
KEY_RUS_Й = 0x10 #Q
KEY_RUS_К = 0x13 #R
KEY_RUS_Ы = 0x1F #S
KEY_RUS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ALT_LEFT = 0x38
KEY_HOT_ALT_RIGHT = 0x138
KEY_HOT_WIN_LEFT = 0x5B
KEY_HOT_WIN_RIGHT = 0x5C
KEY_HOT_CAPS_LOCK = 0x3A
KEY_HOT_NUM_LOCK = 0x45
KEY_HOT_SCROLL_LOCK = 0x46
KEY_HOT_END = 0x4F
KEY_HOT_HOME = 0x47
KEY_HOT_SPACE = 0x39
KEY_HOT_PAGE_UP = 0x49
KEY_HOT_PAGE_DOWN = 0x51
KEY_HOT_CLEAR = 0x4C
KEY_HOT_LEFT = 0x4B
KEY_HOT_UP = 0x48
KEY_HOT_RIGHT = 0x4D
KEY_HOT_DOWN = 0x50
KEY_HOT_PRINT_SCREEN = 0x137
KEY_HOT_INSERT = 0x52
KEY_HOT_DELETE = 0x53
KEY_HOT_0 = 0xB
KEY_HOT_1 = 0x2
KEY_HOT_2 = 0x3
KEY_HOT_3 = 0x4
KEY_HOT_4 = 0x5
KEY_HOT_5 = 0x6
KEY_HOT_6 = 0x7
KEY_HOT_7 = 0x8
KEY_HOT_8 = 0x9
KEY_HOT_9 = 0xA
def Write(inTextStr:str, inDelayFloat:float=0, inRestoreStateAfterBool:bool=True, inExactBool:bool=None):
"""
Печать текста. Не зависит от текущей раскладки клавиатуры! Посылает искусственные клавишные события в ОС, моделируя печать данного текста. Знаки, не доступные на клавиатуре, напечатаны как явный unicode знаки, использующие определенную для ОС функциональность, такие как alt+codepoint.
Чтобы гарантировать текстовую целостность, все в настоящее время нажатые ключи выпущены прежде текст напечатан, и модификаторы восстановлены впоследствии.
:param inTextStr: Текст, отправляемый на печать. Не зависит от текущей раскладки клавиатуры!
:type inTextStr: str
:param inDelayFloat: Число секунд, которое ожидать между нажатиями. defaults to 0
:type inDelayFloat: float, опционально
:param inRestoreStateAfterBool: Может использоваться, чтобы восстановить регистр нажатых ключей после того, как текст напечатан, т.е. нажимает ключи, которые были выпущены в начало.
:type inRestoreStateAfterBool: bool, опционально
:param inExactBool: Печатает все знаки как явный unicode. Необязательный параметр
:type inExactBool: bool, опционально
"""
write(text=inTextStr, delay=inDelayFloat, restore_state_after=inRestoreStateAfterBool, exact=inExactBool)
def HotkeyCombination(*inKeyList, inDelaySecFloat = 0.3):
"""Получает перечень кнопок для одновременного нажатия. Между нажатиями программа ожидания время inDelaySecFloat
.. code-block:: python
# Keyboard: Взаимодействие с клавиатурой
from pyOpenRPA.Robot import Keyboard
Keyboard.HotkeyCombination("ctrl",Keyboard.KEY_ENG_A) # Ctrl + a
Keyboard.HotkeyCombination("ctrl",Keyboard.KEY_ENG_C) # Ctrl + c
:param inKeyList: Список клавиш для одновременного нажатия
:param inDelaySecFloat: Интервал между нажатиями. Необходим в связи с тем, что операционной системе требуется время на реакцию на нажатие клавиш, по умолчанию: 0.3
:type inDelaySecFloat: float, опционально
"""
for l_key_item in inKeyList:
press(l_key_item)
time.sleep(inDelaySecFloat)
for l_key_item in inKeyList:
release(l_key_item)
def HotkeyCtrlA_CtrlC() -> None:
"""Выполнить выделение текста, после чего скопировать его в буфер обмена
"""
HotkeyCombination("ctrl",KEY_ENG_A) # Ctrl + a
HotkeyCombination("ctrl",KEY_ENG_C) # Ctrl + c

@ -8,6 +8,8 @@ AGT - AGENT
[1.2.13] [1.2.13]
- ORCHESTRATOR - ORCHESTRATOR
- - def WebRequestResponseSend(inResponeStr, inRequest=None, inContentTypeStr: str = None, inHeadersDict: dict = None): - - def WebRequestResponseSend(inResponeStr, inRequest=None, inContentTypeStr: str = None, inHeadersDict: dict = None):
- ROBOT
- - Keyboard, add hotkey codes (up, down, ctr, alt, etc)
[1.2.12] [1.2.12]
2022_Q2 2022_Q2

Loading…
Cancel
Save