trigger application, triggerapplication, kPMTriggerTriggerApplication — Trigger when an application launches or quits.


trigger application structure { type, process, change };
type : string, choice
process : process signature structure
change : string, choice, default


Trigger when an application launches or quits.

The trigger will fire when an application is detected as having launched or terminated. Detection occurs through OS X's Launch Services and is limited to graphical applications.

Applications launched from the command line, through forking, or other non-Launch Service pathways will not be detected.


type. Type of trigger being described.

type is a string. type must be application, kPMTriggerType_Application.

process. Application to match.

process is a process signature structure.

change. Change in application to detect.

change is a string. If change is omitted, the default launched is used. change must be one of the following two constants:

  • launched, kPMTriggerChange_Launched.
  • terminated, kPMTriggerChange_Terminated.