home *** CD-ROM | disk | FTP | other *** search
- /* TITLE: avm:rexx/setuptfax.avm */
- /* reading fax settings and writing to the serialdevice */
-
- myvar = getclip('TFaxStp1')
- if myvar~ = "" then
- do
- cidstring = 'AT'||myvar
-
- 'writeline' cidstring
- 'readline' '10'
- a_=rc
- if 0 then nop
- else if a_=10 then signal stdtimedout
- else if a_=12 then signal stdabort
- else if a_=14 then signal stderror
- else if a_=16 then signal stderror
-
- 'readline' '10'
- a_=rc
- if a_=0 then value=result
- if 0 then nop
- else if a_=10 then signal stdtimedout
- else if a_=12 then signal stdabort
- else if a_=14 then signal stderror
- else if a_=16 then signal stderror
-
- end
-
- 'writeline' 'AT+FCLASS=2'
- 'readline' '10'
- a_=rc
- if 0 then nop
- else if a_=10 then signal stdtimedout
- else if a_=12 then signal stdabort
- else if a_=14 then signal stderror
- else if a_=16 then signal stderror
-
- 'readline' '10'
- a_=rc
- if a_=0 then value=result
- if 0 then nop
- else if a_=10 then signal stdtimedout
- else if a_=12 then signal stdabort
- else if a_=14 then signal stderror
- else if a_=16 then signal stderror
-
- myvar = getclip('TFaxID')
- if myvar ~= "" then
- do /* if not "" */
- cidstring = 'AT+FLID="'||myvar||'"'
-
- 'writeline' cidstring
- 'readline' '10'
- a_=rc
- if 0 then nop
- else if a_=10 then signal stdtimedout
- else if a_=12 then signal stdabort
- else if a_=14 then signal stderror
- else if a_=16 then signal stderror
-
- 'readline' '10'
- a_=rc
- if a_=0 then value=result
- if 0 then nop
- else if a_=10 then signal stdtimedout
- else if a_=12 then signal stdabort
- else if a_=14 then signal stderror
- else if a_=16 then signal stderror
-
- end
- myvar = getclip('TFaxCap')
- if myvar ~= "" then
- do
- cidstring = 'AT+FDCC='||myvar
-
- 'writeline' cidstring
- 'readline' '10'
- a_=rc
- if 0 then nop
- else if a_=10 then signal stdtimedout
- else if a_=12 then signal stdabort
- else if a_=14 then signal stderror
- else if a_=16 then signal stderror
-
- 'readline' '10'
- a_=rc
- if a_=0 then value=result
- if 0 then nop
- else if a_=10 then signal stdtimedout
- else if a_=12 then signal stdabort
- else if a_=14 then signal stderror
- else if a_=16 then signal stderror
-
- end
- myvar = getclip('TFaxStp2')
- if myvar~ = "" then
- do
- cidstring = 'AT'||myvar
-
- 'writeline' cidstring
- 'readline' '10'
- a_=rc
- if 0 then nop
- else if a_=10 then signal stdtimedout
- else if a_=12 then signal stdabort
- else if a_=14 then signal stderror
- else if a_=16 then signal stderror
-
- 'readline' '10'
- a_=rc
- if a_=0 then value=result
- if 0 then nop
- else if a_=10 then signal stdtimedout
- else if a_=12 then signal stdabort
- else if a_=14 then signal stderror
- else if a_=16 then signal stderror
-
- end
- myvar = getclip('TFaxStp3')
- if myvar~ = "" then
- do
- cidstring = 'AT'||myvar
-
- 'writeline' cidstring
- 'readline' '10'
- a_=rc
- if 0 then nop
- else if a_=10 then signal stdtimedout
- else if a_=12 then signal stdabort
- else if a_=14 then signal stderror
- else if a_=16 then signal stderror
-
- 'readline' '10'
- a_=rc
- if a_=0 then value=result
- if 0 then nop
- else if a_=10 then signal stdtimedout
- else if a_=12 then signal stdabort
- else if a_=14 then signal stderror
- else if a_=16 then signal stderror
-
- end
- myvar = getclip('TFaxStp4')
- if myvar~ = "" then
- do
- cidstring = 'AT'||myvar
-
- 'writeline' cidstring
- 'readline' '10'
- a_=rc
- if 0 then nop
- else if a_=10 then signal stdtimedout
- else if a_=12 then signal stdabort
- else if a_=14 then signal stderror
- else if a_=16 then signal stderror
-
- 'readline' '10'
- a_=rc
- if a_=0 then value=result
- if 0 then nop
- else if a_=10 then signal stdtimedout
- else if a_=12 then signal stdabort
- else if a_=14 then signal stderror
- else if a_=16 then signal stderror
-
- end
- myvar = getclip('TFaxStp5')
- if myvar~ = "" then
- do
- cidstring = 'AT'||myvar
-
- 'writeline' cidstring
- 'readline' '10'
- a_=rc
- if 0 then nop
- else if a_=10 then signal stdtimedout
- else if a_=12 then signal stdabort
- else if a_=14 then signal stderror
- else if a_=16 then signal stderror
-
- 'readline' '10'
- a_=rc
- if a_=0 then value=result
- if 0 then nop
- else if a_=10 then signal stdtimedout
- else if a_=12 then signal stdabort
- else if a_=14 then signal stderror
- else if a_=16 then signal stderror
-
- end
-
-