diff --git a/Sources/pyOpenRPA/Robot/UIDesktop.py b/Sources/pyOpenRPA/Robot/UIDesktop.py index 8c86eea5..d390f8c9 100644 --- a/Sources/pyOpenRPA/Robot/UIDesktop.py +++ b/Sources/pyOpenRPA/Robot/UIDesktop.py @@ -20,6 +20,7 @@ import datetime import logging import re import copy + #Создать файл логирования # add filemode="w" to overwrite if not os.path.exists("Reports"): @@ -443,10 +444,12 @@ def Get_OSBitnessInt (): def UIOSelector_SafeOtherGet_Process(inUIOSelector): #Default value lResult = None - #Get selector bitness - lUIOSelectorAppBitness = UIOSelector_Get_BitnessStr(inUIOSelector) - if lUIOSelectorAppBitness and Utils.ProcessBitness.mSettingsDict["BitnessProcessCurrent"] != lUIOSelectorAppBitness: - lResult = Utils.ProcessBitness.OtherProcessGet() + #Go check bitness if selector exists + if inUIOSelector: + #Get selector bitness + lUIOSelectorAppBitness = UIOSelector_Get_BitnessStr(inUIOSelector) + if lUIOSelectorAppBitness and Utils.ProcessBitness.mSettingsDict["BitnessProcessCurrent"] != lUIOSelectorAppBitness: + lResult = Utils.ProcessBitness.OtherProcessGet() return lResult ################################################################################################## #inControlSpecificationArray - List of dict, dict in pywinauto.find_windows notation diff --git a/Sources/pyOpenRPA/Studio/__main__.py b/Sources/pyOpenRPA/Studio/__main__.py index 66bc60f9..155d41d4 100644 --- a/Sources/pyOpenRPA/Studio/__main__.py +++ b/Sources/pyOpenRPA/Studio/__main__.py @@ -1,4 +1,7 @@ +#Import parent folder to import current / other packages +######################################################### import sys -lFolderPath = "\\".join(__file__.split("\\")[:-2]) -sys.path.append(lFolderPath) -from Studio import Studio \ No newline at end of file +lFolderPath = "\\".join(__file__.split("\\")[:-3]) +sys.path.insert(0, lFolderPath) +######################################################### +from pyOpenRPA.Studio import Studio \ No newline at end of file diff --git a/Sources/pyOpenRPA/Tools/RobotRDPActive/RDPConnector.py b/Sources/pyOpenRPA/Tools/RobotRDPActive/RDPConnector.py new file mode 100644 index 00000000..3d204911 --- /dev/null +++ b/Sources/pyOpenRPA/Tools/RobotRDPActive/RDPConnector.py @@ -0,0 +1,34 @@ +#Import parent folder to import current / other packages +from pyOpenRPA.Robot import UIDesktop #Lib to access RDP window +import os #os for process run +import time +#Connect to RDP session +""" +{ + "Host": "", #Host address + "Port": "", #RDP Port + "Login": "", # Login + "Password": "", #Password + "Screen": { + "Resolution":"FullScreen", #"640x480" or "1680x1050" or "FullScreen". If Resolution not exists set full screen + "FlagUseAllMonitors": False, # True or False + "DepthBit":"" #"32" or "24" or "16" or "15" + } +} +""" +def SessionConnect(inRDPSessionConfiguration): + #Run mstsc + os.system("mstsc.exe") + time.sleep(2) + #Expand the parameter section + UIDesktop.UIOSelector_Get_UIO( + [ + {"title":"Подключение к удаленному рабочему столу","backend":"uia"}, + {"title":"Пара&метры >>"} + ] + ).click() + #Set host:port + + #Set user + + #Select flag ask login/pass diff --git a/Sources/pyOpenRPA/Tools/RobotRDPActive/SettingsExample.py b/Sources/pyOpenRPA/Tools/RobotRDPActive/SettingsExample.py new file mode 100644 index 00000000..549e7d43 --- /dev/null +++ b/Sources/pyOpenRPA/Tools/RobotRDPActive/SettingsExample.py @@ -0,0 +1,6 @@ +#Robot RDPActive settings +def Settings(): + mDict = { + + } + return mDict \ No newline at end of file diff --git a/v1.0.25 b/Sources/pyOpenRPA/Tools/RobotRDPActive/__init__.py similarity index 100% rename from v1.0.25 rename to Sources/pyOpenRPA/Tools/RobotRDPActive/__init__.py diff --git a/Sources/pyOpenRPA/Tools/RobotRDPActive/__main__.py b/Sources/pyOpenRPA/Tools/RobotRDPActive/__main__.py new file mode 100644 index 00000000..133ba898 --- /dev/null +++ b/Sources/pyOpenRPA/Tools/RobotRDPActive/__main__.py @@ -0,0 +1,19 @@ +#Import parent folder to import current / other packages +######################################################### +import sys +lFolderPath = "\\".join(__file__.split("\\")[:-4]) +sys.path.insert(0, lFolderPath) +######################################################### +from pyOpenRPA.Tools.RobotRDPActive import RDPConnector +mConfiguration={ + "Host": "93.159.239.226", #Host address + "Port": "8525", #RDP Port + "Login": "user22", # Login + "Password": "Tak181418Bar", #Password + "Screen": { + "Resolution":"FullScreen", #"640x480" or "1680x1050" or "FullScreen". If Resolution not exists set full screen + "FlagUseAllMonitors": False, # True or False + "DepthBit":"" #"32" or "24" or "16" or "15" + } +} +RDPConnector.SessionConnect(mConfiguration) \ No newline at end of file diff --git a/Sources/pyOpenRPA/Tools/__init__.py b/Sources/pyOpenRPA/Tools/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/changelog.md b/changelog.md index 22cc8da2..e1c6417d 100644 --- a/changelog.md +++ b/changelog.md @@ -1,4 +1,6 @@ Beta before 1.0.1 (new way of OpenRPA with improovments. Sorry, but no backward compatibility)/ Backward compatibility will start from 1.0.1 +[1.0.26] +Robot UIDesktop bug fix in Safe other process function [1.0.25] *Dont upload to PyPi* - Not tested Created safe call function in UIDesktop diff --git a/v1.0.26 b/v1.0.26 new file mode 100644 index 00000000..e69de29b