home *** CD-ROM | disk | FTP | other *** search
- /* GPFax v2.20 & Trapdoor v1.83 Fax Monitor */
- if ~show('L',"rexxsupport.library") then do
- if addlib('rexxsupport.library',0,-30,0) then
- call time(R)
- else do
- say "B ** REXXSupport.Library unavailable - Aborting...B"
- exit 10
- end
- end
- if ~showlist('P','REXX_GPFAX') then do
- say "B ** Cannot find GPFax AREXX port - Aborting...B"
- exit 10
- end
- call open out,"con:175/12/640/150/GPFax Monitor v1.0"
- if ~result then do
- say "B ** Cannot open CON Window - Aborting...B"
- exit 10
- end
- endif
- openport("FaxMon")
- num=0
- comm=" "
- call writeln out,"GPFax Monitor activated: "time(C)
- /* Idle and process loop */
- do forever
- call writeln out,"*Awaiting Command*"
- waitpkt("FaxMon")
- num=getpkt("FaxMon")
- comm=upper(getarg(num))
- call writeln out,"B TASK: "comm
- if comm="NOTIFY" then do
- reply(num,0)
- options results
- address rexx_gpfax
- reportlog R 3
- if left(result,2)="OK" then do
- reportlog R 4
- name=trim(result)
- reportlog R 2
- pages=trim(result)
- reportlog R 5
- info=trim(result)
- call writeln out,"FAXIN: "name" ("pages" pages) ["info"]"
- reportlog R 1
- fname=trim(result)
- call writeln out," FILE: "fname""
- viewfax result
- end
- end
- if comm="VIEWLAST" then do
- reply(num,0)
- call writeln out,"BViewing last fax received..."
- options results
- address rexx_gpfax
- viewlast
- end
- if comm="PRINTLAST" then do
- reply(num,0)
- call writeln out,"BPrinting last fax received..."
- options results
- address rexx_gpfax
- printlast
- end
- if comm="QUIT" then do
- reply(num,0)
- call writeln out,"BExiting Fax Monitor..."
- address command "wait 1"
- exit 0
- end
- num=0
- comm=" "
- end
-
-