cmd_is_checked()

Determines whether a specified command is checked. The function retrieves the command using its ID.

If the command is not found, it returns None; otherwise, it returns a Boolean indicating whether the command is checked.

Syntax

planetcnc.cmd_is_checked(cmd_id)

Parameters

Parameter Type Description
cmd_id int The unique identifier for the command to check.

Return Value

Examples

#! /usr/bin/env python 
 
import planetcnc
 
# Check if command with ID 42 is checked.
enabled = planetcnc.cmd_is_checked(42)
if enabled is None:
    print("Command not found.")
elif enabled:
    print("Command is checked.")
else:
    print("Command is not checked.")

See also

cmd_list
cmd_count
cmd_get_id
cmd_get_name
cmd_get_displayname
cmd_is_enabled
cmd_is_checked
cmd_exec