Getting dialog to work
Hey,
I'm still trying to get this stupid dialog thing to work, so I tried to
do this example script. Unfortunately, if gives me the same output no
matter what the user chooses. If anyone could help me, that would help
me a lot. Here it is:
#!/bin/sh
# Cameron Matheson
DIALOG=${DIALOG=dialog}
tempfile=`tempfile`
$DIALOG --clear --title "Snes9x Options" \
--backtitle "Super Nintendo" --shadow \
--menu "Choose the ROM you want to load:" 0 0 0 \
1 "Final Fantasy VI" \
2 "Quit" 2> $tempfile
retval=$?
case $retval in
0)
if [ "$tempfile"="1" ]; then
clear
echo "Hey"
exit 0
fi
if [ "$tempfile"="2" ]; then
clear
echo "Bye"
exit 0
fi;;
1)
echo "Cancel Pressed";;
2)
echo "ESC Pressed";;
esac
Thanks,
Cameron Matheson
Reply to: