home *** CD-ROM | disk | FTP | other *** search
/ Amiga Times / AmigaTimes.iso / programme / trionbbs110 / Trion / docs / Lists / RexxCommands.list < prev    next >
Encoding:
Text File  |  1998-10-06  |  5.0 KB  |  213 lines

  1.  
  2.  
  3. Start an arexx door with :
  4.  
  5.     RexxDoor  "doors:rexxtest/download.rexx"
  6.  
  7.  
  8.  
  9. Use these lines at the start of your arexx script so it knows
  10. where to talk to:
  11.  
  12.  
  13. Arg node_number                         /* find out node we were run from */
  14. Host = 'TRONREXX.'node_number           /* the Trion Arexx port */
  15. Options results                         /* this is how Trion answers */
  16. Address value host
  17. options failat 15
  18.  
  19.  
  20.  
  21.  
  22. Available commands in the ArexxDoor interface:
  23.  
  24.  
  25. Cls                           - Clears the screen.
  26. Print                         - Prints a line on screen incl. newline (\r\n)
  27. NewLine                       - Display a newline
  28. Send                          - Prints text to the screen.
  29. SendFile/DisplayFile          - Print a file to the screen.
  30. SendFileNoPause               - as SendFile, but no "more" lines when screen full
  31. Sample                        - Plays an audio sample from disc.
  32. Carrier                       - Checks if carrier still available.
  33. More                          - Asks for a 'more' response.
  34. GetChar                       - Wait for a character
  35. MayGetChar                    - Check for a character and return immediatly
  36. GetLine                       - Gets a line of text
  37. Download                      - Download a file
  38. Hangup                        - Hangup on exit of the door
  39. ModemCommand                  - Force modem temporarily in command mode
  40. SysopLog                      - Write a line to the log
  41. Upload                        - Receive a file
  42.  
  43.  
  44. (Arexx commands which do the same as same Menu commands:)
  45.  
  46. ChangeFileArea     <area>
  47. ChangeMessageArea  <area>
  48. ReadNew
  49.  
  50.  
  51.  
  52.  
  53. ===( Carrier  )===  Check if carrrier is present
  54.  
  55.  
  56. Carrier
  57. if result = "0" then do
  58.    exit                      /* carrier is dropped , exit script */
  59. end
  60. else do
  61.    print "Carrier still present"
  62. end
  63.  
  64.  
  65. ===( GetChar )===  Wait for a character
  66.  
  67.  
  68. send "Press a key"
  69. GetCharacter
  70. char = result                /* char = rc */
  71. print ""
  72. print "input was : "char
  73.  
  74.  
  75. ===( MayGetChar )===  Check for a character and return immediatly
  76.  
  77.  
  78. MayGetCharacter
  79. char = result                /* char = rc */
  80. if char = "" then do
  81.    print "no input"
  82. end
  83. else do
  84.    if char = "w" then    print "input was : w"
  85. end
  86.  
  87.  
  88. ===( GetLine )===  Gets a line of text
  89.  
  90.  
  91. print "Type a line (quit = end)"
  92. send ">"
  93. GetLine
  94. line = result
  95. print "input was : '"line"'"
  96. print "input was : >"line
  97. if line = "quit" then do
  98.    print "Bye bye."
  99.    exit 0
  100. end
  101.  
  102.  
  103.  
  104.     GetLine                  Gives a line of maximum 79 characters
  105.     GetLine NOYES            Asks a hotkeyed Yes/no question
  106.     GetLine NOYES 'Text'     As above, but prints text befor the question
  107.     GetLine 5                Gives a line of maximum  N characters
  108.     GetLine 5 NORMAL         Same a above
  109.     GetLine 5 NORMAL 'Text'  As above, but prints text befor the question
  110.     GetLine 5 HIDDEN         Gets a hidden line (for passwords)
  111.     GetLine 5 HIDDEN 'Text'  As above, but prints text befor the question
  112.  
  113.  
  114.  
  115. ===( Download )===  Download a file
  116.  
  117.  
  118. download( "ram:downloadfile" )
  119.  
  120. Outfile = "ram:downloadfile"
  121. download Outfile
  122.  
  123.  
  124.  
  125.  
  126. ===( Upload )===  Receive a file
  127.  
  128.  
  129. Upload
  130. file = result
  131.  
  132. /* file = 0  ..  No file                    */
  133. /* file = 1  ..  Error (partially received  */
  134. /* file = 2  ..  File received !            */
  135.  
  136.  
  137.  
  138.  
  139.  
  140. ===( ChangeFileArea )===  Go to an other file section
  141.  
  142. ChangeFileArea     <area>
  143.  
  144. /* result = 0  ..  Section does not exist or no access to section */
  145. /* result = 1  ..  Changed to the section */
  146.  
  147.  
  148. ===( ChangeMessageArea )===  Go to an other message section
  149.  
  150.  
  151. ChangeMessageArea  <area>
  152.  
  153. /* result = 0  ..  Section does not exist or no access to section */
  154. /* result = 1  ..  Changed to the section */
  155.  
  156.  
  157. ===( ReadNew )===  Read new messages in the current message section
  158.  
  159.  
  160. ReadNew
  161.  
  162. /* result = 0  ..  User read all new messages */
  163. /* result = 1  ..  User terminated reading messages in the current section */
  164.  
  165.  
  166. A little example door:
  167.  
  168. /* RexxDoor "doors:rexxtest/ReadNLA.rexx"                        */
  169. /* start with    RexxDoor  "doors:rexxtest/ReadNLA.rexx"         */
  170.  
  171.  
  172. Arg node_number                         /* node we were run from */
  173. Host = 'TRONREXX.'node_number           /* the Trion Arexx port */
  174. /* Host = 'TRONREXX.'node_number'1' */  /* the Trion Arexx port */
  175. /* Host = 'TRONREXX.01'  */             /* the Trion Arexx port */
  176. Options results                         /* this is how Trion answers */
  177. Address value host
  178. options failat 15
  179.  
  180. ESCSEQ   = '1b'x||'['
  181. YELLOW   = ESCSEQ'1;33m'
  182.  
  183.  
  184. quit = 0
  185.  
  186. /* Read new messages in NLA-net , sections 100 - 150 */
  187.  
  188. do n = 100 to 150 by 1
  189.    Carrier
  190.    if result = "1" & quit = 0 then do     /* if carrier present and not stopt */
  191.       ChangeMessageArea n
  192.       if result = "1" then do
  193.          ReadNew
  194.          quit = result                    /* is 1 when User quits reading */
  195.  
  196.          if quit = 1 then do
  197.             /* print YELLOW"User terminated" */
  198.          end
  199.  
  200.       end
  201.       else do
  202.          /* print YELLOW"There is no msg area "n" !" */
  203.       end
  204.    end
  205. end
  206.  
  207.  
  208. exit 0                         /* einde programma */
  209.  
  210.  
  211.  
  212.  
  213.