WINDOWS Check if screen is locked function

The WINDOWS Check if screen is locked function in RPA.

Help CentreBuilding Processes

This article describes the RPA Windows functionality to check if the screen is locked.

For a full list of available functions, please read WINDOWS functions.


Description

The WINDOWS Check if screen is locked function checks whether the Windows session is currently locked (e.g. after pressing Win+L or due to inactivity) and stores the result as a boolean in a variable. This is useful for processes that need to verify the screen state before performing UI interactions.


Setting it up

To use the WINDOWS Check if screen is locked function, follow these instructions:

{{popups:rpas/add:action=screen-locked}}

Once on a process map:

  1. Navigate to the process where you would like to add the WINDOWS Check if screen is locked function
  2. Click on the green button's drop-down (right side of the green button labelled "Process")
  3. On the menu that appears, click on the "+ Activity" item
  4. From here you can select the WINDOWS Check if screen is locked option
  5. Click "Add" once you are done

Input parameters

ParameterRequiredTypeDefaultDescription
VariableNoTextlockedVariable name to store the result (true if locked, false if unlocked)

Output variables

VariableTypeDescription
lockedBooleanTrue if the screen is currently locked, false if unlocked

Errors

This action does not produce specific errors.


Tips

  • Use this before UI interactions to ensure the screen is available
  • Combine with a decision step to handle locked/unlocked states differently
  • Pair with Keep PC awake to prevent the screen from locking during automation

Related functions

See it working on your own data

Everything documented here ships with the platform – try the document tools free, or go live in 7 days.