darwin (Mac OS X) Tools
Tools to work with Darwin, Mac OS X's version of UNIX.
isDarwin
Are we on Mac OS X?
Usage
isDarwin
Are we on Mac OS X?
Arguments
- none
Return codes
0- Success1- Environment error2- Argument error
darwinDialog
Display a dialog using
osascriptwith the choices provided. Typically
Usage
darwinDialog [ --help ] [ --choice choiceText ] [ --ok ] [ --cancel ] [ --default buttonIndex ] message ...
Display a dialog using osascript with the choices provided. Typically this is found on Mac OS X.
Outputs the selected button text upon exit.
Arguments
--help- Optional. Flag. Display this help.--choice choiceText- Optional. String. Title of the thing.--ok- Optional. Flag. Adds "OK" as an option.--cancel- Optional. Flag. Adds "Cancel" as an option.--default buttonIndex- Required. Integer. The button (0-based index) to make the default button choice.message ...- Required. String. The message to display in the dialog.
Return codes
0- Success1- Environment error2- Argument error
darwinNotification
Display a notification for the user
Usage
darwinNotification [ --title ] [ --debug ] [ --sound soundName ] [ message ... ]
Display a notification for the user
Arguments
--title- String. Optional. Title of the notification.--debug- Flag. Optional. Output the osascript asdarwinNotification.debugat the application root after this call.--sound soundName- String. Optional. Sound to play with the notification. Represents a sound base name found in/Library/Sounds/.message ...- String. Optional. Message to display to the user in the dialog.
Return codes
0- Success1- Environment error2- Argument error
Sounds in Darwin
darwinSoundDirectory
Directory for user sounds
Usage
darwinSoundDirectory
Directory for user sounds
Arguments
- none
Return codes
0- Success1- Environment error2- Argument error
darwinSoundInstall
Install a sound file for notifications
Usage
darwinSoundInstall [ --help ] soundFile ... [ --create ]
Install a sound file for notifications
Arguments
--help- Optional. Flag. Display this help.soundFile ...- File. Required. Sound file(s) to install in user library.--create- Optional. Flag. Create sound directory if it does not exist.
Return codes
0- Success1- Environment error2- Argument error
darwinSoundNames
List valid sound names usable for notifications in Darwin
Usage
darwinSoundNames
List valid sound names usable for notifications in Darwin
Arguments
- none
Return codes
0- Success1- Environment error2- Argument error
darwinSoundValid
Is a Darwin sound name valid?
Usage
darwinSoundValid
Is a Darwin sound name valid?
Arguments
- none
Return codes
0- Success1- Environment error2- Argument error