hammerspoon2-docs
    Preparing search index...
    • post(
          name: string,
          object?: string | null,
          userInfo?: Record<string, any> | null,
      ): boolean

      Post a distributed notification, for other applications to receive.

      The notification is delivered immediately, even to applications that are in the background.

      Parameters

      • name: string

        The name of the notification, e.g. "com.example.myapp.somethingHappened"

      • Optionalobject: string | null

        An optional string identifying the sender, which observers receive as the notification's object

      • OptionaluserInfo: Record<string, any> | null

        An optional object of extra information. Its values must be property list types: strings, numbers, booleans, Dates, arrays or objects of those types

      Returns boolean

      true if the notification was posted, false if the name was empty or userInfo contained a value that can't be sent