hammerspoon2-docs
    Preparing search index...

    Function create

    • Create a new task

      Parameters

      • launchPath: string

        The full path to the executable to run

      • arguments: string[]

        An array of arguments to pass to the executable

      • completionCallback: ((exitCode: number, exitReason: string) => void) | null

        Optional callback called when the task terminates with exit code and reason

      • environment: Record<string, string> | null

        Optional dictionary of environment variables for the task

      • streamingCallback: ((stream: string, data: string) => void) | null

        Optional callback called when the task produces output; stream is "stdout" or "stderr"

      Returns HSTask

      A task object. Call start() to begin execution.