The Haiku/BeOS Tip Server
Tips and tricks for Haiku/BeOS users

Alert boxes, part I

Contributed by: Scot Hacker
This tip is valid for: Both BeOS and Haiku

If you type

 alert hello

at a Terminal prompt, you’ll get a dialog box with a Cancel button. If you start adding words, as in

alert hello there you

you’ll get a box with several buttons. Phrases should be enclosed in quotes, as in

 alert "Hello there" "What the heck" "is this?"

When you select a button, your selection is returned to the command line as stdout.

What use could this possibly be? See the tip Bootup Fortune for one example, or Alert boxes, part II for another.

This is a great way to introduce an element of interactivity into your bash shell scripts.

Posted in Terminal

(comments are closed).