Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/bin/sh
CD="/path/to/cocoaDialog.app/Contents/MacOS/cocoaDialog"
# pass the title, text, and Icon via $4, $5, $6, and timeout via $7
cdTitle=$4
cdText=$5
# what icon to use
# if no icon is given, set a default
if [[ -z "$6" ]]; then
cdIcon="/private/var/inte/icons/globeDownload.icns"
else
cdIcon=$6
fi
if [[ -z "$7" ]]; then
cdTimeout="--no-timeout"
else
cdTimeout="--timeout $7"
fi
bubble=`$CD bubble --title "$cdTitle" $cdTimeout --text "$cdText" --icon-file $cdIcon`
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.