diff --git a/.gitignore b/.gitignore index 8aa3235f..270c0552 100644 --- a/.gitignore +++ b/.gitignore @@ -17,4 +17,5 @@ /**/breakpoints.lst /**/Orchestrator/screenshot.png **/.idea/** -/**/screenshot.png \ No newline at end of file +/**/screenshot.png +/**/*.log \ No newline at end of file diff --git a/Resources/WPy64-3720/python-3.7.2.amd64/OpenRPA_RobotRDPActive.exe b/Resources/WPy64-3720/python-3.7.2.amd64/OpenRPA_RobotRDPActive.exe new file mode 100644 index 00000000..66a6265c Binary files /dev/null and b/Resources/WPy64-3720/python-3.7.2.amd64/OpenRPA_RobotRDPActive.exe differ diff --git a/Robot/Examples/RobotRDPActive/pyOpenRPA.Tools.RobotRDPActive_x64.cmd b/Robot/Examples/RobotRDPActive/pyOpenRPA.Tools.RobotRDPActive_x64.cmd new file mode 100644 index 00000000..6a4e3b18 --- /dev/null +++ b/Robot/Examples/RobotRDPActive/pyOpenRPA.Tools.RobotRDPActive_x64.cmd @@ -0,0 +1,4 @@ +cd %~dp0..\..\..\Sources +copy /Y ..\Resources\WPy64-3720\python-3.7.2.amd64\python.exe ..\Resources\WPy64-3720\python-3.7.2.amd64\OpenRPA_RobotRDPActive.exe +.\..\Resources\WPy64-3720\python-3.7.2.amd64\OpenRPA_RobotRDPActive.exe -m pyOpenRPA.Tools.RobotRDPActive +pause >nul \ No newline at end of file diff --git a/Sources/pyOpenRPA/Robot/UIDesktop.py b/Sources/pyOpenRPA/Robot/UIDesktop.py index d390f8c9..74e7ae13 100644 --- a/Sources/pyOpenRPA/Robot/UIDesktop.py +++ b/Sources/pyOpenRPA/Robot/UIDesktop.py @@ -508,6 +508,7 @@ def PWASpecification_Get_UIO(inControlSpecificationArray): #return process application object #old name - None def PWASpecification_Get_PWAApplication(inControlSpecificationArray): + inControlSpecificationArray=copy.deepcopy(inControlSpecificationArray) #Определение backend lBackend=mDefaultPywinautoBackend if "backend" in inControlSpecificationArray[0]: @@ -939,13 +940,16 @@ def UIOXY_SearchChild_ListDict(inRootElement,inX,inY,inHierarchyList=[]): #inControlSpecificationArray- UIOSelector #old name - ElementGetChildElementList def UIOSelector_GetChildList_UIOList(inUIOSelector=[], inBackend=mDefaultPywinautoBackend): + #mRobotLogger.info(f"File!!!!") + #mRobotLogger.info(f"inSelector:{str(inUIOSelector)}, inBackend:{str(inBackend)}") + #pdb.set_trace() #Check the bitness lSafeOtherProcess = UIOSelector_SafeOtherGet_Process(inUIOSelector) if lSafeOtherProcess is None: #Подготовка входного массива inUIOSelector=UIOSelector_SearchUIONormalize_UIOSelector(inUIOSelector) #Выполнить идентификацию объектов, если передан массив - lResultList=[]; + lResultList=[] #ctypes.windll.user32.MessageBoxW(0, str(inControlSpecificationArray), "Your title", 1) if len(inUIOSelector) > 0: #Получить объект @@ -959,8 +963,8 @@ def UIOSelector_GetChildList_UIOList(inUIOSelector=[], inBackend=mDefaultPywinau #Добавить информацию об обнаруженом объекте lObjectInfoItem=UIOEI_Convert_UIOInfo(lTempObjectInfo) #Итератор внутри объекта (для точной идентификации) - lObjectInfoItem['ctrl_index']=lIterator; - lResultList.append(lObjectInfoItem); + lObjectInfoItem['ctrl_index']=lIterator + lResultList.append(lObjectInfoItem) #Инкремент счетчика lIterator=lIterator+1 else: diff --git a/Sources/pyOpenRPA/Studio/Web/Index.xhtml b/Sources/pyOpenRPA/Studio/Web/Index.xhtml index fcd68d2d..db93f655 100644 --- a/Sources/pyOpenRPA/Studio/Web/Index.xhtml +++ b/Sources/pyOpenRPA/Studio/Web/Index.xhtml @@ -233,11 +233,12 @@ mGlobal.TreeLoadSubTree =function (inElementId) { //Подгрузка массива спецификаций lSpecificationArray = mGlobal.GUIElement[inElementId].GUISelectorFull + //lSpecificationArray[0]["backend"] = $(".openrpa-value-backend")[0].value ///Загрузка данных $.ajax({ type: "POST", url: 'GUIAction', - data: '{"ModuleName":"UIDesktop", "ActivityName":"UIOSelector_GetChildList_UIOList","ArgumentList":['+JSON.stringify(lSpecificationArray)+']}', + data: '{"ModuleName":"UIDesktop", "ActivityName":"UIOSelector_GetChildList_UIOList","ArgumentList":['+JSON.stringify(lSpecificationArray)+'], "ArgumentDict":{"inBackend": "'+$(".openrpa-value-backend")[0].value+'"}}', success: function(lData,l2,l3) { diff --git a/Sources/pyOpenRPA/Tools/RobotRDPActive/RDPConnector.py b/Sources/pyOpenRPA/Tools/RobotRDPActive/RDPConnector.py index 3d204911..baa6a3b2 100644 --- a/Sources/pyOpenRPA/Tools/RobotRDPActive/RDPConnector.py +++ b/Sources/pyOpenRPA/Tools/RobotRDPActive/RDPConnector.py @@ -18,13 +18,14 @@ import time """ def SessionConnect(inRDPSessionConfiguration): #Run mstsc - os.system("mstsc.exe") - time.sleep(2) + from pywinauto.application import Application + lRDPApplication = Application(backend="uia").start("mstsc.exe") + lProcessId = lRDPApplication.process #Expand the parameter section UIDesktop.UIOSelector_Get_UIO( [ - {"title":"Подключение к удаленному рабочему столу","backend":"uia"}, - {"title":"Пара&метры >>"} + {"process": lProcessId,"backend":"uia"}, + {"title": "Пара&метры >>"} ] ).click() #Set host:port diff --git a/Sources/pyOpenRPA/Tools/RobotRDPActive/__main__.py b/Sources/pyOpenRPA/Tools/RobotRDPActive/__main__.py index 133ba898..0d9e92fc 100644 --- a/Sources/pyOpenRPA/Tools/RobotRDPActive/__main__.py +++ b/Sources/pyOpenRPA/Tools/RobotRDPActive/__main__.py @@ -1,7 +1,8 @@ #Import parent folder to import current / other packages ######################################################### import sys -lFolderPath = "\\".join(__file__.split("\\")[:-4]) +#lFolderPath = "\\".join(__file__.split("\\")[:-4]) +lFolderPath = "/".join(__file__.split("/")[:-4]) sys.path.insert(0, lFolderPath) ######################################################### from pyOpenRPA.Tools.RobotRDPActive import RDPConnector diff --git a/Utils/PythonDebug_32.cmd b/Utils/PythonDebug_32.cmd index eca1167e..1b4786ad 100644 --- a/Utils/PythonDebug_32.cmd +++ b/Utils/PythonDebug_32.cmd @@ -1,3 +1,3 @@ -cd %~dp0 +cd %~dp0..\Sources .\..\Resources\WPy32-3720\python-3.7.2\python.exe pause >nul \ No newline at end of file diff --git a/Utils/PythonDebug_64.cmd b/Utils/PythonDebug_64.cmd index a315ff6d..34fbc03b 100644 --- a/Utils/PythonDebug_64.cmd +++ b/Utils/PythonDebug_64.cmd @@ -1,3 +1,3 @@ -cd %~dp0 +cd %~dp0..\Sources ..\Resources\WPy64-3720\python-3.7.2.amd64\python.exe pause >nul \ No newline at end of file