parent
c02f454592
commit
7e9e461623
@ -1,22 +0,0 @@
|
|||||||
import win32clipboard
|
|
||||||
####################################
|
|
||||||
#Info: Clipboard module of the Robot app (OpenRPA - Robot)
|
|
||||||
####################################
|
|
||||||
# GUI Module - interaction with Windows clipboard
|
|
||||||
|
|
||||||
################
|
|
||||||
###ClipboardGet
|
|
||||||
################
|
|
||||||
def ClipboardGet():
|
|
||||||
win32clipboard.OpenClipboard()
|
|
||||||
lResult = win32clipboard.GetClipboardData(win32clipboard.CF_UNICODETEXT)
|
|
||||||
win32clipboard.CloseClipboard()
|
|
||||||
return lResult
|
|
||||||
################
|
|
||||||
###ClipboardSet
|
|
||||||
################
|
|
||||||
def ClipboardSet(inText):
|
|
||||||
win32clipboard.OpenClipboard()
|
|
||||||
win32clipboard.EmptyClipboard()
|
|
||||||
win32clipboard.SetClipboardData(win32clipboard.CF_UNICODETEXT,inText)
|
|
||||||
win32clipboard.CloseClipboard()
|
|
File diff suppressed because it is too large
Load Diff
@ -1,46 +0,0 @@
|
|||||||
import requests
|
|
||||||
import grequests
|
|
||||||
#from requests import async
|
|
||||||
import json
|
|
||||||
###################################
|
|
||||||
##Orchestrator integration module (safe use when orchestrator is turned off)
|
|
||||||
###################################
|
|
||||||
|
|
||||||
################################################################################
|
|
||||||
#Send data to orchestrator (asynchronyous)
|
|
||||||
#Example: t=IntegrationOrchestrator.DataSend(["Storage","Robot_R01"],{"RunDateTimeString":"Test1","StepCurrentName":"Test2","StepCurrentDuration":"Test333","SafeStopSignal":True},"localhost",8081)
|
|
||||||
def DataSend(inKeyList,inValue,inOrchestratorHost="localhost",inOrchestratorPort=80):
|
|
||||||
lURL = f'http://{inOrchestratorHost}:{inOrchestratorPort}/ProcessingRun'
|
|
||||||
lDataJSON = {"actionList":[{"type":"AdministrationGlobalDictSetKeyListValue","key_list":inKeyList,"value":inValue}]}
|
|
||||||
#lAsyncList = []
|
|
||||||
lResultItem = [grequests.post(lURL, json=lDataJSON)]
|
|
||||||
return grequests.map(lResultItem)
|
|
||||||
#lAsyncList.append(lResultItem)
|
|
||||||
#return async.map(lAsyncList)
|
|
||||||
################################################################################
|
|
||||||
#recieve Data from orchestrator
|
|
||||||
#t=IntegrationOrchestrator.DataRecieve(["Storage","Robot_R01"],"localhost",8081)
|
|
||||||
def DataRecieve(inKeyList,inOrchestratorHost="localhost",inOrchestratorPort=80):
|
|
||||||
lURL = f'http://{inOrchestratorHost}:{inOrchestratorPort}/ProcessingRun'
|
|
||||||
lDataJSON = {"actionList":[{"type":"AdministrationGlobalDictGetKeyListValue","key_list":inKeyList}]}
|
|
||||||
try:
|
|
||||||
lResult = requests.post(lURL, json=lDataJSON)
|
|
||||||
lResultJSON = json.loads(lResult.text)
|
|
||||||
return lResultJSON["actionListResult"][0]["value"]
|
|
||||||
except Exception:
|
|
||||||
return None
|
|
||||||
################################################################################
|
|
||||||
#Check if orchestrator has safe stop signal
|
|
||||||
#Example: IntegrationOrchestrator.SafeStopSignalIs(["Storage","Robot_R01","SafeStopSignal"],"localhost",8081)
|
|
||||||
def SafeStopSignalIs(inKeyList,inOrchestratorHost="localhost",inOrchestratorPort=80):
|
|
||||||
lResult=False
|
|
||||||
lResponse=DataRecieve(inKeyList,inOrchestratorHost,inOrchestratorPort)
|
|
||||||
if lResponse is not None:
|
|
||||||
lResult = lResponse
|
|
||||||
return lResult
|
|
||||||
################################################################################
|
|
||||||
#Reset SafeStop signal in orchestrator
|
|
||||||
#Example: t=IntegrationOrchestrator.SafeStopSignalReset(["Storage","Robot_R01","SafeStopSignal"],"localhost",8081)
|
|
||||||
def SafeStopSignalReset(inKeyList,inOrchestratorHost="localhost",inOrchestratorPort=80):
|
|
||||||
lResponse=DataSend(inKeyList,False,inOrchestratorHost,inOrchestratorPort)
|
|
||||||
return lResponse
|
|
@ -1,21 +0,0 @@
|
|||||||
#valueVerify
|
|
||||||
#inTypeClass int, str, dict, list, NoneType
|
|
||||||
def valueVerify(inValue,inTypeClass,inNotValidValue):
|
|
||||||
lResult = inNotValidValue
|
|
||||||
if inValue is not None:
|
|
||||||
if type(inValue) == inTypeClass:
|
|
||||||
lResult = inValue
|
|
||||||
#Вернуть результат
|
|
||||||
return lResult
|
|
||||||
#valueVerifyDict
|
|
||||||
def valueVerifyDict(inDict,inKey,inTypeClass,inNotValidValue):
|
|
||||||
lResult = inNotValidValue
|
|
||||||
if inKey in inDict:
|
|
||||||
lResult = valueVerify(inDict[inKey],inTypeClass,inNotValidValue)
|
|
||||||
return lResult
|
|
||||||
#valueVerifyList
|
|
||||||
def valueVerifyList(inList,inIndex,inTypeClass,inNotValidValue):
|
|
||||||
lResult = inNotValidValue
|
|
||||||
if inIndex in inList:
|
|
||||||
lResult = valueVerify(inList[inIndex],inTypeClass,inNotValidValue)
|
|
||||||
return lResult
|
|
@ -1,13 +0,0 @@
|
|||||||
import ctypes
|
|
||||||
####################################
|
|
||||||
#Info: Window module of the Robot app (OpenRPA - Robot)
|
|
||||||
####################################
|
|
||||||
# WIndow Module - Show information dialog messages to user by the modal windows
|
|
||||||
|
|
||||||
################
|
|
||||||
###DialogYesNo
|
|
||||||
################
|
|
||||||
#return 1 - Yes; 2 - No
|
|
||||||
def DialogYesNo(inTitle,inBody):
|
|
||||||
lResult = ctypes.windll.user32.MessageBoxW(0, inBody, inTitle, 1)
|
|
||||||
return lResult
|
|
@ -1,15 +0,0 @@
|
|||||||
r"""
|
|
||||||
|
|
||||||
The OpenRPA package (from UnicodeLabs)
|
|
||||||
|
|
||||||
"""
|
|
||||||
__version__ = 'v1.0.15'
|
|
||||||
__all__ = [
|
|
||||||
'GUI','Clipboard','IntegrationOrchestrator','Window', 'ProcessCommunicator'
|
|
||||||
]
|
|
||||||
__author__ = 'Ivan Maslov <ivan.maslov@unicodelabs.ru>'
|
|
||||||
from . import GUI
|
|
||||||
from . import Clipboard
|
|
||||||
from . import IntegrationOrchestrator
|
|
||||||
from . import Window
|
|
||||||
from . import ProcessCommunicator
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in new issue