parent
c71394fa52
commit
6641d54ac2
@ -1,6 +1,6 @@
|
||||
Metadata-Version: 2.1
|
||||
Name: pyOpenRPA
|
||||
Version: 1.0.27
|
||||
Version: 1.0.28
|
||||
Summary: First open source RPA platform for business
|
||||
Home-page: https://gitlab.com/UnicodeLabs/OpenRPA
|
||||
Author: Ivan Maslov
|
@ -0,0 +1,17 @@
|
||||
from pyOpenRPA.Robot import UIDesktop
|
||||
from . import Connector
|
||||
import pdb
|
||||
#Check for session is closed. Reopen if detected. Always keep session is active
|
||||
def Monitor(inGlobalDict, inListUpdateTimeout):
|
||||
while True:
|
||||
# UIOSelector list init
|
||||
lUIOSelectorList = []
|
||||
for lItem in inGlobalDict["RDPList"]:
|
||||
lUIOSelectorList.append([{"title_re": f"{lItem['SessionHex']} — .*", "backend": "win32"}])
|
||||
#Run wait command
|
||||
lRDPDissappearList = UIDesktop.UIOSelectorsSecs_WaitDisappear_List(lUIOSelectorList, inListUpdateTimeout)
|
||||
for lItem in lRDPDissappearList:
|
||||
#pdb.set_trace()
|
||||
#Session start
|
||||
Connector.Session(inGlobalDict["RDPList"][lItem])
|
||||
return None
|
@ -1,50 +0,0 @@
|
||||
#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
|
||||
from pywinauto.application import Application
|
||||
lRDPApplication = Application(backend="uia").start("mstsc.exe")
|
||||
lProcessId = lRDPApplication.process
|
||||
#Expand the parameter section
|
||||
UIDesktop.UIOSelector_Get_UIO(
|
||||
[
|
||||
{"process": lProcessId, "backend": "uia"},
|
||||
{"class_name": "ToolbarWindow32"},
|
||||
{"title": "Показать параметры ", "control_type": "Button"}]
|
||||
).click()
|
||||
#Select flag ask login/pass
|
||||
UIDesktop.UIOSelector_Get_UIO(
|
||||
[
|
||||
{"process": lProcessId, "backend": "win32"},
|
||||
{"title":"Общие"},
|
||||
{"title":"Учетные данные"},
|
||||
{"title":"&Всегда запрашивать учетные данные", "class_name":"Button"}]
|
||||
).check()
|
||||
#Set host:port
|
||||
lHostPort=inRDPSessionConfiguration['Host']
|
||||
if 'Port' in inRDPSessionConfiguration:
|
||||
lHostPort=f"{lHostPort}:{inRDPSessionConfiguration['Port']}"
|
||||
UIDesktop.UIOSelector_Get_UIO(
|
||||
[
|
||||
{"process": lProcessId, "backend": "uia"},
|
||||
{"title": "Компьютер:"},
|
||||
{"title": "Компьютер:", "control_type": "Edit"}]
|
||||
).set_text(f"{lHostPort}")
|
||||
#Set user
|
||||
|
@ -1,6 +1,22 @@
|
||||
#Robot RDPActive settings
|
||||
def Settings():
|
||||
mDict = {
|
||||
|
||||
"RDPList":
|
||||
[
|
||||
{
|
||||
"Host": "77.77.22.22", # Host address
|
||||
"Port": "7777", # RDP Port
|
||||
"Login": "test", # Login
|
||||
"Password": "test", # Password
|
||||
"Screen": {
|
||||
"Width": 1680, #Width of the remote desktop in pixels
|
||||
"Height": 1050, #Height of the remote desktop in pixels
|
||||
# "640x480" or "1680x1050" or "FullScreen". If Resolution not exists set full screen
|
||||
"FlagUseAllMonitors": False, # True or False
|
||||
"DepthBit": "32" # "32" or "24" or "16" or "15"
|
||||
},
|
||||
"SessionHex":"" # Hex is created when robot runs
|
||||
}
|
||||
]
|
||||
}
|
||||
return mDict
|
Binary file not shown.
Binary file not shown.
@ -1,6 +1,6 @@
|
||||
Metadata-Version: 2.1
|
||||
Name: pyOpenRPA
|
||||
Version: 1.0.27
|
||||
Version: 1.0.28
|
||||
Summary: First open source RPA platform for business
|
||||
Home-page: https://gitlab.com/UnicodeLabs/OpenRPA
|
||||
Author: Ivan Maslov
|
@ -0,0 +1,17 @@
|
||||
from pyOpenRPA.Robot import UIDesktop
|
||||
from . import Connector
|
||||
import pdb
|
||||
#Check for session is closed. Reopen if detected. Always keep session is active
|
||||
def Monitor(inGlobalDict, inListUpdateTimeout):
|
||||
while True:
|
||||
# UIOSelector list init
|
||||
lUIOSelectorList = []
|
||||
for lItem in inGlobalDict["RDPList"]:
|
||||
lUIOSelectorList.append([{"title_re": f"{lItem['SessionHex']} — .*", "backend": "win32"}])
|
||||
#Run wait command
|
||||
lRDPDissappearList = UIDesktop.UIOSelectorsSecs_WaitDisappear_List(lUIOSelectorList, inListUpdateTimeout)
|
||||
for lItem in lRDPDissappearList:
|
||||
#pdb.set_trace()
|
||||
#Session start
|
||||
Connector.Session(inGlobalDict["RDPList"][lItem])
|
||||
return None
|
@ -1,50 +0,0 @@
|
||||
#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
|
||||
from pywinauto.application import Application
|
||||
lRDPApplication = Application(backend="uia").start("mstsc.exe")
|
||||
lProcessId = lRDPApplication.process
|
||||
#Expand the parameter section
|
||||
UIDesktop.UIOSelector_Get_UIO(
|
||||
[
|
||||
{"process": lProcessId, "backend": "uia"},
|
||||
{"class_name": "ToolbarWindow32"},
|
||||
{"title": "Показать параметры ", "control_type": "Button"}]
|
||||
).click()
|
||||
#Select flag ask login/pass
|
||||
UIDesktop.UIOSelector_Get_UIO(
|
||||
[
|
||||
{"process": lProcessId, "backend": "win32"},
|
||||
{"title":"Общие"},
|
||||
{"title":"Учетные данные"},
|
||||
{"title":"&Всегда запрашивать учетные данные", "class_name":"Button"}]
|
||||
).check()
|
||||
#Set host:port
|
||||
lHostPort=inRDPSessionConfiguration['Host']
|
||||
if 'Port' in inRDPSessionConfiguration:
|
||||
lHostPort=f"{lHostPort}:{inRDPSessionConfiguration['Port']}"
|
||||
UIDesktop.UIOSelector_Get_UIO(
|
||||
[
|
||||
{"process": lProcessId, "backend": "uia"},
|
||||
{"title": "Компьютер:"},
|
||||
{"title": "Компьютер:", "control_type": "Edit"}]
|
||||
).set_text(f"{lHostPort}")
|
||||
#Set user
|
||||
|
@ -1,6 +1,22 @@
|
||||
#Robot RDPActive settings
|
||||
def Settings():
|
||||
mDict = {
|
||||
|
||||
"RDPList":
|
||||
[
|
||||
{
|
||||
"Host": "77.77.22.22", # Host address
|
||||
"Port": "7777", # RDP Port
|
||||
"Login": "test", # Login
|
||||
"Password": "test", # Password
|
||||
"Screen": {
|
||||
"Width": 1680, #Width of the remote desktop in pixels
|
||||
"Height": 1050, #Height of the remote desktop in pixels
|
||||
# "640x480" or "1680x1050" or "FullScreen". If Resolution not exists set full screen
|
||||
"FlagUseAllMonitors": False, # True or False
|
||||
"DepthBit": "32" # "32" or "24" or "16" or "15"
|
||||
},
|
||||
"SessionHex":"" # Hex is created when robot runs
|
||||
}
|
||||
]
|
||||
}
|
||||
return mDict
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in new issue