Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Rashid Mehmood
  Where is Rashid Mehmood?
 Sialkot
 Pakistan
 Rashid Mehmood
 To: Usman Safdar
  Where is Usman Safdar?
 TS
 Pakistan
 Usman Safdar
 Tags
Subject: RE: Sending SMS
Thread ID: 395672 Message ID: 395762 # Views: 36 # Ratings: 0
Version: Visual FoxPro 7 Category: Active X Controls & OLE Automation
Date: Saturday, January 18, 2014 3:55:06 PM         
   


> > Hi Experts
> >
> > I am using EDGE GSM Modem for send SMS in Visual Foxpro 7 and using these code
> >
> >
> > Close Databases
> > oSMS=Createobject("MSCommLib.MSComm.1")
> >
> > Create Cursor curCellNos(name c(15),addess c(50),contact c(25))
> > Insert Into curCellNos Values('Rashid','Mehmood','03216102031')
> > lcMessage="Hello world!"
> > Select curCellNos
> > Scan
> > SendSMS(Alltrim(contact),lcMessage)
> > Endscan
> > CLOSE ALL
> >
> > Procedure SendSMS
> > Parameters pCellNo,pMessage
> > With oSMS
> > If .PortOpen
> > .PortOpen = .F.
> > Endif
> > .CommPort = 14 && variable
> > .Settings = "460800,N,8,1"
> > .Handshaking = 3
> > .RTSEnable = .T.
> > .DTREnable = .T.
> > .RThreshold = 1
> > .SThreshold = 1
> > .InputLen = 0
> > .PortOpen = .T.
> > If Vartype(oError)==[O]
> > Messagebox("Check your connection/port setting.",16,"SMS Sender")
> > Return .F.
> > Endif
> > Endwith
> > oSMS.Output = "AT" +Chr(13)
> > Delay(Datetime(),5000)
> > oSMS.Output = "AT+CMGF=1" +Chr(13)
> > Delay(Datetime(),5000)
> > oSMS.Output = "AT+CMGS=" + Chr(34) + pCellNo + Chr(34)+Chr(13)
> > Delay(Datetime(),5000)
> > oSMS.Output = pMessage + Chr(26)
> > Delay(Datetime(),5000)
> > Endproc
> >
> >
> > Procedure Delay
> > Parameters pStart,pEnd
> > Do While Datetime()-pStart=pEnd
> > Do Events
> > Enddo
> > ENDFUNC
> >
> > its run no error but the message is not delivered, Please help me what i do for remove this problem.
> >
> > Thanks in advance
> >
> > Rashid Mehmood
>
>
> Dear Rashid Can you plz tell me which EDGE modem u'r using? I need edge modem having SMS receiving facility.
> Regardz

Thanks for your reply.

I used EDGE Modem model NPM-MD950

ENTIRE THREAD

Sending SMS Posted by Rashid Mehmood @ 1/17/2014 4:31:25 PM
RE: Sending SMS Posted by Usman Safdar @ 1/17/2014 7:18:00 PM
RE: Sending SMS Posted by Rashid Mehmood @ 1/18/2014 3:55:06 PM
RE: Sending SMS Posted by Usman Safdar @ 1/18/2014 5:23:09 PM
RE: Sending SMS Posted by Maria Shah @ 1/18/2014 6:36:37 PM
RE: Sending SMS Posted by Rashid Mehmood @ 1/18/2014 6:58:51 PM