#!/bin/sh # # flitegui-text - front end for flite to read text input # version 0.2 # # Copyright (C) 2006 menaie@sun.com # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # ###################################################################### export QSHDLG_APP=`basename $0` INPUT=/var/spool/qshdlg/input_$QSHDLG_APP OUTPUT=/var/spool/qshdlg/output_$QSHDLG_APP CONTROL=/var/spool/qshdlg/control_$QSHDLG_APP OPIE_SH=/opt/QtPalmtop/bin/opie-sh APPNAME="Flite GUI" MSG="Type some text:" if [ "`which qshdlg`" = "" ]; then TEXT=`$OPIE_SH -i -t "$APPNAME" -L "$MSG" -g 2>/dev/null` flite -t "$TEXT" else qshdlg input -M -A -t "$APPNAME" -d "$MSG" 2> /dev/null & while [ ! -p $CONTROL ] do echo done while read RET < $INPUT do if [ "$RET" != "" ]; then flite -t "$RET" else echo 'reject()' > $CONTROL fi done fi