Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Ayaz Ahmad
  Where is Ayaz Ahmad?
 Peshawar
 Pakistan
 Ayaz Ahmad
 To: Rashid Mehmood
  Where is Rashid Mehmood?
 Sialkot
 Pakistan
 Rashid Mehmood
 Tags
Subject: RE: Sending SMS
Thread ID: 395673 Message ID: 395680 # Views: 54 # Ratings: 0
Version: Visual FoxPro 7 Category: Active X Controls & OLE Automation
Date: Friday, January 17, 2014 6:43:31 AM         
   


> Hi Experts
>
> I am using EDGE GSM Modem for send SMS 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






SoftTouch I.T Solutions
www.softtouchpk.weebly.com

ENTIRE THREAD

Sending SMS Posted by Rashid Mehmood @ 1/17/2014 4:12:46 AM
RE: Sending SMS Posted by Ayaz Ahmad @ 1/17/2014 6:43:31 AM