Help Centre › Building 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:
- Navigate to the process where you would like to add the WINDOWS Check if screen is locked function
- Click on the green button's drop-down (right side of the green button labelled "Process")
- On the menu that appears, click on the "+ Activity" item
- From here you can select the WINDOWS Check if screen is locked option
- Click "Add" once you are done
Input parameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
| Variable | No | Text | locked | Variable name to store the result (true if locked, false if unlocked) |
Output variables
| Variable | Type | Description |
|---|---|---|
| locked | Boolean | True 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