home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
clarion
/
library
/
dial
/
dial.cla
Wrap
Text File
|
1992-01-11
|
2KB
|
73 lines
MEMBER() ! "Universal" module
!============================================================================
! Dial through modem connected to COM1 - COM2
! Call procedure with COM port number and number to dial as arguments
! eg: DIAL( 1, MEM:Num )
! where MEM:Num is defined as a STRING of up to 20 characters
! Ken Kirchner
! 6-3-91
! Freely use, modify or whatever
! Ken Kirchner
! 1/11/92
!
! NOTE that this is a "Blind" dialer, no attempt is made to set comm
! parameters, wait for dial tones or any other interaction with the
! modem.
!============================================================================
Dial PROCEDURE( D_Port, D_Num )
SCREEN SCREEN WINDOW(7,33),HUE(7,0)
ROW(1,32) PAINT(1,2),TRN
ROW(2,32) PAINT(6,2),HUE(8,0),TRN
ROW(7,2) PAINT(1,30),HUE(8,0),TRN
ROW(7,1) PAINT(1,1),TRN
ROW(1,1) STRING('┌─{29}┐')
ROW(2,1) REPEAT(3);STRING('│<0{29}>│') .
ROW(5,1) STRING('│<0{17},17>─┘<0{9}>│')
ROW(6,1) STRING('└─{29}┘')
ROW(2,6) STRING('Dialing. . .')
ROW(4,4) STRING('Lift Phone Receiver, then')
ROW(5,4) STRING('press <<Enter> (')
COL(22) STRING(').')
.
REPORT REPORT WIDTH(40),DEVICE(D_Device)
PAGE_HEAD HEADER
COL(1) STRING('ATTD') !Set modem dial mode
COL(5) STRING(20),USE(D_Num)
.
FOOTER FOOTER
. .
D_Port SHORT ! Modem Port
D_Num STRING(20) ! Number to dial
D_Device STRING(10) ! Clarion Device
D_Time LONG
CODE
IF D_Port = 2
D_Device = 'COM2:'
ELSE
D_Device = 'COM1:' ! Errors default to COM1
.
OPEN(REPORT) ! Dial Number
D_Time = CLOCK() + 300 ! Delay 3 seconds
LOOP UNTIL CLOCK() > D_Time
IF CLOCK() < 100 THEN BREAK. ! OK, we cheat at midnight
CYCLE
.
OPEN(SCREEN) ! Tell user we dialed
ASK ! Wait for user to pick up
CLOSE(REPORT) ! Disconnect modem
CLOSE(SCREEN)
RETURN