CocoaDialog: Difference between revisions
Created page with "{{TOCright}} A nice addition to the Apple OSX environment is the option to send message notifications yo the user. The aim of cocoaDialog <ref>[http://mstratman.github.io/coco..." |
|||
(5 intermediate revisions by the same user not shown) | |||
Line 7: | Line 7: | ||
== Download == | == Download == | ||
Download the script <ref>[http://mstratman.github.io/cocoadialog/#download Download], Download the Application and Install it into the Applications directory.</ref> and save it into the ''/usr/bin'' directory with the name ''cocoaDialog'': | |||
<pre> | |||
#!/usr/bin/perl | |||
use strict; | |||
use warnings; | |||
== | my $path = "/Applications"; | ||
my $cd = "$path/cocoaDialog.app/Contents/MacOS/cocoaDialog"; | |||
system($cd, @ARGV); | |||
</pre> | |||
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 <pre>sudo chmod ag+x /usr/bin/cocoaDialog</pre> | |||
== 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. | |||
* [http://mstratman.github.io/cocoadialog/#documentation cocoaDialog], Documentation. | |||
== Alternatives == | |||
A simplier alternative is terminal-notifier, but has less options than cocoaDialog. | |||
Information can be found on this wiki at [[OSX_Terminal_Notifier]]. | |||
== See also == | == See also == |
Latest revision as of 17:59, 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 alternative is terminal-notifier, but has less options than cocoaDialog. Information can be found on this wiki at OSX_Terminal_Notifier.
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.