On 07 Apr 97 Sebastian Gerhard said to Francois Piette...
SG> BTW: does anyone know how to access a modem (let it dial a number,
SG> transfer data etc) via delphi ? neither my old importet Turbo Pascal
SG> programs using assign(f,com2); write(f,'ATDT 12345'); etc
Remember that a modem expects to see a Return before it will do anything.
Did you try write(f,'ATDT 12345'+#13) ; ???
Here is some code I use in a phone dialer for voice connections. It works
for me every day ...
AssignFile(fCOM,ComStr) ;
rewrite(fCOM) ;
writeln(fCOM,ATDstr+t+';') ;
CloseFile(fCOM) ;
ComStr is 'COM1' etc.
ATDStr is 'ATDT' or 'ATDP'
t is a string containing the number
';' is needed to set up a voice connection with no modem beeps.
I use pulse dialing. After sending the above code, I start a timer that
runs for a time depending on the length of the number, then hangs the phone.
This is intended to leave a window for the user to pick up the phone between
the time the remote starts to ring and the time the
Good Luck
--- PPoint 2.00
---------------
* Origin: Kingston, Canada (1:249/109.11)
|