ph_shutdown PowerHome formula function
Description
Initiate a programmatic shutdown of
PowerHome.
Syntax
ph_shutdown ( type
)
Argument |
Description |
type
|
Integer. The type of shutdown to
perform. See
usage below.
|
Return value
Integer. Returns 1 if the
allowphshutdownfunc parameter is not set to YES. Otherwise a 0
is returned.
Usage
Use this function for controlled and
uncontrolled programmatic shutdowns of PowerHome. In order for this function to
be allowed, you must have set the allowphshutdownfunc to YES under the [system]
section of the pwrhome.ini file otherwise the function will be
ignored.
Valid values for the type parameter are detailed below. Add
individual values together to achieve the desired shutdown operation.
1 |
Initiate a controlled user shutdown. This value is ignored
if 8, 16, or 256 have been added to the type parameter. |
2 |
If any unsaved data exists, any save prompts will be
skipped. |
4 |
Bypass the confirm shutdown message. |
8 |
If PowerHome is running as a service, then the shutdown is
performed via a service kill message. If PowerHome is not running as a
service then 16 will be OR'ed into the type parameter. |
16 |
Initiates a quick shutdown. Other type values are
ignored. |
256 |
Perform a hard shutdown bypassing all prompts. PowerHome is
immediately terminated as if the process was
killed. |
Examples
The following examples demonstrate typical syntax/usage for this function.
ph_shutdown(7)
The above example will
initiate a controlled user shutdown, bypassing any save prompts and the confirm
shutdown
message.