Skip to main content

Get Screen Dimensions

AutomatR.Windows.Activities.GetScreenDimensions

The "Get Screen Dimensions" activity in AutomatR for Windows UI Automation retrieves the width and height of the primary screen. This information is valuable when designing or interacting with elements on the screen to ensure accurate positioning and scaling in automation workflows.

Properties

NameDescription
Misc
Display NameProvides a customizable name for the activity displayed in the workflow. String variables containing the desired display name.
Output
WidthOutputs the width of the primary screen. Double variables to store the screen width.
HeightOutputs the height of the primary screen. Double variables to store the screen height.

How to use:

  1. Drag and drop the "Get Screen Dimensions" activity onto the workflow.
  2. Execute the workflow to retrieve the width and height of the primary screen.
  3. Use the output variables (Width and Height) in subsequent activities for accurate positioning and scaling.

Example: Consider an example where the "Get Screen Dimensions" activity is used to obtain and store the screen dimensions:

Get Screen Dimensions:
Display Name: "Retrieve Screen Dimensions"
Width: screenWidth
Height: screenHeight

In this example, the activity retrieves the width and height of the primary screen, and the values are stored in the variables "screenWidth" and "screenHeight" for further use in the workflow.