OT:programmin questions
Hello everyone,
First off, this is way off topic, but you people are the only ones I
know who can program. So to avoid a further waste of this list's
bandwidth it would probably be better to send any replies to me and not
the list.
I have put a computer together that is going to be a Debian based
multi-media box -- CD player, ogg jukebox, DVD, and maybe a few games
(all with output to my TV -- the hardware is working and XMMS is
constantly running, but now I want to expand). Eventually I'll want to
have a fancy graphical interface (kind of like TiVo's) but for now I
just want stuff to work and so am running a bash script in an Xterm. I
have a nice learning remote control that can send keyboard signals to
the computer via an IR keyboard receiver. The enclosed program will
demonstrate what I have and give a basic idea of what I'm doing. I am
not a programmer as you'll quickly notice. My problem is that I have
to enter a key followed by ENTER. This is obviously cumbersome when
using a remote control. Does bash have a way around this? Should I be
using another language? If the latter, I would prefer, for now, a
scripting language -- thinking this would be easier to figure out as I
need to learn new things.
#!/bin/sh
while [ "$choice" != q ]
do
read choice
case "$choice" in
a) /usr/local/bin/jac -P1;; #jac is a command line CD player
b) /usr/local/bin/jac -P5;;
c) /usr/local/bin/jac -k;;
#First kill the CD and then start DVD player
d) /usr/local/bin/jac -k; /usr/local/bin/ogle -u cli;;
q) /usr/local/bin/jac -k;;
esac
done
exit 0
Thanks everyone. A push in the right direction might be all I need,
maybe even just some good online resources that can get me going
quickly.
David Bellows
Reply to: