Skip to content
Alex Narvey edited this page May 13, 2022 · 6 revisions

Function description

Introduced in Hello IT 1.5.0

Goal

This function is used to run a simple UNIX command with arguments when the user click on the menu item.

For more advanced scenario (such as dynamic item name, look at public.script.item).

Settings

The settings dictionary contain all informations you can set to use this function. Here is a description of each.

Key Type Description
title Translatable string (see: Label translation) Item's title shown in the menu
computedTitle Name of the script in Application Support CustomScripts folder First line on stdout will be the title
optionalDisplay Boolean Will show the related item only if option key was pressed when Hello-IT menu was shown (supported in Hello-IT 1.4.0+)
ProgramArguments Array of String Command to run with arguments

The first item of in array of string provided in ProgramArguments must be the full path to the command or the script to run.

Sample settings

<dict>
	<key>functionIdentifier</key>
	<string>public.command</string>
	<key>settings</key>
	<dict>
		<key>title</key>
		<string>Sample Command</string>
		<key>ProgramArguments</key>
		<array>
			<string>/usr/bin/say</string>
			<string>-v</string>
			<string>Alex</string>
			<string>Hello, I&apos;m a Mac!</string>
		</array>
	</dict>
</dict>

More informations

Main implementation

The main implementation of this function is made in the Command plugin from the main project.