Name

action sleep, actionsleep, kPMActionActionSleep — Put the computer to sleep.

Synopsis

action sleep structure { type, seconds };
type : string, choice
seconds : integer, optional, range 60..n

Description

Put the computer to sleep.

If the computer is powered on and awake, puts the computer into sleep mode. The next action will not be performed until the computer next wakes up or powers on.

No running process can block sleep. This action mimics the user selecting sleep from Mac OS X's Apple menu.

Fields

type. Type of action to perform.

type is a string. type must be sleep, kPMActionType_Sleep.

seconds. seconds to sleep before waking up.

seconds is an integer. seconds is optional. seconds must be more than or equal to 60.