Information générale
Titre:
Modem Dialing through VFP...
Trying to dial the phone using modem through COM1 in VFP. No luck!
I've got the routine below:
---------------------------
function dialer
parameters telnum,cport
local keypress, handle, tcom, dialstr
* cport = 1
* telnum = alltrim(str(telnum))
dialstr="ATDT"+telnum
WAIT 'Press Enter to Dial, any other key to cancel' WINDOW NOWAIT
keypress=INKEY(0,'H')
IF keypress = 13
tcom='COM'+alltrim(str(cport))
handle=FOPEN("&tcom",12) && attempt to open port
IF handle < 0
WAIT "Can't Open Communications Port, Check Setup" WINDOW
RETURN
ENDIF
=FPUTS(handle,dialstr) && dial number
WAIT 'Dialing... Lift Phone and press any key' WINDOW
=FPUTS(handle,"ATH") && hang up modem
=FPUTS(handle,"ATZ") && init modem
=FCLOSE(handle)
ENDIF
ENDFUNC
I keep getting the error in the routine "Can't open ...port."
Any ideas? I'd really rather not purchase a $300 comm package and complicate VFP further. Why won't this work? My modem is on COM1 with IRQ4 and works just fine through other programs in W95.
TIA!
Mark
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement