Object MethodSystem Control

System:screenOff(value?)

System:screenOff is Blocked by ScriptPolicyGuard: maps to screen lock. Do not use it in normal macro code or AI-generated code.

Detailed Explanation

This section explains when to use the API, how to call it, and which structures it works best with in production flow.

What It Does

System:screenOff is Blocked by ScriptPolicyGuard: maps to screen lock. It can appear in the compatibility inventory, but it must not be used in normal macro code or AI-generated code.

When To Use It

Do not use it in production macros. If the user asks for this behavior, state that it is unsupported and stop the macro safely.

Parameters and Return

Parameter and return details are not actionable here; the call is blocked by the policy gate.

Best Combined With

Use logging, user notification, and requestStop() for safe exit instead of this call.

Example Usage

The snippet below is a starter pattern that can be applied directly in runtime flow.

-- System:screenOff is blocked by ScriptPolicyGuard
print("System:screenOff is blocked by policy")
requestStop()

Copyable Progressive Examples

From foundation to combined usage, each level is provided as a separate code block so you can copy the level you need and adapt it directly.

Foundation

This blocked-call example uses logging and graceful stop instead of invoking the blocked API.

Foundation
-- System:screenOff is blocked by Macro Handler policy.
print("System:screenOff is blocked by ScriptPolicyGuard")
requestStop()

Simple

This blocked-call example uses logging and graceful stop instead of invoking the blocked API.

Simple
-- System:screenOff is blocked by Macro Handler policy.
print("System:screenOff is blocked by ScriptPolicyGuard")
requestStop()

Practical Flow

This blocked-call example uses logging and graceful stop instead of invoking the blocked API.

Practical Flow
-- System:screenOff is blocked by Macro Handler policy.
print("System:screenOff is blocked by ScriptPolicyGuard")
requestStop()

Detailed

This blocked-call example uses logging and graceful stop instead of invoking the blocked API.

Detailed
-- System:screenOff is blocked by Macro Handler policy.
print("System:screenOff is blocked by ScriptPolicyGuard")
requestStop()

Combined

This blocked-call example uses logging and graceful stop instead of invoking the blocked API.

Combined
-- System:screenOff is blocked by Macro Handler policy.
print("System:screenOff is blocked by ScriptPolicyGuard")
requestStop()