home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
High Voltage Shareware
/
high1.zip
/
high1
/
DIR11
/
MAIL2FX2.ZIP
/
SENDFAX.PPE
(
.txt
)
< prev
next >
Wrap
PCBoard Programming Language Executable
|
1993-09-18
|
6KB
|
258 lines
;------------------------------------------------------------------------------
; .ss.
; `²²'
; .,sS$Ss,,s$ .,sS$$$Ss. .,sS$Ss,,s$ .ss. .sSs.
; .d$$²^°²$$$$'.d$P²°^^²$P'.d$$²^°²$$$$'.$$$' .$$$²Sb,.
; $$$' .$$$' $$$²Sçsµ²' .$$$' .$$$'.$$$' .$$$' `$$b.
; $$$b,,d$$$' ,$$$b,....,s$$$$b,,d$$$'.$$$;.,$$$' ;$$$
; `²S$$S²²S$$S²°²S$$$$S²°°²S$$$$$$',$$S²°²S$S'.sS$$$P²'
; .sS²°$$$²²°"' d²°'
; .$$² .$$'
; $$$.,d$$'
; `²S$$S²'
;------------------------------------------------------------------------------
; P.P.L.X. 2.OO (C)1996 - Lone Runner / AEGiS CoRP'96
;------------------------------------------------------------------------------
; PPE 1.OO (plain) - Analysis ON - Postprocessing ON
;------------------------------------------------------------------------------
Integer INTEGER001
Integer INTEGER002
Integer INTEGER003
String STRING001
String STRING002
String STRING003
String STRING004
String STRING005
String STRING006
String STRING007
String STRING008
String STRING009
String STRING010
String STRING011
String STRING012
;------------------------------------------------------------------------------
GetToken STRING001
GetToken STRING002
GetToken STRING011
STRING010 = "N"
STRING012 = "FAX MAIL"
STRING009 = "FAXALIAS.TXT"
PrintLn
PrintLn "@X5FThis command allows you to enter a message that is to be sent via FAX@X0F"
PrintLn
STRING003 = ""
InputYN "Is that what you want to do", STRING003, 14
If (STRING003 <> YesChar()) Goto LABEL005
Log "Fax Invoked", 1
PrintLn
PrintLn "@X38┌────────────────────────────────────────────────────────────────────────────@X3B┐@X0F"
PrintLn "@X38│@X3E This command allows you to enter a message that will be sent via FAX. @X3B│@X0F"
PrintLn "@X38│@X3E @X3B│@X0F"
PrintLn "@X38│@X3E You'll need to provide the Fax number and the name of the person or @X3B│@X0F"
PrintLn "@X38│@X3E company that you'll be sending this to. @X3B│@X0F"
PrintLn "@X38│@X3E The fax number must be 7 digits (Metro Toronto only), or a valid Alias. @X3B│@X0F"
PrintLn "@X38│@X3E (See the bulletin for a list of aliasses.) @X3B│@X0F"
PrintLn "@X38│@X3E @X3B│@X0F"
PrintLn "@X38│@X3E Please note that this is for OUTBOUND faxing only. We have no provisions @X3B│@X0F"
PrintLn "@X38│@X3E to Receive faxes for you. @X3B│@X0F"
PrintLn "@X38│@X3E @X3B│@X0F"
PrintLn "@X38│@X3E Our Fax Mail system will send you a reply message if it was unable to @X3B│@X0F"
PrintLn "@X38│@X3E transmit your fax successfully. @X3B│@X0F"
PrintLn "@X38│@X3E @X3B│@X0F"
PrintLn "@X38│@X3E Faxes are sent about every hour. @X3B│@X0F"
PrintLn "@X38└@X3B────────────────────────────────────────────────────────────────────────────┘@X0F"
PrintLn
STRING004 = ""
STRING005 = ""
STRING006 = ""
:LABEL001
PrintLn
PrintLn "Enter fax number to send fax to, or alias name, ? for list"
InputText "Fax number, alias (or ?)", STRING004, 14, 14
FreshLine
If (Len(LTrim(STRING004, " ")) == 0) Then
InputYN "Abort FAX entry", STRING003, 14
If (STRING003 == YesChar()) Goto LABEL005
Endif
If (STRING004 == "?") Then
PrintLn " The defined Fax Aliasses are"
DispFile STRING009, 0
Goto LABEL001
Endif
STRING003 = Strip(Strip(Strip(Strip(STRING004, " "), ")"), "("), "-")
If ((Left(STRING003, 1) < "0") || (Left(STRING003, 1) > "9")) Then
FOpen 1, STRING009, 0, 0
INTEGER001 = 1
INTEGER002 = 0
STRING003 = " " + Upper(STRING004) + " "
:LABEL002
If (Ferr(1)) Goto LABEL003
FGet 1, STRING008
INTEGER002 = InStr(Upper(STRING008), STRING003)
If (INTEGER002 <> 0) Then
Goto LABEL003
Endif
Inc INTEGER001
Goto LABEL002
:LABEL003
FClose 1
If (INTEGER002 == 0) Then
PrintLn "@X34Not a valid fax number or alias@X0F"
Goto LABEL001
Endif
INTEGER002 = INTEGER002 + Len(STRING003)
STRING003 = Mid(STRING008, INTEGER002, Len(STRING008) - INTEGER002 + 1)
Else
If (STRING002 == "N") Then
If (Len(STRING003) <> 7) Then
PrintLn "@X34Seven digit fax numbers only@X0F"
Goto LABEL001
Endif
If ((Left(STRING003, 1) == "1") || (Left(STRING003, 1) == "0")) Then
PrintLn "@X34Local fax numbers only@X0F"
Goto LABEL001
Endif
STRING003 = Left(STRING003, 3)
If (InStr("411~611~911~976~", STRING003 + "~") <> 0) Then
PrintLn "@X34" + STRING003 + " is not a valid fax number@X0F"
Goto LABEL001
Endif
Else
If (((Len(STRING003) < 7) || (Len(STRING003) > 11)) || (Len(STRING003) == 9)) Then
PrintLn "@X34Wrong number of digits@X0F"
Goto LABEL001
Endif
Select Case (Len(STRING003))
Case 7
STRING003 = Left(STRING003, 3)
Case 8
STRING003 = Mid(STRING003, 2, 3)
Case 10
STRING003 = Mid(STRING003, 4, 3)
Case 11
STRING003 = Mid(STRING003, 5, 3)
End Select
If (InStr("411~611~911~976~", STRING003 + "~") <> 0) Then
PrintLn "@X34" + STRING003 + " is not a valid fax number@X0F"
Goto LABEL001
Endif
Endif
Endif
PrintLn
PrintLn "@X0BPlease enter the following for the fax's cover sheet@X0F"
PrintLn
InputText "To whose attention ", STRING005, 14, 25
PrintLn
PrintLn
InputText "What is the subject ", STRING006, 14, 25
FreshLine
If (Len(LTrim(STRING006, " ")) == 0) Then
InputYN "Abort FAX entry", STRING003, 14
If (STRING003 == YesChar()) Goto LABEL005
Endif
:LABEL004
PrintLn
PrintLn "@X0BShould we notify you if the FAX:@X0F"
PrintLn "@X0B 1 - could not be delivered, or@X0F"
PrintLn "@X0B 2 - in all cases@X0F"
INTEGER003 = "1"
InputStr "@X0B (1 or 2) ", INTEGER003, 14, 1, "12", 64
If ((INTEGER003 <> 2) && (INTEGER003 <> 1)) Then
PrintLn "@X34Enter 1 or 2 only - Please re-enter@X0F"
Goto LABEL004
Endif
STRING007 = "N"
If (INTEGER003 == 2) Then
STRING007 = "Y"
Endif
PrintLn
STRING003 = ""
InputYN "Is the above information correct", STRING003, 14
PrintLn
If (STRING003 <> YesChar()) Goto LABEL001
Join STRING001
Log "Fax Edit", 1
PrintLn
PrintLn "@X0BWe will now invoke the editor to allow you to enter the@X0F"
PrintLn "@X0Btext for your fax. Use Editor's U command to UPLOAD text.@X0F"
KbdStuff "E" + Chr(13)
KbdStuff STRING012 + " @" + STRING004 + Chr(13)
KbdStuff STRING006 + Chr(13)
If ("" == "Y") Then
KbdStuff STRING010 + Chr(13)
Endif
KbdStuff STRING007 + Chr(13)
KbdStuff Chr(255) + Chr(255) + "@ATTENTN:"
KbdStuff Left(STRING005 + Space(59), 60) + "N" + Chr(13)
:LABEL005
End
;------------------------------------------------------------------------------
;
; Usage report (before postprocessing)
;
; ■ Statements used :
;
; 1 End
; 39 Goto
; 23 Let
; 45 PrintLn
; 24 If
; 1 DispFile
; 1 FOpen
; 1 FClose
; 1 FGet
; 2 Log
; 1 InputStr
; 4 InputYN
; 1 Inc
; 3 GetToken
; 3 InputText
; 7 KbdStuff
; 1 Join
; 2 FreshLine
;
;
; ■ Functions used :
;
; 22 +
; 1 -
; 16 ==
; 8 <>
; 2 <
; 2 >
; 20 !
; 1 &&
; 4 ||
; 12 Len(
; 2 Upper()
; 4 Mid()
; 7 Left()
; 1 Space()
; 1 Ferr()
; 8 Chr()
; 3 InStr()
; 2 LTrim()
; 4 YesChar()
; 4 Strip()
;
;------------------------------------------------------------------------------
;
; Analysis flags : No flag
;
;------------------------------------------------------------------------------
;
; Postprocessing report
;
; 0 For/Next
; 0 While/EndWhile
; 15 If/Then or If/Then/Else
; 1 Select Case
;
;------------------------------------------------------------------------------
; AEGiS Corp - Break the routines, code against the machines!
;------------------------------------------------------------------------------