# Orchestrator::RobotRDPActive: Dont create RDP is session is exist!

dev-linux
Ivan Maslov 5 years ago
parent ea8233e79d
commit 4466355318

@ -11,28 +11,30 @@ gSettings = None # Gsettings will be initialized after the import module
# Create new RDPSession in RobotRDPActive # Create new RDPSession in RobotRDPActive
def RDPSessionConnect(inRDPSessionKeyStr, inHostStr, inPortStr, inLoginStr, inPasswordStr): def RDPSessionConnect(inRDPSessionKeyStr, inHostStr, inPortStr, inLoginStr, inPasswordStr):
global gSettings global gSettings
lRDPConfigurationItem = { # Init the configuration item # ATTENTION - dont connect if RDP session is exist
"Host": inHostStr, # Host address, example "77.77.22.22" if inRDPSessionKeyStr not in gSettings["RobotRDPActive"]["RDPList"]:
"Port": inPortStr, # RDP Port, example "3389" lRDPConfigurationItem = { # Init the configuration item
"Login": inLoginStr, # Login, example "test" "Host": inHostStr, # Host address, example "77.77.22.22"
"Password": inPasswordStr, # Password, example "test" "Port": inPortStr, # RDP Port, example "3389"
"Screen": { "Login": inLoginStr, # Login, example "test"
"Width": 1680, # Width of the remote desktop in pixels, example 1680 "Password": inPasswordStr, # Password, example "test"
"Height": 1050, # Height of the remote desktop in pixels, example 1050 "Screen": {
# "640x480" or "1680x1050" or "FullScreen". If Resolution not exists set full screen, example "Width": 1680, # Width of the remote desktop in pixels, example 1680
"FlagUseAllMonitors": False, # True or False, example False "Height": 1050, # Height of the remote desktop in pixels, example 1050
"DepthBit": "32" # "32" or "24" or "16" or "15", example "32" # "640x480" or "1680x1050" or "FullScreen". If Resolution not exists set full screen, example
}, "FlagUseAllMonitors": False, # True or False, example False
"SharedDriveList": ["c"], # List of the Root sesion hard drives, example ["c"] "DepthBit": "32" # "32" or "24" or "16" or "15", example "32"
###### Will updated in program ############ },
"SessionHex": "77777sdfsdf77777dsfdfsf77777777", # Hex is created when robot runs, example "" "SharedDriveList": ["c"], # List of the Root sesion hard drives, example ["c"]
"SessionIsWindowExistBool": False, # Flag if the RDP window is exist, old name "FlagSessionIsActive". Check every n seconds , example False ###### Will updated in program ############
"SessionIsWindowResponsibleBool": False, # Flag if RDP window is responsible (recieve commands). Check every nn seconds. If window is Responsible - window is Exist too , example False "SessionHex": "77777sdfsdf77777dsfdfsf77777777", # Hex is created when robot runs, example ""
"SessionIsIgnoredBool": False # Flag to ignore RDP window False - dont ignore, True - ignore, example False "SessionIsWindowExistBool": False, # Flag if the RDP window is exist, old name "FlagSessionIsActive". Check every n seconds , example False
} "SessionIsWindowResponsibleBool": False, # Flag if RDP window is responsible (recieve commands). Check every nn seconds. If window is Responsible - window is Exist too , example False
gSettings["RobotRDPActive"]["RDPList"][inRDPSessionKeyStr] = lRDPConfigurationItem # Add item in RDPList "SessionIsIgnoredBool": False # Flag to ignore RDP window False - dont ignore, True - ignore, example False
Connector.Session(lRDPConfigurationItem) # Create the RDP session }
Connector.SystemRDPWarningClickOk() # Click all warning messages gSettings["RobotRDPActive"]["RDPList"][inRDPSessionKeyStr] = lRDPConfigurationItem # Add item in RDPList
Connector.Session(lRDPConfigurationItem) # Create the RDP session
Connector.SystemRDPWarningClickOk() # Click all warning messages
return True return True
# Disconnect the RDP session # Disconnect the RDP session

Loading…
Cancel
Save