xref: /freebsd/contrib/dialog/samples/menubox-8bit (revision a96ef4501919d7ac08e94e98dc34b0bdd744802b)
14c8945a0SNathan Whitehorn#!/bin/sh
2*a96ef450SBaptiste Daroussin# $Id: menubox-8bit,v 1.8 2020/11/26 00:03:58 tom Exp $
34c8945a0SNathan Whitehorn
44c8945a0SNathan Whitehorn. ./setup-vars
54c8945a0SNathan Whitehorn
64c8945a0SNathan Whitehorn. ./setup-tempfile
74c8945a0SNathan Whitehorn
84c8945a0SNathan Whitehorn. ./testdata-8bit
94c8945a0SNathan Whitehorn
104c8945a0SNathan Whitehorn$DIALOG --clear --title "MENU BOX" "$@" \
114c8945a0SNathan Whitehorn        --menu "Hi, this is a menu box. You can use this to \n\
124c8945a0SNathan Whitehornpresent a list of choices for the user to \n\
134c8945a0SNathan Whitehornchoose. If there are more items than can fit \n\
144c8945a0SNathan Whitehornon the screen, the menu will be scrolled. \n\
154c8945a0SNathan WhitehornYou can use the UP/DOWN arrow keys, the first \n\
164c8945a0SNathan Whitehornletter of the choice as a hot key, or the \n\
174c8945a0SNathan Whitehornnumber keys 1-9 to choose an option.\n\
184c8945a0SNathan WhitehornTry it now!\n\n\
194c8945a0SNathan Whitehorn          Choose the OS you like:" 20 51 4 \
20*a96ef450SBaptiste Daroussin        "`./rotated-data 0 "$SAMPLE"`"  "The Great Unix Clone for 386/486" \
21*a96ef450SBaptiste Daroussin        "`./rotated-data 1 "$SAMPLE"`" "Another free Unix Clone for 386/486" \
22*a96ef450SBaptiste Daroussin        "`./rotated-data 2 "$SAMPLE"`" "IBM OS/2" \
23*a96ef450SBaptiste Daroussin        "`./rotated-data 3 "$SAMPLE"`" "Microsoft Windows NT" \
24*a96ef450SBaptiste Daroussin        "`./rotated-data 4 "$SAMPLE"`" "IBM PC DOS" \
25*a96ef450SBaptiste Daroussin        "`./rotated-data 5 "$SAMPLE"`" "Microsoft DOS" 2> $tempfile
264c8945a0SNathan Whitehorn
27*a96ef450SBaptiste Daroussinreturncode=$?
284c8945a0SNathan Whitehorn
294c8945a0SNathan Whitehorn. ./report-tempfile
30