From 2232774a3cdd2e6410e843f021c33d92bec04f5c Mon Sep 17 00:00:00 2001 From: Ivan Maslov Date: Wed, 4 Dec 2019 22:55:37 +0300 Subject: [PATCH] #RobotRDPActive minor fix (control button in orchestrator) #Setfullscreen #RobotScreenActive minor fin start cmd /K --- .../Settings/ControlPanel_RobotRDPActive.py | 25 ++++++++++++++----- .../ControlPanel_RobotScreenActive.py | 2 +- .../INSTALLER | 0 .../pyOpenRPA-1.0.36.dist-info}/METADATA | 2 +- .../pyOpenRPA-1.0.36.dist-info}/RECORD | 16 ++++++------ .../WHEEL | 0 .../top_level.txt | 0 .../Tools/RobotRDPActive/Connector.py | 11 ++++---- .../pyOpenRPA/Tools/RobotRDPActive/Monitor.py | 17 ++++++++++++- .../Lib/site-packages/pyOpenRPA/__init__.py | 2 +- .../INSTALLER | 0 .../pyOpenRPA-1.0.36.dist-info}/METADATA | 2 +- .../pyOpenRPA-1.0.36.dist-info}/RECORD | 16 ++++++------ .../WHEEL | 0 .../top_level.txt | 0 .../Tools/RobotRDPActive/Connector.py | 11 ++++---- .../pyOpenRPA/Tools/RobotRDPActive/Monitor.py | 17 ++++++++++++- .../Lib/site-packages/pyOpenRPA/__init__.py | 2 +- .../Tools/RobotRDPActive/Connector.py | 11 ++++---- .../pyOpenRPA/Tools/RobotRDPActive/Monitor.py | 17 ++++++++++++- Sources/pyOpenRPA/__init__.py | 2 +- .../SettingsRobotRDPActiveExample.py | 15 +++++++++-- v1.0.35 => v1.0.36 | 0 База знаний.txt | 5 ++++ 24 files changed, 125 insertions(+), 48 deletions(-) rename Resources/WPy32-3720/python-3.7.2/Lib/site-packages/{pyOpenRPA-1.0.35.dist-info => pyOpenRPA-1.0.36.dist-info}/INSTALLER (100%) rename Resources/{WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.0.35.dist-info => WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.0.36.dist-info}/METADATA (99%) rename Resources/{WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.0.35.dist-info => WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.0.36.dist-info}/RECORD (97%) rename Resources/WPy32-3720/python-3.7.2/Lib/site-packages/{pyOpenRPA-1.0.35.dist-info => pyOpenRPA-1.0.36.dist-info}/WHEEL (100%) rename Resources/WPy32-3720/python-3.7.2/Lib/site-packages/{pyOpenRPA-1.0.35.dist-info => pyOpenRPA-1.0.36.dist-info}/top_level.txt (100%) rename Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/{pyOpenRPA-1.0.35.dist-info => pyOpenRPA-1.0.36.dist-info}/INSTALLER (100%) rename Resources/{WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.0.35.dist-info => WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.0.36.dist-info}/METADATA (99%) rename Resources/{WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.0.35.dist-info => WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.0.36.dist-info}/RECORD (97%) rename Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/{pyOpenRPA-1.0.35.dist-info => pyOpenRPA-1.0.36.dist-info}/WHEEL (100%) rename Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/{pyOpenRPA-1.0.35.dist-info => pyOpenRPA-1.0.36.dist-info}/top_level.txt (100%) rename v1.0.35 => v1.0.36 (100%) create mode 100644 База знаний.txt diff --git a/Orchestrator/Settings/ControlPanel_RobotRDPActive.py b/Orchestrator/Settings/ControlPanel_RobotRDPActive.py index 2da45ece..3e625a6f 100644 --- a/Orchestrator/Settings/ControlPanel_RobotRDPActive.py +++ b/Orchestrator/Settings/ControlPanel_RobotRDPActive.py @@ -3,19 +3,19 @@ import datetime import logging import os lProcessName = "OpenRPA_RobotRDPActive.exe" -lStartFilePath = os.path.join(os.getcwd(), "..\\Utils\\RobotScreenActive\\pyOpenRPA.Tools.RobotScreenActive_x64.cmd") +lStartFilePath = os.path.join(os.getcwd(), "..\\Utils\\RobotRDPActive\\pyOpenRPA.Tools.RobotRDPActive_x64.cmd") def RenderRobotRDPActive(inGlobalConfiguration): #Subheader Variants lSubheaderRunTrueText="State: Turned on" lSubheaderRunFalseText="State: Turned off" #Run button #Такое большое количество слэшей связано с тем, что этот текст отправляется сначала в браузер, рендерится там, а потом отправляется на процессор оркестратора - lRobotRDPActivePath = lStartFilePath + lRobotRDPActivePath = f"start cmd /K {lStartFilePath}" lOnClickRunButton=f"mGlobal.Controller.CMDRunText('{lRobotRDPActivePath}');" #Safe turn off lOnClickSafeTurnOff = "mGlobal.Processor.ServerValueSet(['Storage','RobotRDPActive','OrchestratorToRobotResetStorage','SafeTurnOff'],true);" #Force close button - lOnClickForceCloseButton=f"mGlobal.Controller.CMDRunText('taskkill /F /im {lProcessName}.exe');" + lOnClickForceCloseButton=f"mGlobal.Controller.CMDRunText('taskkill /F /im {lProcessName}');" #Result template lResultDict={ "HeaderLeftText":"Keep active RDP sessions", @@ -32,16 +32,26 @@ def RenderRobotRDPActive(inGlobalConfiguration): ], "FooterButtonX1List":[ {"Text":"Kill", "Color":"red", "Link":"", "OnClick": lOnClickForceCloseButton.replace("\\","\\\\")} - ] + ]#, + #"GlobalStorage": inGlobalConfiguration.get("Storage",{}) } #Read RDPList lRDPList = inGlobalConfiguration.get("Storage",{}).get("RobotRDPActive",{}).get("RobotToOrchestratorStorage",{}).get("RDPList",[]) + lFullScreenSessionIndex = inGlobalConfiguration.get("Storage",{}).get("RobotRDPActive",{}).get("RobotToOrchestratorStorage",{}).get("FullScreenSessionIndex",None) lRDPListIndex = 0 for lItem in lRDPList: + #Lable that session has fullscreen + lLabelSessionFullScreen = "" + #Link set full screen + lOnClickSetFullScreen = f"mGlobal.Processor.ServerValueSet(['Storage','RobotRDPActive','OrchestratorToRobotStorage','FullScreenSessionIndex'],{lRDPListIndex});" + lSetFullScreenA = f'Set fullscreen' + if lRDPListIndex == lFullScreenSessionIndex: + lLabelSessionFullScreen = 'Fullscreen' + #Session state lItemSessionState='Disconnected' if lItem.get("FlagSessionIsActive",False): lItemSessionState='Connected' - lResultDict["BodyKeyValueList"].append({"Key":f"[{str(lRDPListIndex)}]{lItem.get('Host','localhost')}:{lItem.get('Port','--')}","Value":f"{lItem.get('Login','--')}, {lItem.get('SessionHex','--')}, State {lItemSessionState}"}) + lResultDict["BodyKeyValueList"].append({"Key":f"[{str(lRDPListIndex)}]{lLabelSessionFullScreen}{lItem.get('Host','localhost')}:{lItem.get('Port','--')}","Value":f"{lItem.get('Login','--')}, {lItem.get('SessionHex','--')}, State {lItemSessionState}, {lSetFullScreenA}"}) lRDPListIndex = lRDPListIndex + 1 #Check if process running if CheckIfProcessRunning("OpenRPA_RobotRDPActive"): @@ -69,5 +79,8 @@ def SettingsUpdate(inDict): #Add RobotRDPActive in control panel inDict["ControlPanelDict"]["RobotList"].append({"RenderFunction": RenderRobotRDPActive}) #Default structure - inDict["Storage"]["RobotRDPActive"]={"OrchestratorToRobotResetStorage":{"SafeTurnOff":False}} + inDict["Storage"]["RobotRDPActive"]={ + "OrchestratorToRobotResetStorage":{"SafeTurnOff":False}, + "OrchestratorToRobotStorage":{"FullScreenSessionIndex":None} + } return inDict \ No newline at end of file diff --git a/Orchestrator/Settings/ControlPanel_RobotScreenActive.py b/Orchestrator/Settings/ControlPanel_RobotScreenActive.py index ebfe0973..a523952a 100644 --- a/Orchestrator/Settings/ControlPanel_RobotScreenActive.py +++ b/Orchestrator/Settings/ControlPanel_RobotScreenActive.py @@ -13,7 +13,7 @@ def RenderRobotScreenActive(inGlobalConfiguration): #Такое большое количество слэшей связано с тем, что этот текст отправляется сначала в браузер, рендерится там, а потом отправляется на процессор оркестратора import os lRobotScreenActivePath = lStartFilePath - lOnClickRunButton=f"mGlobal.Controller.CMDRunText('{lRobotScreenActivePath}');" + lOnClickRunButton=f"mGlobal.Controller.CMDRunText('start cmd /K {lRobotScreenActivePath}');" #Force close button lOnClickForceCloseButton=f"mGlobal.Controller.CMDRunText('taskkill /F /im {lProcessName}');" #Result template diff --git a/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.0.35.dist-info/INSTALLER b/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.0.36.dist-info/INSTALLER similarity index 100% rename from Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.0.35.dist-info/INSTALLER rename to Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.0.36.dist-info/INSTALLER diff --git a/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.0.35.dist-info/METADATA b/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.0.36.dist-info/METADATA similarity index 99% rename from Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.0.35.dist-info/METADATA rename to Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.0.36.dist-info/METADATA index 7a198c81..02fa2391 100644 --- a/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.0.35.dist-info/METADATA +++ b/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.0.36.dist-info/METADATA @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: pyOpenRPA -Version: 1.0.35 +Version: 1.0.36 Summary: First open source RPA platform for business Home-page: https://gitlab.com/UnicodeLabs/OpenRPA Author: Ivan Maslov diff --git a/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.0.35.dist-info/RECORD b/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.0.36.dist-info/RECORD similarity index 97% rename from Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.0.35.dist-info/RECORD rename to Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.0.36.dist-info/RECORD index ef9e4930..890fdf44 100644 --- a/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.0.35.dist-info/RECORD +++ b/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.0.36.dist-info/RECORD @@ -1,8 +1,8 @@ -pyOpenRPA-1.0.35.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 -pyOpenRPA-1.0.35.dist-info/METADATA,sha256=Eaxc1HoYsQJpE4mC-fxUWwTQroJvDDXoEiPN-Eed6Sk,3510 -pyOpenRPA-1.0.35.dist-info/RECORD,, -pyOpenRPA-1.0.35.dist-info/WHEEL,sha256=qB97nP5e4MrOsXW5bIU5cUn_KSVr10EV0l-GCHG9qNs,97 -pyOpenRPA-1.0.35.dist-info/top_level.txt,sha256=RPzwQXgYBRo_m5L3ZLs6Voh8aEkMeT29Xsul1w1qE0g,10 +pyOpenRPA-1.0.36.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 +pyOpenRPA-1.0.36.dist-info/METADATA,sha256=njMhevPuVqHUt6Cy5LO1P47PiVpGWN1oPFhTCHyZ0vc,3510 +pyOpenRPA-1.0.36.dist-info/RECORD,, +pyOpenRPA-1.0.36.dist-info/WHEEL,sha256=qB97nP5e4MrOsXW5bIU5cUn_KSVr10EV0l-GCHG9qNs,97 +pyOpenRPA-1.0.36.dist-info/top_level.txt,sha256=RPzwQXgYBRo_m5L3ZLs6Voh8aEkMeT29Xsul1w1qE0g,10 pyOpenRPA/Orchestrator/Orchestrator.py,sha256=UKp7eqvWDM91kYLwl2mo0UB8Pw-qu8eJCsR9NEXD1aU,6436 pyOpenRPA/Orchestrator/Processor.py,sha256=HQQyOVX-d5vPO-YULyTxVOtXtUMfvpAaSVO4xXxaKVI,9107 pyOpenRPA/Orchestrator/Server.py,sha256=dqTCK9HPhNJNgHv931uohIlW48BUvDhWMVhXaDagM1w,22134 @@ -235,8 +235,8 @@ pyOpenRPA/Studio/__pycache__/Studio.cpython-37.pyc,, pyOpenRPA/Studio/__pycache__/ValueVerify.cpython-37.pyc,, pyOpenRPA/Studio/__pycache__/__init__.cpython-37.pyc,, pyOpenRPA/Studio/__pycache__/__main__.cpython-37.pyc,, -pyOpenRPA/Tools/RobotRDPActive/Connector.py,sha256=9Y9zA92Zw9QF6dadW53NLekV_1r2STISFn5RzI08GDo,7272 -pyOpenRPA/Tools/RobotRDPActive/Monitor.py,sha256=X8ZhJFdDnA88OHlgRuinPvhZ_eS4R7y0xRchbo7LPCc,1525 +pyOpenRPA/Tools/RobotRDPActive/Connector.py,sha256=qU5SXwHgQU177MjqEHyOwJDLAcSVnIkKKw76iD09J1w,7275 +pyOpenRPA/Tools/RobotRDPActive/Monitor.py,sha256=_exwsVgoVzN6kKFjiZfnMoq89ckc70BgfFmDMlg8fUI,2643 pyOpenRPA/Tools/RobotRDPActive/Template.rdp,sha256=qPCLkjzTdYKURK7nRApkPUjRuS4K20vDPj9DIUNSSkE,2392 pyOpenRPA/Tools/RobotRDPActive/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 pyOpenRPA/Tools/RobotRDPActive/__main__.py,sha256=mVk8zVqcBrzAwwn7tbZPXFWTQbWUkgU6w89nbY6GN-8,2340 @@ -255,5 +255,5 @@ pyOpenRPA/Tools/RobotScreenActive/__pycache__/__init__.cpython-37.pyc,, pyOpenRPA/Tools/RobotScreenActive/__pycache__/__main__.cpython-37.pyc,, pyOpenRPA/Tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 pyOpenRPA/Tools/__pycache__/__init__.cpython-37.pyc,, -pyOpenRPA/__init__.py,sha256=l7mCNJli_G0e_-FKJ5hBRfMvtM12pfLexUeM7c1IuZw,175 +pyOpenRPA/__init__.py,sha256=45sI6ciP8porZrJBf8_tLoVCcY6ai1GpMTD79np0oKQ,175 pyOpenRPA/__pycache__/__init__.cpython-37.pyc,, diff --git a/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.0.35.dist-info/WHEEL b/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.0.36.dist-info/WHEEL similarity index 100% rename from Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.0.35.dist-info/WHEEL rename to Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.0.36.dist-info/WHEEL diff --git a/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.0.35.dist-info/top_level.txt b/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.0.36.dist-info/top_level.txt similarity index 100% rename from Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.0.35.dist-info/top_level.txt rename to Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.0.36.dist-info/top_level.txt diff --git a/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA/Tools/RobotRDPActive/Connector.py b/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA/Tools/RobotRDPActive/Connector.py index 096f6ca9..f5397a87 100644 --- a/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA/Tools/RobotRDPActive/Connector.py +++ b/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA/Tools/RobotRDPActive/Connector.py @@ -81,7 +81,7 @@ def SessionRDPStart(inRDPFilePath): [{"title": "Remote Desktop Connection", "class_name": "#32770", "backend": "win32"}, {"title": "D&on't ask me again for connections to this computer", "friendly_class_name": "CheckBox"}], - [{"title_re": f"{lRDPFileName} — .*", + [{"title_re": f"{lRDPFileName}.*", "class_name": "TscShellContainerClass", "backend": "win32"}] ], 30 @@ -96,7 +96,7 @@ def SessionRDPStart(inRDPFilePath): {"title":"Подкл&ючить", "class_name":"Button"}]).click() lWaitResult = UIDesktop.UIOSelectorsSecs_WaitAppear_List( [ - [{"title_re": f"{lRDPFileName} — .*", + [{"title_re": f"{lRDPFileName}.*", "class_name": "TscShellContainerClass", "backend": "win32"}] ], 30 @@ -112,7 +112,7 @@ def SessionRDPStart(inRDPFilePath): {"title": "Co&nnect", "class_name": "Button"}]).click() lWaitResult = UIDesktop.UIOSelectorsSecs_WaitAppear_List( [ - [{"title_re": f"{lRDPFileName} — .*", + [{"title_re": f"{lRDPFileName}.*", "class_name": "TscShellContainerClass", "backend": "win32"}] ], 30 @@ -123,13 +123,14 @@ def SessionRDPStart(inRDPFilePath): #Set fullscreen for app def SessionScreenFull(inSessionHex): #Prepare little window - lRDPWindow = UIDesktop.UIOSelector_Get_UIO([{"title_re": f"{inSessionHex} — .*", "backend": "win32"}]) + lRDPWindow = UIDesktop.UIOSelector_Get_UIO([{"title_re": f"{inSessionHex}.*", "backend": "win32"}]) lRDPWindow.maximize() + lRDPWindow.set_focus() return None #Set Little window of the session def SessionScreen100x550(inSessionHex): #Prepare little window - lRDPWindow = UIDesktop.UIOSelector_Get_UIO([{"title_re": f"{inSessionHex} — .*", "backend": "win32"}]) + lRDPWindow = UIDesktop.UIOSelector_Get_UIO([{"title_re": f"{inSessionHex}.*", "backend": "win32"}]) lRDPWindow.restore() lRDPWindow.move_window(10,10,550,100) return None diff --git a/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA/Tools/RobotRDPActive/Monitor.py b/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA/Tools/RobotRDPActive/Monitor.py index 242836c2..af9f4f92 100644 --- a/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA/Tools/RobotRDPActive/Monitor.py +++ b/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA/Tools/RobotRDPActive/Monitor.py @@ -9,9 +9,10 @@ def Monitor(inGlobalDict, inListUpdateTimeout): # UIOSelector list init lUIOSelectorList = [] for lItem in inGlobalDict["RDPList"]: - lUIOSelectorList.append([{"title_re": f"{lItem['SessionHex']} — .*", "backend": "win32"}]) + lUIOSelectorList.append([{"title_re": f"{lItem['SessionHex']}.*", "backend": "win32"}]) #Run wait command lRDPDissappearList = UIDesktop.UIOSelectorsSecs_WaitDisappear_List(lUIOSelectorList, inListUpdateTimeout) + ########################################### #Analyze if flag safeturn off is activated if inGlobalDict.get("OrchestratorToRobotResetStorage",{}).get("SafeTurnOff",False): lFlagWhile=False @@ -22,6 +23,20 @@ def Monitor(inGlobalDict, inListUpdateTimeout): os.system('taskkill /F /im mstsc.exe') #Return from function return + ########################################### + ########################################### + #Check if from Orchestrator full screen session is set + if inGlobalDict["OrchestratorToRobotStorage"]["FullScreenSessionIndex"] != inGlobalDict["FullScreenSessionIndex"]: + #Do some switches + #If full screen mode we have now + if inGlobalDict["FullScreenSessionIndex"] is not None: + Connector.SessionScreen100x550(inGlobalDict["RDPList"][inGlobalDict["FullScreenSessionIndex"]]["SessionHex"]) + #If new session is setted + if inGlobalDict["OrchestratorToRobotStorage"]["FullScreenSessionIndex"] is not None: + Connector.SessionScreenFull(inGlobalDict["RDPList"][inGlobalDict["OrchestratorToRobotStorage"]["FullScreenSessionIndex"]]["SessionHex"]) + #Set one to other equal + inGlobalDict["FullScreenSessionIndex"] = inGlobalDict["OrchestratorToRobotStorage"]["FullScreenSessionIndex"] + ########################################### for lItem in lRDPDissappearList: inGlobalDict["RDPList"][lItem]["FlagSessionIsActive"] = False # Set flag that session is disconnected #pdb.set_trace() diff --git a/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA/__init__.py b/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA/__init__.py index 768d11db..aeca3c0d 100644 --- a/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA/__init__.py +++ b/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA/__init__.py @@ -3,7 +3,7 @@ r""" The OpenRPA package (from UnicodeLabs) """ -__version__ = 'v1.0.35' +__version__ = 'v1.0.36' __all__ = [] __author__ = 'Ivan Maslov ' #from .Core import Robot \ No newline at end of file diff --git a/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.0.35.dist-info/INSTALLER b/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.0.36.dist-info/INSTALLER similarity index 100% rename from Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.0.35.dist-info/INSTALLER rename to Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.0.36.dist-info/INSTALLER diff --git a/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.0.35.dist-info/METADATA b/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.0.36.dist-info/METADATA similarity index 99% rename from Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.0.35.dist-info/METADATA rename to Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.0.36.dist-info/METADATA index 7a198c81..02fa2391 100644 --- a/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.0.35.dist-info/METADATA +++ b/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.0.36.dist-info/METADATA @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: pyOpenRPA -Version: 1.0.35 +Version: 1.0.36 Summary: First open source RPA platform for business Home-page: https://gitlab.com/UnicodeLabs/OpenRPA Author: Ivan Maslov diff --git a/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.0.35.dist-info/RECORD b/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.0.36.dist-info/RECORD similarity index 97% rename from Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.0.35.dist-info/RECORD rename to Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.0.36.dist-info/RECORD index ef9e4930..890fdf44 100644 --- a/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.0.35.dist-info/RECORD +++ b/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.0.36.dist-info/RECORD @@ -1,8 +1,8 @@ -pyOpenRPA-1.0.35.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 -pyOpenRPA-1.0.35.dist-info/METADATA,sha256=Eaxc1HoYsQJpE4mC-fxUWwTQroJvDDXoEiPN-Eed6Sk,3510 -pyOpenRPA-1.0.35.dist-info/RECORD,, -pyOpenRPA-1.0.35.dist-info/WHEEL,sha256=qB97nP5e4MrOsXW5bIU5cUn_KSVr10EV0l-GCHG9qNs,97 -pyOpenRPA-1.0.35.dist-info/top_level.txt,sha256=RPzwQXgYBRo_m5L3ZLs6Voh8aEkMeT29Xsul1w1qE0g,10 +pyOpenRPA-1.0.36.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 +pyOpenRPA-1.0.36.dist-info/METADATA,sha256=njMhevPuVqHUt6Cy5LO1P47PiVpGWN1oPFhTCHyZ0vc,3510 +pyOpenRPA-1.0.36.dist-info/RECORD,, +pyOpenRPA-1.0.36.dist-info/WHEEL,sha256=qB97nP5e4MrOsXW5bIU5cUn_KSVr10EV0l-GCHG9qNs,97 +pyOpenRPA-1.0.36.dist-info/top_level.txt,sha256=RPzwQXgYBRo_m5L3ZLs6Voh8aEkMeT29Xsul1w1qE0g,10 pyOpenRPA/Orchestrator/Orchestrator.py,sha256=UKp7eqvWDM91kYLwl2mo0UB8Pw-qu8eJCsR9NEXD1aU,6436 pyOpenRPA/Orchestrator/Processor.py,sha256=HQQyOVX-d5vPO-YULyTxVOtXtUMfvpAaSVO4xXxaKVI,9107 pyOpenRPA/Orchestrator/Server.py,sha256=dqTCK9HPhNJNgHv931uohIlW48BUvDhWMVhXaDagM1w,22134 @@ -235,8 +235,8 @@ pyOpenRPA/Studio/__pycache__/Studio.cpython-37.pyc,, pyOpenRPA/Studio/__pycache__/ValueVerify.cpython-37.pyc,, pyOpenRPA/Studio/__pycache__/__init__.cpython-37.pyc,, pyOpenRPA/Studio/__pycache__/__main__.cpython-37.pyc,, -pyOpenRPA/Tools/RobotRDPActive/Connector.py,sha256=9Y9zA92Zw9QF6dadW53NLekV_1r2STISFn5RzI08GDo,7272 -pyOpenRPA/Tools/RobotRDPActive/Monitor.py,sha256=X8ZhJFdDnA88OHlgRuinPvhZ_eS4R7y0xRchbo7LPCc,1525 +pyOpenRPA/Tools/RobotRDPActive/Connector.py,sha256=qU5SXwHgQU177MjqEHyOwJDLAcSVnIkKKw76iD09J1w,7275 +pyOpenRPA/Tools/RobotRDPActive/Monitor.py,sha256=_exwsVgoVzN6kKFjiZfnMoq89ckc70BgfFmDMlg8fUI,2643 pyOpenRPA/Tools/RobotRDPActive/Template.rdp,sha256=qPCLkjzTdYKURK7nRApkPUjRuS4K20vDPj9DIUNSSkE,2392 pyOpenRPA/Tools/RobotRDPActive/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 pyOpenRPA/Tools/RobotRDPActive/__main__.py,sha256=mVk8zVqcBrzAwwn7tbZPXFWTQbWUkgU6w89nbY6GN-8,2340 @@ -255,5 +255,5 @@ pyOpenRPA/Tools/RobotScreenActive/__pycache__/__init__.cpython-37.pyc,, pyOpenRPA/Tools/RobotScreenActive/__pycache__/__main__.cpython-37.pyc,, pyOpenRPA/Tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 pyOpenRPA/Tools/__pycache__/__init__.cpython-37.pyc,, -pyOpenRPA/__init__.py,sha256=l7mCNJli_G0e_-FKJ5hBRfMvtM12pfLexUeM7c1IuZw,175 +pyOpenRPA/__init__.py,sha256=45sI6ciP8porZrJBf8_tLoVCcY6ai1GpMTD79np0oKQ,175 pyOpenRPA/__pycache__/__init__.cpython-37.pyc,, diff --git a/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.0.35.dist-info/WHEEL b/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.0.36.dist-info/WHEEL similarity index 100% rename from Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.0.35.dist-info/WHEEL rename to Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.0.36.dist-info/WHEEL diff --git a/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.0.35.dist-info/top_level.txt b/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.0.36.dist-info/top_level.txt similarity index 100% rename from Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.0.35.dist-info/top_level.txt rename to Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.0.36.dist-info/top_level.txt diff --git a/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA/Tools/RobotRDPActive/Connector.py b/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA/Tools/RobotRDPActive/Connector.py index 096f6ca9..f5397a87 100644 --- a/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA/Tools/RobotRDPActive/Connector.py +++ b/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA/Tools/RobotRDPActive/Connector.py @@ -81,7 +81,7 @@ def SessionRDPStart(inRDPFilePath): [{"title": "Remote Desktop Connection", "class_name": "#32770", "backend": "win32"}, {"title": "D&on't ask me again for connections to this computer", "friendly_class_name": "CheckBox"}], - [{"title_re": f"{lRDPFileName} — .*", + [{"title_re": f"{lRDPFileName}.*", "class_name": "TscShellContainerClass", "backend": "win32"}] ], 30 @@ -96,7 +96,7 @@ def SessionRDPStart(inRDPFilePath): {"title":"Подкл&ючить", "class_name":"Button"}]).click() lWaitResult = UIDesktop.UIOSelectorsSecs_WaitAppear_List( [ - [{"title_re": f"{lRDPFileName} — .*", + [{"title_re": f"{lRDPFileName}.*", "class_name": "TscShellContainerClass", "backend": "win32"}] ], 30 @@ -112,7 +112,7 @@ def SessionRDPStart(inRDPFilePath): {"title": "Co&nnect", "class_name": "Button"}]).click() lWaitResult = UIDesktop.UIOSelectorsSecs_WaitAppear_List( [ - [{"title_re": f"{lRDPFileName} — .*", + [{"title_re": f"{lRDPFileName}.*", "class_name": "TscShellContainerClass", "backend": "win32"}] ], 30 @@ -123,13 +123,14 @@ def SessionRDPStart(inRDPFilePath): #Set fullscreen for app def SessionScreenFull(inSessionHex): #Prepare little window - lRDPWindow = UIDesktop.UIOSelector_Get_UIO([{"title_re": f"{inSessionHex} — .*", "backend": "win32"}]) + lRDPWindow = UIDesktop.UIOSelector_Get_UIO([{"title_re": f"{inSessionHex}.*", "backend": "win32"}]) lRDPWindow.maximize() + lRDPWindow.set_focus() return None #Set Little window of the session def SessionScreen100x550(inSessionHex): #Prepare little window - lRDPWindow = UIDesktop.UIOSelector_Get_UIO([{"title_re": f"{inSessionHex} — .*", "backend": "win32"}]) + lRDPWindow = UIDesktop.UIOSelector_Get_UIO([{"title_re": f"{inSessionHex}.*", "backend": "win32"}]) lRDPWindow.restore() lRDPWindow.move_window(10,10,550,100) return None diff --git a/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA/Tools/RobotRDPActive/Monitor.py b/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA/Tools/RobotRDPActive/Monitor.py index 242836c2..af9f4f92 100644 --- a/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA/Tools/RobotRDPActive/Monitor.py +++ b/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA/Tools/RobotRDPActive/Monitor.py @@ -9,9 +9,10 @@ def Monitor(inGlobalDict, inListUpdateTimeout): # UIOSelector list init lUIOSelectorList = [] for lItem in inGlobalDict["RDPList"]: - lUIOSelectorList.append([{"title_re": f"{lItem['SessionHex']} — .*", "backend": "win32"}]) + lUIOSelectorList.append([{"title_re": f"{lItem['SessionHex']}.*", "backend": "win32"}]) #Run wait command lRDPDissappearList = UIDesktop.UIOSelectorsSecs_WaitDisappear_List(lUIOSelectorList, inListUpdateTimeout) + ########################################### #Analyze if flag safeturn off is activated if inGlobalDict.get("OrchestratorToRobotResetStorage",{}).get("SafeTurnOff",False): lFlagWhile=False @@ -22,6 +23,20 @@ def Monitor(inGlobalDict, inListUpdateTimeout): os.system('taskkill /F /im mstsc.exe') #Return from function return + ########################################### + ########################################### + #Check if from Orchestrator full screen session is set + if inGlobalDict["OrchestratorToRobotStorage"]["FullScreenSessionIndex"] != inGlobalDict["FullScreenSessionIndex"]: + #Do some switches + #If full screen mode we have now + if inGlobalDict["FullScreenSessionIndex"] is not None: + Connector.SessionScreen100x550(inGlobalDict["RDPList"][inGlobalDict["FullScreenSessionIndex"]]["SessionHex"]) + #If new session is setted + if inGlobalDict["OrchestratorToRobotStorage"]["FullScreenSessionIndex"] is not None: + Connector.SessionScreenFull(inGlobalDict["RDPList"][inGlobalDict["OrchestratorToRobotStorage"]["FullScreenSessionIndex"]]["SessionHex"]) + #Set one to other equal + inGlobalDict["FullScreenSessionIndex"] = inGlobalDict["OrchestratorToRobotStorage"]["FullScreenSessionIndex"] + ########################################### for lItem in lRDPDissappearList: inGlobalDict["RDPList"][lItem]["FlagSessionIsActive"] = False # Set flag that session is disconnected #pdb.set_trace() diff --git a/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA/__init__.py b/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA/__init__.py index 768d11db..aeca3c0d 100644 --- a/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA/__init__.py +++ b/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA/__init__.py @@ -3,7 +3,7 @@ r""" The OpenRPA package (from UnicodeLabs) """ -__version__ = 'v1.0.35' +__version__ = 'v1.0.36' __all__ = [] __author__ = 'Ivan Maslov ' #from .Core import Robot \ No newline at end of file diff --git a/Sources/pyOpenRPA/Tools/RobotRDPActive/Connector.py b/Sources/pyOpenRPA/Tools/RobotRDPActive/Connector.py index 096f6ca9..f5397a87 100644 --- a/Sources/pyOpenRPA/Tools/RobotRDPActive/Connector.py +++ b/Sources/pyOpenRPA/Tools/RobotRDPActive/Connector.py @@ -81,7 +81,7 @@ def SessionRDPStart(inRDPFilePath): [{"title": "Remote Desktop Connection", "class_name": "#32770", "backend": "win32"}, {"title": "D&on't ask me again for connections to this computer", "friendly_class_name": "CheckBox"}], - [{"title_re": f"{lRDPFileName} — .*", + [{"title_re": f"{lRDPFileName}.*", "class_name": "TscShellContainerClass", "backend": "win32"}] ], 30 @@ -96,7 +96,7 @@ def SessionRDPStart(inRDPFilePath): {"title":"Подкл&ючить", "class_name":"Button"}]).click() lWaitResult = UIDesktop.UIOSelectorsSecs_WaitAppear_List( [ - [{"title_re": f"{lRDPFileName} — .*", + [{"title_re": f"{lRDPFileName}.*", "class_name": "TscShellContainerClass", "backend": "win32"}] ], 30 @@ -112,7 +112,7 @@ def SessionRDPStart(inRDPFilePath): {"title": "Co&nnect", "class_name": "Button"}]).click() lWaitResult = UIDesktop.UIOSelectorsSecs_WaitAppear_List( [ - [{"title_re": f"{lRDPFileName} — .*", + [{"title_re": f"{lRDPFileName}.*", "class_name": "TscShellContainerClass", "backend": "win32"}] ], 30 @@ -123,13 +123,14 @@ def SessionRDPStart(inRDPFilePath): #Set fullscreen for app def SessionScreenFull(inSessionHex): #Prepare little window - lRDPWindow = UIDesktop.UIOSelector_Get_UIO([{"title_re": f"{inSessionHex} — .*", "backend": "win32"}]) + lRDPWindow = UIDesktop.UIOSelector_Get_UIO([{"title_re": f"{inSessionHex}.*", "backend": "win32"}]) lRDPWindow.maximize() + lRDPWindow.set_focus() return None #Set Little window of the session def SessionScreen100x550(inSessionHex): #Prepare little window - lRDPWindow = UIDesktop.UIOSelector_Get_UIO([{"title_re": f"{inSessionHex} — .*", "backend": "win32"}]) + lRDPWindow = UIDesktop.UIOSelector_Get_UIO([{"title_re": f"{inSessionHex}.*", "backend": "win32"}]) lRDPWindow.restore() lRDPWindow.move_window(10,10,550,100) return None diff --git a/Sources/pyOpenRPA/Tools/RobotRDPActive/Monitor.py b/Sources/pyOpenRPA/Tools/RobotRDPActive/Monitor.py index 242836c2..af9f4f92 100644 --- a/Sources/pyOpenRPA/Tools/RobotRDPActive/Monitor.py +++ b/Sources/pyOpenRPA/Tools/RobotRDPActive/Monitor.py @@ -9,9 +9,10 @@ def Monitor(inGlobalDict, inListUpdateTimeout): # UIOSelector list init lUIOSelectorList = [] for lItem in inGlobalDict["RDPList"]: - lUIOSelectorList.append([{"title_re": f"{lItem['SessionHex']} — .*", "backend": "win32"}]) + lUIOSelectorList.append([{"title_re": f"{lItem['SessionHex']}.*", "backend": "win32"}]) #Run wait command lRDPDissappearList = UIDesktop.UIOSelectorsSecs_WaitDisappear_List(lUIOSelectorList, inListUpdateTimeout) + ########################################### #Analyze if flag safeturn off is activated if inGlobalDict.get("OrchestratorToRobotResetStorage",{}).get("SafeTurnOff",False): lFlagWhile=False @@ -22,6 +23,20 @@ def Monitor(inGlobalDict, inListUpdateTimeout): os.system('taskkill /F /im mstsc.exe') #Return from function return + ########################################### + ########################################### + #Check if from Orchestrator full screen session is set + if inGlobalDict["OrchestratorToRobotStorage"]["FullScreenSessionIndex"] != inGlobalDict["FullScreenSessionIndex"]: + #Do some switches + #If full screen mode we have now + if inGlobalDict["FullScreenSessionIndex"] is not None: + Connector.SessionScreen100x550(inGlobalDict["RDPList"][inGlobalDict["FullScreenSessionIndex"]]["SessionHex"]) + #If new session is setted + if inGlobalDict["OrchestratorToRobotStorage"]["FullScreenSessionIndex"] is not None: + Connector.SessionScreenFull(inGlobalDict["RDPList"][inGlobalDict["OrchestratorToRobotStorage"]["FullScreenSessionIndex"]]["SessionHex"]) + #Set one to other equal + inGlobalDict["FullScreenSessionIndex"] = inGlobalDict["OrchestratorToRobotStorage"]["FullScreenSessionIndex"] + ########################################### for lItem in lRDPDissappearList: inGlobalDict["RDPList"][lItem]["FlagSessionIsActive"] = False # Set flag that session is disconnected #pdb.set_trace() diff --git a/Sources/pyOpenRPA/__init__.py b/Sources/pyOpenRPA/__init__.py index 768d11db..aeca3c0d 100644 --- a/Sources/pyOpenRPA/__init__.py +++ b/Sources/pyOpenRPA/__init__.py @@ -3,7 +3,7 @@ r""" The OpenRPA package (from UnicodeLabs) """ -__version__ = 'v1.0.35' +__version__ = 'v1.0.36' __all__ = [] __author__ = 'Ivan Maslov ' #from .Core import Robot \ No newline at end of file diff --git a/Utils/RobotRDPActive/SettingsRobotRDPActiveExample.py b/Utils/RobotRDPActive/SettingsRobotRDPActiveExample.py index c60f6dae..c7794ef2 100644 --- a/Utils/RobotRDPActive/SettingsRobotRDPActiveExample.py +++ b/Utils/RobotRDPActive/SettingsRobotRDPActiveExample.py @@ -28,9 +28,10 @@ def Settings(): "FlagSessionIsActive": False } ], + "FullScreenSessionIndex": None, #Index of the current session which is full screened, None is no session in fullscreen "Logger": logging.getLogger("RobotRDPActive"), "OrchestratorToRobotStorage": { - + "FullScreenSessionIndex":None #Index of the session which is full screen in GUI. None if no session in full screen }, "OrchestratorToRobotResetStorage": { "SafeTurnOff":False #Control from orchestrator to safety turn off robot @@ -38,7 +39,7 @@ def Settings(): "OrchestratorConnector": { #Fill below }, - "OrchestratorConnectorTerminateAll":OrchestratorConnector.IntervalTermimateAll #Call this function when program must be shutted down (to kill threads from OrchestratorConnector) + "OrchestratorConnectorTerminateAll":OrchestratorConnector.IntervalTerminateAll #Call this function when program must be shutted down (to kill threads from OrchestratorConnector) } ###################### #OrchestratorConnector @@ -54,6 +55,16 @@ def Settings(): "OrchestratorHost": lOrchestratorHost, "OrchestratorPort": lOrchestratorPort, "OrchestratorAuthToken": lOrchestratorAuthToken + }, + { + "Interval": 2.7, + "RobotStorage": mDict, + "RobotStorageKey": "RDPList", + "OrchestratorKeyList": ["Storage", "RobotRDPActive","RobotToOrchestratorStorage","FullScreenSessionIndex"], + "OrchestratorProtocol": lOrchestratorProtocol, + "OrchestratorHost": lOrchestratorHost, + "OrchestratorPort": lOrchestratorPort, + "OrchestratorAuthToken": lOrchestratorAuthToken } ], "IntervalDataReceiveResetAsync": [ diff --git a/v1.0.35 b/v1.0.36 similarity index 100% rename from v1.0.35 rename to v1.0.36 diff --git a/База знаний.txt b/База знаний.txt new file mode 100644 index 00000000..fefcd9be --- /dev/null +++ b/База знаний.txt @@ -0,0 +1,5 @@ + +https://stackoverflow.com/questions/15899798/subprocess-popen-in-different-console + +import os +os.system("start cmd /K dir") #/K remains the window, /C executes and dies (popup) \ No newline at end of file