Unable to take Screenshot using Taskt RPA


I am using TaskT rpa for an automation code however, the code is working except that the screenshot part, every time it fails on screenshot step, and throw an error on a log. I have add the image with steps detail with the quesiton

Error: System.Exception: System.Runtime.InteropServices.ExternalException (0x80004005): A generic error occurred in GDI+.
   at System.Drawing.Image.Save(String filename, ImageCodecInfo encoder, EncoderParameters encoderParams)
   at System.Drawing.Image.Save(String filename, ImageFormat format)
   at System.Drawing.Image.Save(String filename)
   at taskt.Core.AutomationCommands.ScreenshotCommand.RunCommand(Object sender)
   at taskt.Core.AutomationEngineInstance.ExecuteCommand(ScriptAction command)
   at taskt.Core.AutomationEngineInstance.ExecuteCommand(ScriptAction command)
   at taskt.Core.AutomationEngineInstance.ExecuteScript(String filePath)

enter image description here


1 Answer


This is ready G1ANT's code which you can use:

keyboard ⋘ctrl+printscreen⋙
program mspaint.exe
keyboard ⋘ctrl+v⋙
keyboard ⋘ctrl+s⋙
keyboard filename
change the file name and on the end, you can put the last command:
keyboard ⋘enter⋙
answered on Stack Overflow Oct 29, 2019 by Thomas

User contributions licensed under CC BY-SA 3.0