Thanks, so here's a little something I wrapped arount that (the script
assumes sendsms.pl is in your path and that you have setup its
configuration file):

#!/bin/bash

: ${DIALOG=dialog}

get_phones()
{
   exec 3>&1
   value=$(${DIALOG} --title "Send SMS" --clear --ok-label "continue" \
       --form "Enter SMS phone numbers" 30 50 0 \
       "From"  1 1 "${USER}" 1 10  12  11 \
       "To  "  2 1 "" 2 10  12  11 \
       2>&1 1>&3)

   retval=$?
   exec 3>&-

   case $retval in
       0)
           set ${value// /}
           from=${1}
           to=${2}
           if [ -z "${from}" -o -z "${to}" ]; then
               $DIALOG --title "Missing values" --clear \
                   --msgbox "You have to enter both From and To" 8 40
           fi
       ;;
       1)
           exit 0
       ;;
       255) # ESC
       exit 0;;
       esac
}

get_message()
{
   exec 3>&1
   message=$(${DIALOG} --title "Enter SMS text" --clear --ok-label
"Send" --max-input 140 \
       --inputbox "SMS message from $from\n
to $to\n\n
Enter SMS text (Max 140 characters)" \
       30 60 2>&1 1>&3)

   retval=$?
   exec 3>&-

   case $retval in
       0)
           if [ -z "${message}" ]; then
               $DIALOG --title "Missing values" --clear \
                   --msgbox "Cannot send empty sms message" 8 40
           fi
           ;;
       1)
           exit 0;;
       255) # ESC
           exit 0;;
esac

}
send_sms()
{
   sendsms.pl ${to} ${from} \""${message}"\"
}

from=
to=
message=

while test -z "${to}"
do
   get_phones
done
#echo from $from to $to

while test -z "${message}"
do
 get_message
done

send_sms


On 2/22/07, Ilya Konstantinov <[EMAIL PROTECTED]> wrote:
No, but for practical purposes, Nadav Har'el sendsms.pl script works:
http://nadav.harel.org.il/software/sendsms/


On 2/22/07, Dan Bar Dov <[EMAIL PROTECTED]> wrote:
> The Orange site mostly works under firefox on linux.
> However sending SMS does not - and it seems that it uses JAVA.
>
> Anyone tried talking with Orange about firefox? I tried and they answered
> they only support exloder.
>



=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to