Question
Maantic Inc
US
Last activity: 23 Aug 2018 9:07 EDT
Pega Robotics : Based on user input, how to capture different application screen and attach in work object
Hi, I want to capture different application screen prints like facets, mainframe, etc.. based on user input, and add the screen prints in work object attachment or filenet.
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Westpac Banking Corporation
AU
You can capture screenshot using below code.
Bitmap printscreen = new Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height);
Graphics graphics = Graphics.FromImage(printscreen as Image); graphics.CopyFromScreen(0, 0, 0, 0, printscreen.Size);
printscreen.Save(@"C:\Temp\testprintscreen.jpg", ImageFormat.Jpeg);
Maantic Inc
US
Thank you Jayachandrak.
I am new to pega robotics, can you provide more details with detailed steps.
Pegasystems Inc.
US
You would take his code (and alter it slightly to make some of the portions parameters like the file name) and put it into a script component (available from the advanced tab in the Toolbox window. Once you validate the script, then your new method would show in Object Explorer and be available to drag into an automation.
Pegasystems Inc.
US
This is just specific to the code above. I would use the TakeSCreenshot method listed later by Jeff B if available.
Pegasystems Inc.
US
Many controls have a GetScreenshot method which will take a screenshot. These will output an image object which can be saved.
Mphasis Unleash the Next
IN
Hi Jeff,
I have done as you suggested but getting runtime exception like attached screen shot.
how do i over come that?
Thankss..
Ascension Health
US
Hello all
I too would like to use this feature (GetScreenShot) and I too am being thwarted by that GetWorkingInstance() error message. Has anyone found a solution?
Ray Lawson
-
Filippo Beltramini Abhishek Kumar Jinath Wijesinghe Dewey Spencer John Paul Raja Christu Raja