Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Otros entornos y lenguajes > Lazarus, FreePascal, Kylix, etc.
Registrarse FAQ Miembros Calendario Guía de estilo Buscar Temas de Hoy Marcar Foros Como Leídos

 
 
Herramientas Buscar en Tema Desplegado
  #2  
Antiguo 13-06-2011
Avatar de duilioisola
[duilioisola] duilioisola is offline
Miembro Premium
 
Registrado: ago 2007
Ubicación: Barcelona, España
Posts: 1.806
Poder: 22
duilioisola Es un diamante en brutoduilioisola Es un diamante en brutoduilioisola Es un diamante en bruto
Quizás tengas que esperar un ">" después de cada línea que envías.

Código Delphi [-]
procedure TForm1.BEnviarClick(Sender: TObject);
var
  strnumero:string;
  rec: string;
begin
  SdpCel.Active:= True;
  strnumero:= EArea.text + ENumero.text;
  //agregar al final ctrl+z (ascii 26)

  SdpCel.WriteData('AT+CMGS="' + strnumero +'"' + #13);
  // Si recibio el comando con el nro. de telefono debe responder ">". 
  rec:= SdpCel.ReadData;
  if (rec <> '>') then
     raise exception "ERROR enviando primera linea. "+rec

  SdpCel.WriteData(MMensaje.Text + #13);
  // Si recibio el texto del mensaje debe responder ">". 
  rec:= SdpCel.ReadData;
  if (rec <> '>') then
     raise exception "ERROR enviando segunda linea. "+rec

  SdpCel.WriteData(#26);
  // Aqui no se si se espera un ">" o un "Ok"
  rec:= SdpCel.ReadData;
  if (rec <> '>') then
     raise exception "ERROR enviando tercera linea. "+rec

  rec:= SdpCel.ReadData;
  if (UpperCase(rec) = 'OK') then 
     ShowMessage('Mensaje enviado correctamente')
end;
Responder Con Cita
 


Herramientas Buscar en Tema
Buscar en Tema:

Búsqueda Avanzada
Desplegado

Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
Para enviar FAX User_Baja_2 Internet 2 20-02-2009 11:52:23
Ayuda para enviar pdf por fax, usando Delphi 7 manolop Varios 6 15-03-2007 12:48:19
Componente para enviar sms comba OOP 0 04-10-2006 16:13:05
Ayuda con Delphi 4 para enviar correo Nasio Internet 6 19-05-2004 08:00:20


La franja horaria es GMT +2. Ahora son las 20:18:23.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi