xref: /freebsd/contrib/dialog/samples/infobox (revision 4c8945a06b01a5c8122cdeb402af36bb46a06acc)
1*4c8945a0SNathan Whitehorn#! /bin/sh
2*4c8945a0SNathan Whitehorn# $Id: infobox,v 1.8 2010/01/13 10:20:03 tom Exp $
3*4c8945a0SNathan Whitehorn
4*4c8945a0SNathan Whitehorn. ./setup-vars
5*4c8945a0SNathan Whitehorn
6*4c8945a0SNathan Whitehornleft=10
7*4c8945a0SNathan Whitehornunit="seconds"
8*4c8945a0SNathan Whitehornwhile test $left != 0
9*4c8945a0SNathan Whitehorndo
10*4c8945a0SNathan Whitehorn
11*4c8945a0SNathan Whitehorn$DIALOG --sleep 1 \
12*4c8945a0SNathan Whitehorn	--title "INFO BOX" "$@" \
13*4c8945a0SNathan Whitehorn        --infobox "Hi, this is an information box. It is
14*4c8945a0SNathan Whitehorndifferent from a message box: it will
15*4c8945a0SNathan Whitehornnot pause waiting for input after displaying
16*4c8945a0SNathan Whitehornthe message. The pause here is only introduced
17*4c8945a0SNathan Whitehornby the sleep command within dialog.
18*4c8945a0SNathan WhitehornYou have $left $unit to read this..." 10 52
19*4c8945a0SNathan Whitehornleft=`expr $left - 1`
20*4c8945a0SNathan Whitehorntest $left = 1 && unit="second"
21*4c8945a0SNathan Whitehorndone
22