home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / mac / comm / rdrydrch.txt < prev    next >
Encoding:
Text File  |  1990-10-17  |  32.9 KB  |  790 lines

  1. Article 282 of net.sources.mac 
  2. Path  Camelot!glacier!decwrl!pyramid!hplabs!sdcrdcf!sdcsvax!sdcc6!ix21
  3. From  ix21@sdcc6.UUCP (David Whiteman)
  4. Newsgroups  net.sources.mac
  5. Subject  Redryder Version 9.2 Part 2 of 5
  6. Message-ID  <2643@sdcc6.UUCP>
  7. Date  31 May 86 13 07 14 GMT
  8. Organization  U.C. San Diego, Academic Computer Center
  9. Lines  779
  10. Keywords  modem communications
  11.  
  12. The following is the documentation enumerating the differences
  13. between version 8.0 and 9.2 of RedRyder.
  14.  
  15. David Whiteman,
  16. University of California, San Diego 
  17.  
  18. (must NOT be converted with Binhex 4.0)
  19.  
  20. ------------If you have an axe to grind, grind it here -------
  21.  
  22.  
  23. Changes And Additions For Version 9.2 
  24. ---------------------------------- 
  25.  
  26.   Gee, this is an ugly document!  I agree.  However, my rationale for it is
  27. quite simple, I committed myself to releasing this software on the 25th of
  28. April (at the Chicago Mac Expo show), and it is now 6:45 in the morning on
  29. April 25th as I put the finishing touches on this document.  Hopefully, it
  30. will be enough to explain those major differences between versions 8.0
  31. and 9.2 until I can get a complete 9.2 manual in final form.  The final
  32. manual will be available for downloading from the FreeSoft RoundTable on
  33.  
  34.  
  35.   I will also be doing a separate "Masters Guide To Red Ryder Procedures"
  36. to explain the many uses of the additional Procedure commands added to
  37. this version, with a large sprinkling of examples, hopefully, this will make
  38. up for the terseness of the following descriptions of those commands.  If
  39. you're not a very experienced programmer type, my recommendation is to
  40. read the Version 8.0 documents, and then read everything below up to the
  41. "New Procedure Commands" section to familiarize yourself with what's
  42. most likely to affect you. 
  43.  
  44. The big surprise in this version is undocumented in this manual, and will
  45. remain so until I finish the tools necessary to allow non-Scott Watson's to
  46. take advantage of them.  This is the Nautilus driver, which is an extremely
  47. powerful graphics driver that I'm very excited about.  There are another
  48. half dozen or so Procedure commands that relate only to Nautilus drivers,
  49. but all will be made clear soon.  If you are not already, get online at the
  50. FreeSoft RoundTable (you must be a registered user to do so) so you won't
  51. miss any of the exciting announcments to come. 
  52.  
  53. BUG FIXES 
  54. --------- 
  55.  
  56. All reported bugs in version 8.0 have been corrected.  Gee, that was easy 
  57. to document...  There have been the normal billion or so minor cosmetic 
  58. improvements. 
  59.  
  60. NEW FEATURES 
  61. ------------ 
  62.  
  63. 1) Better than 100% throughput increase - 9.2 should easily run 2400 baud 
  64. now full throttle with no buffering.  There's still plenty of room for 
  65. optimization and improvement if those of you with 2400 baud modems find 
  66. I'm cutting it a bit close.  I think we can achieve 4800 baud and hope to 
  67. do that in the next version or so. 
  68.  
  69. 2) During a file transfer, the cursor now turns into an animated hourglass. 
  70. {There's some other "pretty-fying" graphics at other parts of the program, 
  71. as you'll see.  Who sez powerful has to be ugly, right?  Before anyone asks,
  72. no it doesn't affect the speed of a file transfer. 
  73.  
  74. 3) There is a new Printer Preferences dialog box.  This enables the user 
  75. to specify the number of lines per page before doing a formfeed (should 
  76. he decide that's desirable) and whether or not to put a time/date heading 
  77. and page number on the first page, every page, or not at all.   If you don't do
  78. any form feeds, the time/date item will only be done on the first page.  I 
  79. think the form feed is also necessary to make the LaserWriter spit out a 
  80. page.  This dialog box applies to the "Echo To Printer" and "Print TEXT 
  81. File" menu choices and their Procedure command equivalents.  The box also
  82. allows you to force send a linefeed or formfeed to the printer by clicking
  83. in the appropriate button.   
  84.  
  85. 4) XMODEM receive throughput has been greatly increased.  Runs like a bat 
  86. out of Hell now.  A bat with his butt on fire out of Hell... A bat...  Well, 
  87. coupled with a RAM disk I really don't think XMODEM or XMODEM/CRC can be
  88. made to run any faster than this on a Mac. 
  89.  
  90. 5) Strings sent by a Procedure TYPE command are now displayed when
  91. using HALF duplex.  If you don't want something to be typed on the screen,
  92. like a password, simply switch to FULL duplex, TYPE the password, and
  93. then switch back to HALF duplex in your PROCEDURE. 
  94.  
  95. 6) Procedures no longer "lock out" the use of the mouse (but disable a few 
  96. menu choices that would not be appropriate while a Procedure is
  97. executing). This means that you could have a Procedure running in the
  98. background to load in certain Macro Key files (and have the most often
  99. used functions displayed as mousable buttons in the Macros Status Bar) as
  100. the user branches to various menus within a service.  The new menu
  101. command "Monitor Procedure" is equivalent to the Procedure command
  102. LOUD in its checkmarked state, and the Procedure command QUIET in its
  103. unchecked state.  A Procedure now starts out in the mode specified by that
  104. menu choice.  To enable the use of the various status bars while a
  105. Procedure is running, just uncheck the "Monitor Procedure" menu choice, or
  106. use a QUIET command in your Procedure. 
  107.  
  108. 7) Desk accessories can now be zapped "underneath" the Red Ryder window, 
  109. and brought back on top using the "Bring Desk Accessory Windows To Top" 
  110. menu choice.  Note that having desk accessories active in this manner 
  111. can cut down on throughput at the faster baud rates, but it makes the chore 
  112. of doing a lot of little copies and pastes to RedWriter a lot easier. 
  113.  
  114. 8) CIS 'B' protocol downloads always use the small progress indicator.  
  115.  
  116. 9) The "Edit" menu now contains an "Append To Archived Screens File"
  117. choice which does exactly that (or creates the "Archived Screens" file if it
  118. doesn't exist) with selected text. 
  119.  
  120. 10) The "VT100 Modes..." dialog box has two new additions, the "Mac Plus
  121. Keyboard" checkbox should be checked if you are using a Macintosh Plus
  122. keyboard.  The layout of the keypad is a physical equivalent of the
  123. VT52/100 terminals' keypad layout, and so different values than what is
  124. printed on the keycaps may be sent by certain keys.  There is now a "Show
  125. Keypad Mapping" button that brings up a picture of the mapping layout for
  126. those who need a quick refresher.. 
  127.  
  128. 11) A "Buffered Keyboard" choice is available whenever you are using the 
  129. 80 X 24 display screen mode.  This holds everything you type in a "buffer"
  130. that is displayed at the bottom of the screen until you press the RETURN
  131. key.  It then sends the entire buffer to the remote machine all at once. It 
  132. useful for "Conferences" on hosts like CompuServe, Delphi, and GEnie, and
  133. it can be especially useful with HALF-duplex systems to enforce the
  134. backspacing limit. 
  135.  
  136. By far, the most drastic changes were made to the Procedure language.
  137. There are several commands no longer supported or replaced by new ones,
  138. and a whole bunch  of new commands. 
  139.  
  140. CHANGES MADE TO VERSION 8.00 PROCEDURE COMMANDS 
  141.  
  142. SCREENCOPY - no longer exists or is supported.  Replaced by SCREENPRINT
  143. and SCREENDISK as described below. 
  144.  
  145. WAIT - no longer "freezes" up Red Ryder until the specified time.  It simply
  146. does not execute the next Procedure instruction until the specified time -
  147. you can still use the rest of Red Ryder as normal. 
  148.  
  149. PAUSE number  - Upwardly compatible with 8.0, if no "number" is
  150. specified, it simply pauses Red Ryder for 1 second.  Otherwise, the
  151. "number" is a number of 1/60th of a second increments to pause.  
  152.  
  153. PAUSE 180      - would pause 3 seconds. 
  154.  
  155. PANIC0 
  156. PANIC1 
  157. PANIC2 
  158. .
  159. .
  160. .
  161. PANIC 9 - no longer exist or are supported.  Replaced by PANICAFTER and 
  162. ONPANIC commands described below. 
  163.  
  164. File transfers and Redials executed by a Procedure that are aborted (by
  165. either a mousepress or error count) no longer abort the Procedure in
  166. progress, they instead set the YES/NO flag (described below) to reflect
  167. whether or not the intended function did or didn't work. 
  168.  
  169. NEW PROCEDURE COMMANDS 
  170. ------------------------ 
  171.  
  172. SCREENDISK 
  173.  
  174. Function: Equivalent to pressing the "Dump Screen To Disk File" button on 
  175. the General Status Bar.  Dumps a copy of the current display screen to the 
  176. disk file "Current Screen", destroying any old data in that file. 
  177.  
  178. SCREENPRINT 
  179.  
  180. Function: Equivalent to pressing the "Dump Screen To Printer" button on 
  181. the General Status Bar. 
  182.  
  183. CURSOR H 
  184.  
  185. Function: Turns the mouse cursor into an animated hourglass. 
  186.  
  187. CURSOR A 
  188.  
  189. Function: Turns the mouse cursor into the normal arrow symbol.  The
  190. cursor is always initialized back to an arrow at the conclusion or
  191. cancellation of a Procedure file. 
  192.  
  193. ONPANIC command 
  194.  
  195. Function: When a "panic" condition exists, the Procedure command
  196. "command" is immediately executed.  It's used in conjunction with the
  197. PANICAFTER command.  NOTE: because of a bug I didn't catch, it is
  198. necessary to insert two spaces (not just one) between ONPANIC and
  199. "command".
  200.  
  201. PANICAFTER seconds 
  202.  
  203. Function: This command specifies the number of seconds to wait at the
  204. next PROMPT procedure command before falling into a "panic" condition. 
  205. When a "panic" condition exists, Red Ryder will immediately execute the
  206. Procedure command (usually a JUMPTO or DO command) specified in the
  207. last ONPANIC command.  Any time a PROMPT, or ALERT command is
  208. successful, the panic timer is turned off and must be reset using another
  209. PANICAFTER command before the next PROMPT command (if desired).  Note
  210. that the Procedure command specified in a ONPANIC command is not 
  211. lost when the panic timer is turned off, so it stays static until changed, 
  212. or the Procedure terminates. 
  213.   However, it's very important to have at least one ONPANIC command
  214. executed in your Procedure before any PANICAFTER commands so Red Ryder
  215. knows what to do in case of a "panic" condition. 
  216.  
  217. REDIAL LIMIT number 
  218.  
  219. Function: New FCC regulations specify that no automatic redialing device
  220. may not be allowed to progress past 15 consecutive tries, and this
  221. command tells Red Ryder how many maximum number of redial attempts to
  222. do before stopping and alerting you.  "number" must range between 1 and 
  223. 255 (we allow 255 because of many of our customers live in countries not
  224. governed by the FCC ruling - please adhere to any regulations that apply to
  225. you for the country you live in. 
  226.  
  227. PROCEDURE VARIABLES 
  228. --------------------- 
  229.  
  230.   Up until know, the idea that Red Ryder (and many other communications 
  231. programs) had a true command language was arguably farcical.  A command 
  232. language that cannot do real time polling and decision making based on 
  233. the user's input is at best a robotic tool rather than an intellectual one. 
  234.   I'd heard so many people talking about how CrossTalk XVI on the IBM-PC 
  235. was the program to beat as far as a "script" or command language that I 
  236. went out and bought a copy.  Surprise!  Red Ryder 8.0 already had it beat 
  237. by a mile.  At least I bought the damn thing on sale.  The difference 
  238. between Red Ryder 9.2 and other microcomputers communications
  239. software is a question of flexibility; it's like comparing a Jeep to a
  240. Railroad engine when you ask "where can I go with it"?  For a person who
  241. is ready for this kind of power, I've tried to keep the functionality (but
  242. admittedly a different syntax) close to the BASIC language to keep the
  243. learning curve short. 
  244.  
  245.   There are ten "string" and ten "numeric" variables available for your use
  246. in Red Ryder Procedures.  These variables are undefined (are considered to
  247. contain gargage or NIL values) at the startup of Red Ryder, but they do not
  248. lose their contents when a Procedure terminates.  String and numeric
  249. variables may be used in place of many Procedure command parameters,
  250. can be tested, modified, erased, or used to send messages or ask for
  251. information from the user. More on that later.  The way we refer to a
  252. string variable is with the ~ symbol (shifted version of the top leftmost
  253. key on the keyboard), followed by a number from 0 to 9. 
  254.  
  255.   In other words: 
  256.  
  257. TYPE ~4 
  258. would TYPE the characters contained in string variable number 4. 
  259.  
  260. Note that the command: 
  261. TYPE ~4^M 
  262. would not actually type the carriage return after the value contained in
  263. numeric variable 4.  Instead, you must break the command into: 
  264.  
  265. TYPE ~4 
  266. TYPE ^M 
  267.  
  268. A string variable may be up to 80 characters long - DO NOT TRY TO PUT
  269. MORE CHARACTERS THAN THAT INTO ONE OR YOU COULD CORRUPT OTHER
  270. STRING VARIABLES OR EVEN PROGRAM EXECUTION! 
  271.  
  272. Numeric variables can hold positive or negative values for values up to
  273. 1,000,000 in either direction.  They are specified by using the _`_
  274. character (the unshifted version of the '~' key). and that character is again
  275. followed with a number from 0 to 9.  In other words: 
  276.  
  277. TYPE `4 
  278. would convert the number held in numeric variable #4 to a string of
  279. characters (the number 53 would be converted to the string "53") and that
  280. string would be TYPEd to the modem.  There is an automatic conversion of
  281. a numeric variable to its string equivalent, but not the other direction.  In
  282. other words, if numeric variable #3 held the number 300 and you did a: 
  283. PAUSE `3 
  284. Red Ryder would actually convert variable `3 to a string of characters,
  285. then convert that back to a number for the PAUSE command to use.  
  286.  
  287. Here are some new Procedure commands for getting information in and out
  288. of string variables: 
  289.  
  290. COPYINTO stringvariable,string 
  291.  
  292. Function: "stringvariable" must be a string variable from ~0 to ~9, "string" 
  293. can either be a string variable a direct string of characters, or a numeric
  294. variable.  This commands copies the contents of "string" into
  295. "stringvariable". 
  296.  
  297. COPYINTO ~1,~2 
  298.  
  299. would copy the contents of variable 2 into variable 1. 
  300.  
  301. COPYINTO ~8,Hello World 
  302.  
  303. would copy the string "Hello World" into string variable 8. 
  304.  
  305. COPYINTO ~4,`2 
  306.  
  307. would convert the number in numeric variable 2 to a string of characters,
  308. and then copy that string of characters into string variable 4. 
  309.  
  310.  
  311. CONCAT stringvariable,string 
  312. Function: adds (makes a concatenation to) the contents of "string" which 
  313. may be either a direct string of characters or a string variable, to the 
  314. end of "stringvariable".  If the result would be more than 80 characters 
  315. long, the result is chopped to the leftmost 80 characters. 
  316.   If string variable number 1 contained the characters "HELLO" and string 
  317. variable number 2 contained the characters "THERE": 
  318. CONCAT ~1,~2 
  319. would _not_ change the contents of string variable 2, but string variable 
  320. 1 would contain "HELLOTHERE".  Similarly, you could have done: 
  321. CONCAT ~1,THERE 
  322. to achieve the same result. 
  323.  
  324.  
  325. ERASE stringvariable or ALL 
  326. Function: Clears out the contents of a single string variable or all string 
  327. variables. 
  328. ERASE ~3 
  329. would clear out the contents of string variable 3 only. 
  330. ERASE ALL 
  331. would clear out the contents of all 10 string variables. 
  332.  
  333.  
  334. SAVEVAR filename 
  335. Function: This command makes the limit of number of variables virtual 
  336. rather than arbitrary.  Have all 10 variables filled up but need another 
  337. 1 or 2 for some temporary stuff?  Use this command to save the current 
  338. string and numeric variables into a disk file "filename".  By doing this, 
  339. it's conceivable for a large Procedure to have 40-50 string variables in 
  340. use at once.  The contents of the string variables are not changed by this 
  341. command. 
  342.  
  343.  
  344. LOADVAR filename 
  345. Function: the opposite of SAVEVAR.  Loads back in a set of string and
  346. numeric variables saved to the file "filename" using a SAVEVAR command. 
  347.  
  348. Special Numeric Variable Commands 
  349. -------------------------------- 
  350.  
  351. LET EQUAL numvar,string 
  352. Function: Note there is a space between LET and EQUAL!  This simply
  353. assigns a value to the specified numeric variable "numvar".  The following
  354. examples illustrate: 
  355.  
  356. LET EQUAL `1,53 
  357. LET EQUAL `3,`4 
  358. LET EQUAL `8,~6 
  359.  
  360. ADD numvar,string 
  361. Function: this adds the value specified in "string" to the numeric variable
  362. specified in "numvar".  For example, if numeric variable 5 contains the
  363. value 75: 
  364.  
  365. ADD `5,25 
  366.  
  367. would leave numeric variable 5 holding 100. 
  368.  
  369. SUBTRACT numvar,string 
  370. Function: The converse of the ADD command, in that it subtracts the value
  371. specified by "string" from the numeric variable specified in "numvar". 
  372.  
  373. TEST numvar=string 
  374. TEST numvar>string 
  375. TEST numvar<string 
  376. Function: These 3 commands are used to test the numeric variable
  377. specified in "numvar" against the value specified by "string".  They test
  378. equality, "numvar" is greater than "string", and "numvar" is less than
  379. "string". in order as listed above.  All three set the YES/NO appropriately
  380. as to the true or false result of the test.  Note that there are no spaces
  381. between "numvar", the test operator (=, >, or <), and "string".  For example,
  382. if numeric variable 8 contains the value 25: 
  383.  
  384.  
  385. TEST `8=25 
  386. TEST `8>12 
  387. TEST `8<50 
  388.  
  389. would all set the YES/NO flag to "YES". 
  390. String variables can also be used to replace direct strings in many 
  391. Procedure commands.  Here's a list of those I know about that can use 
  392. string variables in ways that aren't documented elsewhere here.  
  393. There may be others, but these I know for sure. 
  394.  
  395. DO ~1 
  396. RUN ~1 
  397. DELETE ~1 
  398. RECA ~1 
  399. RECX ~1 
  400. RECK ~1 
  401. SENDA ~1 
  402. SENDX ~1 
  403. SENDK ~1 
  404. WRITE ~1 
  405. DIAL ~1 
  406. REDIAL ~1 
  407. PROMPT ~1 
  408. MACRO ~1 
  409. TYPE ~1 
  410. JUMPTO ~1 
  411. PAUSE ~1 
  412. ANSWERBACK ~1 
  413. LOADVAR ~1 
  414. SAVEVAR ~1 
  415. DEFINE MENU ~1 
  416. ADD TO MENU ~1 
  417. MENUDOES01 ~1 
  418. REDIAL LIMIT ~1 
  419.  
  420.  
  421. In the same manner, a numeric variable can be substituted in those above
  422. commands that expect a string of characters that evaluate to a numeric
  423. value. 
  424.  
  425.  
  426. THE TIME VARIABLE 
  427. ----------------- 
  428. There is also a variable used for keeping track of a certain starting time. 
  429. This variable doesn't have a typed name, but is used internally.  The 
  430. following commands will make that a bit clearer. 
  431.  
  432. SAVETIME 
  433. Function: This sets a "mark" in the internal time variable that will be 
  434. used to calculate elapsed time with the ELAPSED command. 
  435.  
  436. ELAPSED stringvariable 
  437. Function: This calculates the number of minutes that have elapsed since
  438. the last SAVETIME command has been executed (it will yield garbage if no 
  439. SAVETIME command has been executed previous to this one).  It converts
  440. that number to a string of characters and puts that string into the
  441. specified string variable.  Notice how this timing mechanism is
  442. independent of the elapsed time clock as displayed in the General and
  443. Macros Status bars.  You could do several SAVETIME and ELAPSED
  444. commands without resetting or changing the displayed timer. 
  445.  
  446. So you might do: 
  447.  
  448. SAVETIME 
  449. (and a few minutes later) 
  450. ELAPSED ~1 
  451. TYPE Elapsed time: 
  452. TYPE ~1 
  453. TYPE minutes. 
  454.  
  455. TIMEDATE stringvariable 
  456. Function: This command takes the current time of day and date, converts it 
  457. to a string in the format "MM/DD/YY HH:MM:SS" and puts it into the 
  458. specified string variable. 
  459.  
  460. FLAGS AND DECISION MAKING 
  461. -------------------------- 
  462. There are two flags that can be used to execute a specified procedure 
  463. command based on their state.  There is a YES/NO flag and an ERROR flag. 
  464. The ERROR flag is turned on or off for the disk I/O commands discussed 
  465. later.  The YES/NO flag is set according to tests made on a 
  466. string variable. 
  467.  
  468. EMPTY stringvariable 
  469. Function:  This sets the YES/NO flag to indicate whether or not the 
  470. specified string variable is empty. 
  471.  
  472. CONTAINS stringvariable,string 
  473. Function: This sets the YES/NO flag to indicate whether or not the 
  474. specified string variable contains "string".  Upper and lowercase are 
  475. significant!.  As usual, "string" can either be a directly typed string 
  476. or a string variable. 
  477.  
  478. ---------------- 
  479. If string variable 1 contained the characters "Hello World": 
  480. CONTAINS ~1,Goodbye 
  481. would set the YES/NO flag to "NO". 
  482. CONTAINS ~1,ell 
  483. would set the YES/NO flag to "YES". 
  484. CONTAINS ~1,ELL 
  485. would set the YES/NO flag to "NO" (wrong case!). 
  486. CONTAINS ~1,Hello World 
  487. would set the YES/NO flag to YES (which is a good test for "equals" rather 
  488. than just "contains"). 
  489.  
  490. ---------------- 
  491.  
  492. CONVUP stringvariable 
  493. Function: This command converts any lowercase letters in the specified
  494. string variable to upper case, and is useful after getting input from the
  495. user through a QUERY1 command before doing any CONTAINS tests on the 
  496. reply. 
  497.  
  498. Once the YES/NO flag is set by the appropriate test, you should use one of 
  499. the following commands to execute the desired Procedure command based
  500. on the results of that test. 
  501.  
  502. ?B# YES command 
  503. Function: Immediately executes the Procedure command "command" if the
  504. YES/NO flag is currently set to "YES".  An example might be: 
  505.  
  506. IF YES JUMPTO (YESROUTINE) 
  507. IF NO command 
  508. Function: Immediately executes the Procedure command "command" if the
  509. YES/NO flag is currently set to "NO". 
  510.  
  511. SETTING UP YOUR OWN DIALOG BOXES 
  512. --------------------------------- 
  513.  
  514.   Red Ryder 9.2 allows you to design and display your own dialog boxes as 
  515. part of a Procedure.  There are 3 types of dialog boxes that can be 
  516. displayed: 
  517.  
  518. 1) A dialog box that allows the user to type in up to 80 characters as a 
  519.    reply. 
  520.  
  521. 2) A dialog box with Yes and No buttons. 
  522.  
  523. 3) A dialog box with an OK button. 
  524.  
  525. The size and location of the dialog boxes are "hard-wired" into Red Ryder, 
  526. but you can (and must) specify what prompting or message text is to to be 
  527. displayed in the dialog box.  There are three lines of text that can be 
  528. put into the dialog box, not coincidentally, up to 80 characters per line. 
  529. When you execute one of the dialog box commands, it puts whatever
  530. characters are in string variable 7 into the topmost line, the characters
  531. contained in string variable 8 in the middle line, and the characters
  532. contained in string variable 9 in the bottom line.  If any of those variables
  533. are blank, so is the matching line of text in the dialog box (so you can do
  534. some primitive formatting and pretty-fying). 
  535.  
  536. QUERY1 stringvariable 
  537. Function:  Displays a dialog box with an editable text item of up to 80 
  538. characters, and a single OK button.  Whatever the user types into the 
  539. editable text item is copied into the specified "stringvariable" parameter 
  540. when the user clicks on the "OK" button.  Since there's no "Cancel" button, 
  541. an easy way to tell if the user wants to abort would be to do an EMPTY 
  542. test on the resulting "stringvariable".  You may also wish to validate that 
  543. the input was appropriate using various CONTAINS tests. 
  544.  
  545. QUERY2 
  546. Function: Displays a dialog box with a single "OK" button.  Not used to 
  547. gather input, but just let the user know something. 
  548.  
  549. QUERY3 
  550. Function: Displays a dialog box with a "Yes" button and a "No" button. This 
  551. command sets the YES/NO flag depending on which button the user clicks
  552. on to get out of the dialog box.  You could then do an IF YES and/or IF NO 
  553. command based on that input. 
  554.  
  555. DISK FILE INPUT/OUTPUT COMMANDS 
  556. -------------------------------- 
  557.    
  558.   If you thought all that stuff was good, you ain't seen nuthin' yet.  Red 
  559. Ryder 9.2 now has the ability to read and write disk text files.  Sound 
  560. simple? - heh, heh.  What it means as far as horsepower is concerned is 
  561. such Procedures as: 
  562. 1) Batch uploading, downloading, and message sending Procedures, where
  563. you specify the batch through a text file or dialog box entry. 
  564. 2) Procedures that look for "settings" files, and which can create or 
  565. change current settings or options. 
  566. 3) Procedures that can use simple input from the user through dialog boxes 
  567. to generate and execute huge and complicated Procedures for the novice. 
  568. {4) Procedures that keep a "log file" of things that happened during 
  569. execution of an unattended Procedure. 
  570. 5) Self-modifying Procedures (kinda reminds me of the CoreWars game) 
  571. based on inconsistant host entry (sometimes I have mail waiting,
  572. sometimes I don't). 
  573. 6) The ability to write your own Procedure language, with translation to 
  574. equivalent Red Ryder Procedure routines.  In other words, a 
  575. picker/parser/mini-compiler. 
  576.  
  577.   There are two user "paths" that may be open at one time.  They are known 
  578. as path 1 and path 2.  When you open a file for reading or writing, you 
  579. assign it one of the unused paths.  When you close a file, that path then 
  580. becomes available for use with another file.  In other words, you can have 
  581. up to two file open for reading and writing at the same time.  All paths 
  582. are closed at the termination of a Procedure file. 
  583. USEROPENI path,filename 
  584. Function: Opens "filename" using path number "path" for Input (that's an 
  585. "eye" at the end of USEROPEN).  Input means that you'll be using only 
  586. USERREAD commands with that path.  If the file doesn't exist, the ERROR 
  587. flag is turned on, otherwise, it's turned off. 
  588.  
  589. USEROPENO path,filename 
  590. Function: Opens "filename" using path number "path" for Output (that's an 
  591. "oh" at the end of USEROPEN).  Output means that you'll be using only 
  592. USERWRITE and USERWRCR commands with that path.  If "filename" already 
  593. exists, it will be destroyed and recreated as an empty file by this
  594. command. 
  595.  
  596. USEROPENA path,filename 
  597. Function: Opens "filename" using path number "path" for Append (that's an 
  598.  - ah hell...)  Append means that if the file doesn't exist, it will be 
  599. created as a new and empty file.  If it does exist, any further USERWRITE 
  600. or USERWRCR commands will be done at the end of the file, so previous
  601. data is not destroyed. 
  602.  
  603. USERREAD path,stringvariable 
  604. Function: The procedure disk I/O commands are meant to be used with text 
  605. files that have lines that are a maximum of 80 characters long each and 
  606. end with a carriage return.  This command reads data from path number
  607. "path" up to a carriage return, and puts that data into the specified string 
  608. variable.  If the read is unsuccessful (most likely tried to read past the 
  609. end of the file) the ERROR flag is turned on, otherwise it's turned off. 
  610.  
  611. USERWRITE path,string 
  612. Function: Writes the data in "string", which may be either a string 
  613. variable or a direct string of characters to path number "path".  It _does 
  614. not_ write a carriage return at the end of that data!  If the write was 
  615. unsuccessful (path hasn't been opened, disk full, etc.), the ERROR flag 
  616. is turned on, otherwise, it's turned off. 
  617.  
  618. USERWRCR path 
  619. Function: Writes a single carriage return to path number "path", effectively 
  620. terminating a line for later input by the USERREAD command. 
  621.  
  622. USERCLOSE path 
  623. Function: Closes path number "path" and makes that path available for a 
  624. {USEROPENI, USEROPENO, or USEROPENA command.  If the path is not
  625. currently open, this command does nothing - so use it if you're at a place
  626. in your Procedure where you're not sure if a path is in use or not. 
  627.  
  628. IF ERROR command 
  629. Function:  If the ERROR flag was turned on by the last Disk I/O Procedure 
  630. command, the Procedure command "command" is immediately executed. 
  631. Otherwise, if the ERROR flag is not turned on, this command does nothing. 
  632. Very useful for testing to see if a file exists, when reading a file 
  633. which has an unknown length, or when writing a file with an unknown
  634. amount of free space on the disk available. 
  635.  
  636. CREATING YOUR OWN MENUS 
  637. ----------------------- 
  638.  
  639. Red Ryder 9.2 gives you the opportunity to create your own customized 
  640. pull down menu that can be used to send the contents of a macro key, 
  641. execute a Procedure File, or execute a certain Nautilus function (you 
  642. don't know about that yet).  You have complete control of how your 
  643. menu is named and it's contents.  Your menu can contain up to 20 menu 
  644. choices. 
  645.  
  646. DEFINE MENU name 
  647. Function:  This gives your menu a name.  I highly recommend you do a 
  648. MENU OFF command before executing this command to be sure any
  649. previously defined menu is disposed of before the new one is defined.  Note
  650. that this just creates the menu in memory - it does _not_ display the
  651. menu in the menu bar.  Once you've done this command, you'll do some ADD
  652. TO MENU and MENUDOES commands to define the contents, appearance, and
  653. functions of the menu choices, and then do an ENABLE MENU to display the
  654. menu in the menubar and make it choosable by the user. The "name"
  655. parameter is the menu's title that will appear in the menu bar when 
  656.  
  657. menu is enabled. 
  658.  
  659. ADD TO MENU string 
  660. Function:  This adds a menu choice to the menu you've defined.  It's added 
  661. after any existing commands. There is no way to insert a command before 
  662. others or delete individual commands, so choose the order you use this 
  663. command with forethought.  The "string" item contains the text that will 
  664. appear in the menu choice with one notable exception.  Certain special  
  665. characters in "string" are used to affect the appearance of the menu 
  666. choice, so be careful about using non-alphanumeric characters. 
  667.   You will probably never use hardly any of the following poop (except  
  668. maybe the dividing line thingy), and some of it is pretty obtuse, but I'll 
  669. document it here (but probably not in the final docs) so you can play with 
  670. it and show people all kinds of "betcha didn't know" magic later. 
  671.  
  672. The special characters are ^ ! < / and ( and here's what they do: 
  673.  
  674. ^char  - This will display an icon (which one is according to char) 
  675.    to the left of the menu choice.  Unless you want to go digging through 
  676.    Red Ryder to see what menu ICON resources are defined and available,  
  677.    don't fool with this (right....).  An interesting thought occurred to 
  678.    me however, but I haven't tried it.  You could actually make your own 
  679.    ICON resources, using resource ID numbers not used by RR for its menu 
  680.    ICONs and use ResEdit to then paste your menu ICON resources into your 
  681.    Procedure file.  It would then be availble for use with this sort of 
  682.    command.  Hmmmmm...   
  683.  
  684.      This is hacker city time.  What happens is that menu icons are given 
  685.    the reserved ICON resource numbers from 257 to 511. Putting a '1' as 
  686.    "char" in the "string" item means use ICON resource number 257.  Putting 
  687.    a '2' means use ICON resource number 258, and so on up the ASCII chart. 
  688.    You can follow an ASCII chart upwards from there to find out what other 
  689.    "char" values would correspond to, should you have the inclination. 
  690.  
  691. !character  - Puts "character" to the left of the menu choice.  There ain't 
  692.    no way to remove it once it's there, and good luck typing in a checkmark. 
  693.  
  694. <style  - The menu item has a special character style.  The "style" item is 
  695.    one of the following (shown with the < character): 
  696.             <B   - boldfaced 
  697.             <I   - italicized 
  698.             <U   - underlined 
  699.             <O   - outlined 
  700.             <S   - shadowed 
  701.    I don't know that there's any reason more than one style couldn't be 
  702. used, but let's keep this thing under control, eh? 
  703.  
  704. /key  - keyboard equivalent.  Sorry, unless you want to some ResEdit
  705. hacking, I don't recommend you try to take advantage of this. 
  706.  
  707. (    - item is disabled.   Many Mac menus have a dividing line of 
  708.   disabled hypen characters.  To put one of those in your menu, you would 
  709.   use the special command: 
  710.  
  711. used, but let's keep this thing under control, eh? 
  712. ADD TO MENU (- 
  713.  
  714. As another example, the command: 
  715. ADD TO MENU This is a choice<O<U^ 
  716. That command would put a disabled row of hyphen characters across the
  717. width of your menu. 
  718.  
  719. MENUDOESxx number 
  720. Function:  This command defines exactly what your menu choices do when 
  721. they are selected.  The "xx" part of the command is a number from "01" to 
  722. "20" (the leading zero _must_ be there for numbers less than 10) that 
  723. corresponds to a menu choice (01 being the topmost menu choice and 20
  724. being the bottommost menu choice).  The "number" part of the command is
  725. a number from 0 to 29 (leading zero not necessary but doesn't hurt) that
  726. corresponds to a macro key number to execute when that menu choice is
  727. selected.  Since there are 3 sets of 10 macros keys each, the "number"
  728. parameter works like this: 
  729.  
  730. number      Macro Key Set/Key# 
  731. ------       ------------------ 
  732.   0             Set 1/Key 0 
  733.   1             Set 1/Key 1 
  734.   2             Set 1/Key 2 
  735.   . 
  736.   . 
  737.   9              Set 1/Key 9 
  738.  10             Set 2/Key 0 
  739.  11             Set 2/Key 1 
  740.  12             Set 2/Key 2 
  741.   . 
  742.   . 
  743.  19             Set 2/Key 9 
  744.  
  745.  20             Set 3/Key 0 
  746.  21             Set 3/Key 1 
  747.  22             Set 3/Key 2 
  748.   . 
  749.   . 
  750.  29             Set 3/Key 9 
  751.  
  752. I'll leave you to fill in the blanks if it doesn't look clear at first 
  753. glance (in which case the rest of this document must seem a total blur). 
  754.    
  755. When a macro key is executed through a menu choice, and that key is not 
  756. in the "active" set (the set that is displayed in the Macros Status Bar 
  757. and can be sent with COMMAND-0 to COMMAND-9), the set containing the 
  758. selected macro key is made active, and the Macros Status Bar is updated 
  759. to reflect that if it's being displayed. 
  760.  
  761. INSERT MENU 
  762. Function: This command is done after all of the menu items have been
  763. added to the menu, it simply draws the menu in the menu bar in an enabled
  764. state. 
  765.  
  766. ENABLE MENU number 
  767. Function: After any DISABLE MENU command, this command can be used to
  768. enable any menu item (if number is from 1 to 20) or the entire menu 
  769. number is zero. 
  770.  
  771.  
  772. DISABLE MENU number 
  773. Function: This command can be used to disable (make gray and
  774. unselectable) any menu item (if number is from 1 to 20) or the entire 
  775. menu if number is 0.
  776.  
  777. MENU OFF 
  778. Function: This disables the defined menu, removes it from the menu bar,
  779. and wipes it out of memory.  If there is no defined menu, this command 
  780. does nothing.  User-defined menus are _not_ removed or disabled when a 
  781. Procedure terminates - they stay on the menubar until a MENU OFF
  782. command is executed.  Therefore, it's a _real_ good idea to put a MENU OFF
  783. command before any DEFINE MENU commands to wipe out any old
  784. user-defined menu. 
  785.  
  786.   Since I have not yet publically stated the following, it's time I do so.  Any
  787. Procedures you write are your intellectual property, and can be sold, given
  788. away, copyrighted, etc. without any license or permission necessary from
  789. the FreeSoft Company. 
  790.