Twitter Updates

Saturday, 18 July 2009

CocoaDialog DialogBoxes for scripts

I just discovered CocoaDialog, this allows scripts (Ruby, Perl, Bash) to ask for user input in a pretty way. Will be useful for creating double click runnable script/programs

Download .dmg and copy CocoaDialog.app to /Applications/

test run from bash terminal (/Applications/Utilities/Terminal.app)
$ /Applications/CocoaDialog.app/Contents/MacOS/CocoaDialog standard-inputbox --title "Your Name" --informative-text "Enter your name"

Example should show this:
CocoaDialog-standard-inputbox

Pressing ok will return:
>1
>enteredText

Pressing cancel will output:
>2

No comments: