--- title: "system.security.isScreenLocked" description: "Returns whether or not the screen is currently locked." --- # system.security.isScreenLocked > Returns whether or not the screen is currently locked. This function is used in **Python Scripting**. ## Description ## Client Permission Restrictions This scripting function has no [Client Permission](projects\project-properties\project-properties.md#client---permissions) restrictions. ## Syntax `system.security.isScreenLocked()` ### Parameters None ### Returns **boolean** - A flag indicating whether or not the screen is currently locked. ### Scope All ## Code Examples ```python title="Example #1" # This would run in a timer script to lock the screen after 15 seconds of inactivity, and then log the user out after 30 seconds of inactivity. if system.util.getInactivitySeconds() > 15 and not system.security.isScreenLocked(): system.security.lockScreen() elif system.util.getInactivitySeconds() > 30: system.security.logout() ```