CocoaDialog: Difference between revisions
mNo edit summary |
|||
Line 28: | Line 28: | ||
== Alternatives == | == Alternatives == | ||
A simplier alternatibve is terminal-notifier. Information can be found | A simplier alternatibve is terminal-notifier. Information can be found [[OSX_Terminal_Notifier|Here]]. | ||
== See also == | == See also == |
Revision as of 17:57, 24 January 2015
A nice addition to the Apple OSX environment is the option to send message notifications yo the user. The aim of cocoaDialog [1] is just that.
Overview
The application cocoaDialog is an OS X application that allows the use of common GUI controls such as file selectors, text input, progress bars, yes/no confirmations and more with a command-line application. It requires no knowledge of Cocoa, and is ideal for use in shell and Perl scripts (or Ruby, or Python, or... etc).
Download
Download the script [2] and save it into the /usr/bin directory with the name cocoaDialog:
#!/usr/bin/perl use strict; use warnings; my $path = "/Applications"; my $cd = "$path/cocoaDialog.app/Contents/MacOS/cocoaDialog"; system($cd, @ARGV);
Please note:
- Change the $path entry into the location where you saved the cocoaDialog.app directory.
- You need sudo-rights to save the script with the name cocoaDialog in the /usr/bin directory.
- You need to chmod the execution right to ag+x
sudo chmod ag+x /usr/bin/cocoaDialog
Documentation
The documentation contains also examples of the different dialogs. Please read the example carefully because there are some nasty dialog requirements which may cause a dialog to hang into your system.
- cocoaDialog, Documentation.
Alternatives
A simplier alternatibve is terminal-notifier. Information can be found Here.
See also
Reference
- ↑ CocoaDialog, Home page on GitHuh of the CocoaDialog. The Application is create by Mark A. Stratman.
- ↑ Download, Download the Application and Install it into the Applications directory.