Rename start file in orchestrator, fix in ServerSettings for Linux

dev-linux
Ivan Maslov 2 years ago
parent a9bd02f12a
commit d5f165f882

@ -8,7 +8,7 @@ if CrossOS.IS_WINDOWS_BOOL: #CrossOS
getDisplayRects, saveScreenToBmp, saveRectToBmp, getScreenAsImage, getDisplayRects, saveScreenToBmp, saveRectToBmp, getScreenAsImage,
getRectAsImage, getDisplaysAsImages) getRectAsImage, getDisplaysAsImages)
if CrossOS.IS_LINUX_BOOL: pass if CrossOS.IS_LINUX_BOOL: import pyscreeze
from http import cookies from http import cookies
import uuid # generate UUID4 import uuid # generate UUID4
@ -197,9 +197,9 @@ def pyOpenRPA_Screenshot(inRequest,inGlobalDict):
# Get Screenshot # Get Screenshot
def SaveScreenshot(inFilePath): def SaveScreenshot(inFilePath):
# grab fullscreen # grab fullscreen
# Save the entire virtual screen as a PNG # Save the entire virtual screen as a PNsG
lScreenshot = getScreenAsImage() lScreenshot = getScreenAsImage()
lScreenshot.save('screenshot.png', format='png') lScreenshot.save('Screenshot.png', format='png')
# lScreenshot = ScreenshotSecondScreen.grab_screen() # lScreenshot = ScreenshotSecondScreen.grab_screen()
# save image file # save image file
# lScreenshot.save('screenshot.png') # lScreenshot.save('screenshot.png')
@ -211,7 +211,13 @@ def pyOpenRPA_Screenshot(inRequest,inGlobalDict):
inRequest.OpenRPAResponseDict["Body"] = lFileObject.read() inRequest.OpenRPAResponseDict["Body"] = lFileObject.read()
# Закрыть файловый объект # Закрыть файловый объект
lFileObject.close() lFileObject.close()
else: lFileObject = b'' else:
pyscreeze._screenshot_linux(imageFilename='Screenshot.png')
lFileObject = open("Screenshot.png", "rb")
# Write content as utf-8 data
inRequest.OpenRPAResponseDict["Body"] = lFileObject.read()
# Закрыть файловый объект
lFileObject.close()
# Add activity item or activity list to the processor queue # Add activity item or activity list to the processor queue
# Body is Activity item or Activity List # Body is Activity item or Activity List

Loading…
Cancel
Save