#!/bin/sh

(sleep 2;echo "XXX";echo "New message";echo "XXX";sleep 2;echo "XXXX") | \
Xdialog --title "INFO BOX 2" --infobox "Infobox test" 10 32 0

case $? in
	1)
		echo "Cancel pressed.";;
	255)
		echo "Box closed.";;
esac

(sleep 2;echo "XXX";echo "New";echo "\\n";echo "message";echo "XXX";sleep 2;echo "XXXX") | \
Xdialog --title "INFO BOX 2" --no-button --infobox "Infobox test (no button)" 10 32 0

if [ "$?" = 255 ] ; then
	echo "Box closed."
fi
