home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD1.iso / Fax / AVMN199D.LHA / avminstall / rexx / setuptfax.avm < prev    next >
Encoding:
Text File  |  1995-08-19  |  3.9 KB  |  192 lines

  1. /* TITLE: avm:rexx/setuptfax.avm */
  2. /*  reading fax settings and writing to the serialdevice */
  3.  
  4. myvar = getclip('TFaxStp1')
  5. if myvar~ = "" then
  6. do
  7.  cidstring = 'AT'||myvar
  8.  
  9. 'writeline' cidstring
  10. 'readline' '10'
  11. a_=rc
  12. if 0 then nop
  13. else if a_=10 then signal stdtimedout
  14. else if a_=12 then signal stdabort
  15. else if a_=14 then signal stderror
  16. else if a_=16 then signal stderror
  17.  
  18. 'readline' '10'
  19. a_=rc
  20. if a_=0 then value=result
  21. if 0 then nop
  22. else if a_=10 then signal stdtimedout
  23. else if a_=12 then signal stdabort
  24. else if a_=14 then signal stderror
  25. else if a_=16 then signal stderror
  26.  
  27. end
  28.  
  29. 'writeline' 'AT+FCLASS=2'
  30. 'readline' '10'
  31. a_=rc
  32. if 0 then nop
  33. else if a_=10 then signal stdtimedout
  34. else if a_=12 then signal stdabort
  35. else if a_=14 then signal stderror
  36. else if a_=16 then signal stderror
  37.  
  38. 'readline' '10'
  39. a_=rc
  40. if a_=0 then value=result
  41. if 0 then nop
  42. else if a_=10 then signal stdtimedout
  43. else if a_=12 then signal stdabort
  44. else if a_=14 then signal stderror
  45. else if a_=16 then signal stderror
  46.  
  47. myvar = getclip('TFaxID')
  48. if myvar ~= "" then
  49.  do /* if not "" */
  50.    cidstring = 'AT+FLID="'||myvar||'"'
  51.  
  52. 'writeline' cidstring
  53. 'readline' '10'
  54. a_=rc
  55. if 0 then nop
  56. else if a_=10 then signal stdtimedout
  57. else if a_=12 then signal stdabort
  58. else if a_=14 then signal stderror
  59. else if a_=16 then signal stderror
  60.  
  61. 'readline' '10'
  62. a_=rc
  63. if a_=0 then value=result
  64. if 0 then nop
  65. else if a_=10 then signal stdtimedout
  66. else if a_=12 then signal stdabort
  67. else if a_=14 then signal stderror
  68. else if a_=16 then signal stderror
  69.  
  70. end
  71. myvar = getclip('TFaxCap')
  72. if myvar ~= "" then
  73. do
  74.   cidstring = 'AT+FDCC='||myvar
  75.  
  76. 'writeline' cidstring
  77. 'readline' '10'
  78. a_=rc
  79. if 0 then nop
  80. else if a_=10 then signal stdtimedout
  81. else if a_=12 then signal stdabort
  82. else if a_=14 then signal stderror
  83. else if a_=16 then signal stderror
  84.  
  85. 'readline' '10'
  86. a_=rc
  87. if a_=0 then value=result
  88. if 0 then nop
  89. else if a_=10 then signal stdtimedout
  90. else if a_=12 then signal stdabort
  91. else if a_=14 then signal stderror
  92. else if a_=16 then signal stderror
  93.  
  94. end
  95. myvar = getclip('TFaxStp2')
  96. if myvar~ = "" then
  97. do
  98.  cidstring = 'AT'||myvar
  99.  
  100. 'writeline' cidstring
  101. 'readline' '10'
  102. a_=rc
  103. if 0 then nop
  104. else if a_=10 then signal stdtimedout
  105. else if a_=12 then signal stdabort
  106. else if a_=14 then signal stderror
  107. else if a_=16 then signal stderror
  108.  
  109. 'readline' '10'
  110. a_=rc
  111. if a_=0 then value=result
  112. if 0 then nop
  113. else if a_=10 then signal stdtimedout
  114. else if a_=12 then signal stdabort
  115. else if a_=14 then signal stderror
  116. else if a_=16 then signal stderror
  117.  
  118. end
  119. myvar = getclip('TFaxStp3')
  120. if myvar~ = "" then
  121. do
  122.  cidstring = 'AT'||myvar
  123.  
  124. 'writeline' cidstring
  125. 'readline' '10'
  126. a_=rc
  127. if 0 then nop
  128. else if a_=10 then signal stdtimedout
  129. else if a_=12 then signal stdabort
  130. else if a_=14 then signal stderror
  131. else if a_=16 then signal stderror
  132.  
  133. 'readline' '10'
  134. a_=rc
  135. if a_=0 then value=result
  136. if 0 then nop
  137. else if a_=10 then signal stdtimedout
  138. else if a_=12 then signal stdabort
  139. else if a_=14 then signal stderror
  140. else if a_=16 then signal stderror
  141.  
  142. end
  143. myvar = getclip('TFaxStp4')
  144. if myvar~ = "" then
  145. do
  146.  cidstring = 'AT'||myvar
  147.  
  148. 'writeline' cidstring
  149. 'readline' '10'
  150. a_=rc
  151. if 0 then nop
  152. else if a_=10 then signal stdtimedout
  153. else if a_=12 then signal stdabort
  154. else if a_=14 then signal stderror
  155. else if a_=16 then signal stderror
  156.  
  157. 'readline' '10'
  158. a_=rc
  159. if a_=0 then value=result
  160. if 0 then nop
  161. else if a_=10 then signal stdtimedout
  162. else if a_=12 then signal stdabort
  163. else if a_=14 then signal stderror
  164. else if a_=16 then signal stderror
  165.  
  166. end
  167. myvar = getclip('TFaxStp5')
  168. if myvar~ = "" then
  169. do
  170.  cidstring = 'AT'||myvar
  171.  
  172. 'writeline' cidstring
  173. 'readline' '10'
  174. a_=rc
  175. if 0 then nop
  176. else if a_=10 then signal stdtimedout
  177. else if a_=12 then signal stdabort
  178. else if a_=14 then signal stderror
  179. else if a_=16 then signal stderror
  180.  
  181. 'readline' '10'
  182. a_=rc
  183. if a_=0 then value=result
  184. if 0 then nop
  185. else if a_=10 then signal stdtimedout
  186. else if a_=12 then signal stdabort
  187. else if a_=14 then signal stderror
  188. else if a_=16 then signal stderror
  189.  
  190. end
  191.  
  192.