Solved

Capture input through a modem

Posted on 2007-03-22
5
292 Views
Last Modified: 2013-12-27
Is it possible to capture input (ex. someone hits the number '2' on their phone pad to answer 'no' to a question) through a modem?  Currently I'm using the following to make the phone calls...
            TelePhone = CREATEOBJECT('Form')
            TelePhone.ADDOBJECT("Dial","Olecontrol","MSCOMMLib.MSComm")
            TelePhone.Dial.CommPort = CommPortUsed && Use Serial Port.
            TelePhone.Dial.Settings = "14400,N,8,1"  && 14.4 Kbaud, No Parity, 8 data Bits, 1 Stop Bit
                  TelePhone.Dial.PortOpen = .T.
            TelePhone.Dial.OUTPUT = M.tele + CHR(13) && Dial the number
etc.
0
Comment
Question by:LexLuthar
  • 2
  • 2
5 Comments
 
LVL 33

Accepted Solution

by:
CarlWarner earned 250 total points
ID: 18776158
How to receive from the serial port by using MScomm32.ocx in Visual FoxPro
http://support.microsoft.com/default.aspx?scid=kb;en-us;140525
0
 

Author Comment

by:LexLuthar
ID: 18777770
I've tried my best guess at the proper syntax.   What would be the specific code knowing this code...?
            TelePhone = CREATEOBJECT('Form')
            TelePhone.ADDOBJECT("Dial","Olecontrol","MSCOMMLib.MSComm")
            TelePhone.Dial.CommPort = CommPortUsed && Use Serial Port.
            TelePhone.Dial.Settings = "14400,N,8,1"  && 14.4 Kbaud, No Parity, 8 data Bits, 1 Stop Bit
                  TelePhone.Dial.PortOpen = .T.
            TelePhone.Dial.OUTPUT = M.tele + CHR(13) && Dial the number
------
is it
Telephone.Dial.input
or
Telephone.Dial.Buffer
or
buffer=Telephone.Dial.input
or
Telephone.Dial.inputlen=0
etc.
Help:(

0
 
LVL 8

Expert Comment

by:suhashegde
ID: 18777946


with Telephone.Dial
.inputlen = 0 && read the whole char in buffer
lcstr = .input
endwith

Now you will have to parse lcstr to check for the dialed number 2


0
 

Author Comment

by:LexLuthar
ID: 18780864
I added...
DO WHILE .T.
with Telephone.Dial
.inputlen = 0 && read the whole char in buffer
lcstr = .input
? lcstr
endwith
WAIT WINDOW TIME(.5)
ENDDO
the only thing printing on the screen was whatever value I gave to .inputlen.
If .inputlen=10 then the screen would fill up with '10' scrolling down the screen no matter what button I pushed on the phone:(
0
 
LVL 8

Assisted Solution

by:suhashegde
suhashegde earned 250 total points
ID: 18806342
sorry abt the last post.
Having Re-read your question
You will need to use TAPI in your application

Initialiseline()
..

0

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Join & Write a Comment

The following recovery method will work on All Cisco Switchs that run ISO software. You will need a good copy of the IOS version you want you use saved on your PC and a Com's Cable. The software for these switches comes as a .tar file. Tar is …
When posting a question about a Cisco ASA, Cisco Router or Cisco Switch, it can aid diagnosis if a suitably sanitised copy of the config is provided. It is much better to leave as much of the configuration as original as possible, as it could be tha…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now