Screen resolution check

Hi there,

I would like to know how I can let my bot check the screen resolution. For example, if it’s 1920 x 1280, then proceed; if it’s any other resolution, it should fail. Is there an activity available for that?
Kind regards,

1 Like

Hi @GuusJoosten
Welcome to uipath community
–First in the bottom of the design panel next to variable, arguments click import
and mention this namespace and import
–then in the assign activity get the dimensions with this
out_width = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width
out_height = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height
where out_width ad out_height both are variable of type INT32
–use a if condition and check with the value you have
like this
out_width.ToString.Equals(“1980”) and out_height.ToString.Equals(“1280”)
if this satisfies it will go to the THEN part where you can continue with the activity you want
or it will go to ELSE part use Terminate workflow, which will stop the workflow


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