Scraping information from an emulated terminal

Hey guys, I need some help with a project I’m working on.

I have to input information into a system called Meditech via Magic 5.67, which is an proprietary emulation terminal. This information is crucial for making decisions within the workflow. However, during the process, I need to read some information that is displayed on the screen. Unfortunately, I can’t use UI element scrapping because of the emulation; UiPath can’t identify the UI elements.

Currently, my approach is to take a screenshot and then snip the part of the screen where the information I need is located (like Number and Status). It works, but there’s a significant issue: I can’t change the screen resolution. For example, if I run it on my laptop and then on my computer, the UiPath flow breaks because the snipping part relies on the exact X,Y coordinates of the screen.

So, I was wondering if there’s another approach I can use to solve this problem?

Number:

Status:

Hi,

We can get information for screen resolution using the following expression.

System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height
System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width

System.Windows.SystemParameters.PrimaryScreenHeight
System.Windows.SystemParameters.PrimaryScreenWidth

And we may be able to calculate proper coordinate from these.

As another approach, we may be able to get whole the text sending Ctrl+A, Ctrl+C or using OCR activity, then extract necessary part with string manipulation (regex etc).

Regards,

1 Like

@vinicius.teruel

You can set the screen resolution of the robot to any resolution you need from robot settings in orchestrator

Cheers

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.