home *** CD-ROM | disk | FTP | other *** search
/ Carousel Volume 2 #1 / carousel.iso / comdore / 64apps / diverkey.bny / KINST < prev    next >
Text File  |  1987-03-27  |  39KB  |  1,143 lines

  1.                     Diversi-Key(tm)
  2.                     By Bill Basham
  3.                Copyright 1987 DSR, Inc.
  4.                   Version 0.3 (test)
  5.                      INSTRUCTIONS
  6.  
  7. PLEASE COPY THIS DISK AND GIVE IT TO EVERYONE YOU KNOW!
  8.  
  9. It is legal to copy and distribute this disk.  However, to legally
  10. use the Diversi-Key program on this disk, you must send payment
  11. within 2 weeks.  Please send $45 directly to:
  12.  
  13.  DSR, Inc.
  14.  34880 Bunker Hill
  15.  Farmington, MI 48018-2728
  16.  
  17. You will receive a user support number, and a new disk with the
  18. latest version of Diversi-Key.  Your honesty will help us distribute
  19. future programs in this same, low-cost way.
  20.  
  21. ********
  22. INTRODUCTION
  23. ********
  24.  
  25. Diversi-Key is a keyboard macro utility for the Apple //gs, which can
  26. be used to automate the keyboard input for most programs which run on
  27. the //GS.
  28.  
  29. You install Diversi-[ey permanently into the //gs expansion memory,
  30. where it stays available while you run other programs (such as
  31. Appleworks).  Your other programs run normally, until you activate
  32. Diversi-Key by holding down the "option" key on the //gs keyboard.
  33.  
  34. While holding down the option key, the next keys you press are
  35. interpreted as a "Macro" call.  When you call a macro, Diversi-Key
  36. takes over your keyboard, and rapidly types a pre-defined sequence of
  37. keystrokes for you.  You'll find that Diversi-Key greatly increases
  38. the power and utility of your other programs.
  39.  
  40. When you hold down the option key, your program will pause
  41. temporarily, and resume when you let the option key up.  You can
  42. press the option key to stop the program any time, i.e.  to read a
  43. screen message which is scrolling by.  Whenever the option key is
  44. down, you will see an inverse "K" in the upper right corner of the
  45. text screen (when in text mode only).
  46.  
  47. Diversi-Key requires an Apple //gs with at least 512K.  The Apple
  48. //gs comes with 256K, so you must buy a memory card with at least
  49. 256K, which plugs into the //gs memory expansion slot.
  50.  
  51. ********
  52. INSTALLATION
  53. ********
  54.  
  55. Diversi-Key is installed automatically when you boot the Diversi-Key
  56. disk.  You only boot this disk once, at power on.  The Diversi-Key
  57. program is actually a binary file named "DIVKEY".  Diversi-Key may be
  58. installed under ProDOS or DOS 3.3 with:
  59.  
  60. BRUN DIVKEY
  61.  
  62. Once Diversi-Key is installed, it stays in memory permanently until a
  63. power off re-boot.  That is, Diversi-Key stays installed even if you
  64. reboot with open-apple-ctrl-reset.
  65.  
  66. ERRORS:  When you BRUN DIVKEY, you will hear a "beep" if the
  67. installation was unsuccessful.  The usual reason for this is that you
  68. tried to install Diversi-Key again, when it was already installed.
  69. You also get this error if you don't have a //gs memory expansion
  70. card, or if there is no memory available to install Diversi-Key.  If
  71. this occurs, try installing Diversi-Key from a power-off boot.
  72.  
  73. Note: To avoid the beep, POKE 0,0.
  74.  
  75. NO RESPONSE?  If Diversi-Key ever stops working, particularly after
  76. booting a new program, try pressing the "flush" key sequence:
  77.  
  78. open-apple_control_delete (Flush key sequence)
  79.  
  80. The Diversi-Key disk contains a pre-defined set of macros in a file
  81. names "MACRO", which are installed when you boot the DIversi-Key
  82. disk.  You can also install them from BASIC with:
  83.  
  84. BRUN MACRO
  85.  
  86. The Diversi-Key program comes on a 5.25 ProDOS floppy disk.  We
  87. recommend you boot this disk when you power on, to install
  88. Diversi-Key.  You can then boot from the 3.5 drive with "PR#5".
  89.  
  90. You can also use the Apple //gs system utility program to transfer
  91. all of the Diversi-Key files to a newly formatted 3.5 inch disk.
  92.  
  93. Note:  When using Diversi-Key with Diversi-Cache, you should install
  94. Diversi-Cache FIRST.
  95.  
  96. ********
  97. COLD REBOOT
  98. ********
  99.  
  100. You can remove Diversi-Key by turning the power switch off for 10
  101. seconds or so, but this will eventually wear out the switch.  You can
  102. simulate a power-off re-boot as follows:
  103.  
  104. 1.  Hold OPEN-APPLE_SHIFT_CONTROL keys down (3 keys).
  105. 2.  Press and release RESET key.
  106. 3.  Wait for 2 beeps.
  107. 4.  Release OPEN-APPLE_SHIFT_CONTROL keys.
  108.  
  109. This will remove Diversi-Key, and clear your Ramdisk (if any).
  110.  
  111. ********
  112. CALLING MACROS
  113. ********
  114.  
  115. Macros in Diversi-Key are numbered from 1 to 9999.  There are two
  116. tivfurunt ways to call the same macro.  You can call a macro by
  117. number by holding down the option key, and entering the macro number
  118. on the numeric KEYPAD.  This is called a "Keypad Macro".  You can
  119. also call a macro by holding the option key down, and pressing any
  120. keyboard key.  This is called a "Keyboard Macro".
  121.  
  122. ********
  123. KEYPAD MACROS
  124. ********
  125.  
  126. To call a keypad macro, hold the option key down and type the macro
  127. number on the numeric keypad.  The macro is triggered when you press
  128. the keypad <enter> key, or let up the option key.  Press the keypad
  129. <clear> key if0yu0mqku qn0errr> 0Dyvursi=Kuy0dysplqys q {eypad
  130. macro as [nnnn], where nnnn is a number from 1 to 9999.  Some keypad
  131. macros are:  [0124], [0001], [9047].
  132.  
  133. ********
  134. KEYBOARD MACROS
  135. ********
  136.  
  137. Triggering a keypad macro requires more than one keystroke, and
  138. numbers are hard to remember.  To get around these problems, you may
  139. also trigger macros with single-keystrokes on the KEYBOARD.  You do
  140. this by holding down the option key, and pressing any keyboard key,
  141. that is, any key not on the numeric keypad.  The macro is triggered
  142. immediately when you hit the keyboard key.  Be sure to let up the
  143. option key, to allow the program to continue after the macro is
  144. completed.
  145.  
  146. Diversi-Key displays a keyboard macro as:  [k], where "k" is any
  147. keyboard key.  Here are some keyboard macro examples:  [N], [$], [1].
  148. Note that [1] is a keyboard macro triggered by pressing "1" on the
  149. keyboard.  [0001] is a keypad macro, triggered by pressing "1<enter>"
  150. on the numeric keypad.
  151.  
  152. There are 96 possible keyboard macros, which correspond to keypad
  153. macros numbered from 0 to 95.  Each keyboard macro corresponds to its
  154. ASCII equivalent keypad macro.  For example, the "A" key is an ASCII
  155. 65.  Therefore [A] is the same as [0065].
  156.  
  157. Note that lowercase keyboard macros are converted to uppercase.  That
  158. is, [a] is the same as [A].  For keyboard keys with ASCII values from
  159. 96 through 127, subtract ASCII 32 to find the keypad equivalent
  160. (converts to lowercase).
  161.  
  162. Keypad macros [0096] to [0099] have no keyboard macro equivalent.
  163.  
  164. ********
  165. REDEFINING THE KEYBOARD
  166. ********
  167.  
  168. You can re-define the entire keyboard by entering:
  169.  
  170. [xx/]  where xx=0..99
  171.  
  172. That is, hold the option key down, enter a number from 0 to 99 on the
  173. numeric keypad, and press the numeric keypad "/" key.
  174.  
  175. When you do this, the keyboard macros will now correspond to keypad
  176. macros [xx00] to [xx95] instead of [0000] to [0095].
  177.  
  178. For example, when you enter [02/], then [A] triggers macro [0265]
  179. instead of macro [0065].
  180.  
  181. You can use this feature when you switch programs, since your macro
  182. definitions will be very specific to each program.  For example, you
  183. might enter [00/] for running Appleworks, and [01/] for programming
  184. in BASIC.  Thus, you can keep up to 100 sets of keyboard macro
  185. definitions in memory at one time, in each 32K macro file.
  186.  
  187. ********
  188. SPECIAL MACROS
  189. ********
  190.  
  191. Diversi-Key contains 100 pre-defined "special" macros, which are
  192. always available, and cannot be modified.  You call a special macro
  193. by holding the option key down, and entering a number from 1 to 99 on
  194. the numeric keypad.  Then, hit the keypad "."  to trigger the special
  195. macro (instead of <enter>).  Special macros are displayed as follows:
  196.  
  197. [nn.]  where nn=0 to 99
  198.  
  199. Special macro [00.] calls the "control panel".  If you hold the
  200. option key down, and hit the keypad "."  (without entering a number),
  201. the effect is the same as pressing OPEN-APPLE_CONTROL_ESCAPE.
  202.  
  203. Other special macros functions are described throughout these
  204. instructions.  For a list of all special macros, see the reference
  205. section.
  206.  
  207. ********
  208. BOOTING PRODOS FROM 5.25 DISKS
  209. ********
  210.  
  211. The ProDOS boot routine from 5.25 floppy disks fails if interrupts
  212. are active, as is the case with Diversi-Key.  If you boot your 5.25
  213. ProDOS disks with control-open-apple-reset, you won't have a problem.
  214.  
  215. However, to boot a ProDOS 5.25 disk with PR#6, you must first enter
  216. special macro [10.] to de-activate Diversi-Key.  When the disk
  217. finishes booting, press ctrl-open-apple-delete to re-activate.
  218.  
  219. This problem does NOT occur with 3.25 disk, hard disks, or DOS 3.3
  220. disks.
  221.  
  222. ********
  223. DEFINING A MACRO
  224. ********
  225.  
  226. You can define a new macro, or edit an existing macro definition at
  227. any time.  To define a keypad macro, enter the macro number on the
  228. keypad, followed by the keypad "=":
  229.  
  230. [nnnn=]  where nnnn=0..9999
  231.  
  232. To define a keyboard macro, hold the option key down, press the
  233. keypad "=", followed by the keyboard key you want to define.
  234.  
  235. [=k]  where k is any keyboard key
  236.  
  237. When you enter macro define mode, the current definition for this
  238. macro, if any, will appear on the top line of the screen.  The macro
  239. definition begins with:
  240.  
  241. [nnnn=k] where nnnn is keypad macro number you are defining, and k is
  242. its keyboard macro key equivalent (if any).  For example:
  243.  
  244. [0065=A]
  245.  
  246. You define the macro by typing it on the keyboard.  When finished,
  247. press the keypad <enter> key to accept, or the keypad <clear> key to
  248. cancel.  Note that the first time you press <clear> it clears any
  249. definition you have typed, if any.  Press <clear> again to exit macro
  250. define mode without changing anything.
  251.  
  252. While defining a macro, you can call another keyboard macro by
  253. holding the option key down when you press the keyboard key.  The
  254. status of the open-apple key (up or down), is saved in the macro
  255. definition, which is especially useful with Appleworks.
  256.  
  257. During the macro definition, the following keypad keys have special
  258. functions:
  259.  
  260. Keypad Key      Function
  261.  
  262.    *            Delete last character entered
  263.    -            Move cursor back 1
  264.    +            Move cursor forward 1
  265. <clear>         Cancel definition
  266. <enter>         Accept definition
  267.    =            End of macro definition, comments follow (optional)
  268.    /            Enter special macro functions
  269.  
  270. The keypad "/" key is used to enter keypad macro calls, special macro
  271. calls, and all the other special macro functions described later.  To
  272. call keypad macros enter:
  273.  
  274. /nnnn<return>   where nnnn is keypad macro number 1..9999
  275.  
  276. To enter a special macro call:
  277.  
  278. /xx.<return>    where xx is special macro number 00..99
  279.  
  280. ********
  281. SCREEN DISPLAY DURING MACRO DEFINITIONS
  282. ********
  283.  
  284. As you type your macro definition, each character is displayed on the
  285. top line of the screen.  If you hold the open apple key down while
  286. typing a character, the character appears as {k} where "k" is the
  287. character.  Open-Apple A is shown as {A}, for example.  Other display
  288. features are as follows:
  289.  
  290. [k]     keyboard macro call
  291. [nnnn]  keypad macro call
  292. [xx.]   special macro call
  293. <A>     control key / <A>..<Z>
  294. {A}     open apple key down
  295.  |      end of macro, beginning of comments
  296.  
  297. The arrow keys, tab, escape, delete, and return are printed as
  298. follows:
  299.  
  300. <left> <right> <down> <up> <tab> <esc> <del> <ret>
  301.  
  302. Combinations of keys produce the following, for example:
  303.  
  304. {<tab>} means open-apple-<tab> pressed
  305. [<tab>] call keyboard macro key <tab>
  306.  
  307. Other special functions are displayed between [ ] brackets as
  308. described later.
  309.  
  310. ********
  311. PRINTING MACRO DEFINITIONS
  312. ********
  313.  
  314. Diversi-Key has a very flexible way of displaying the definitions in
  315. your current macro file.  It types the definitions as a macro!
  316.  
  317. You can use this feature to type a list of all your macro definitions
  318. into a word processing file.  For example, to see all the built-in
  319. macro definitions, boot Appleworks and enter the word processor with
  320. an empty file.  Hold the option key down, and press the keypad "-"
  321. key twice:
  322.  
  323. This will type in the definitions for macros 1 to 9999 into your word
  324. processor, regardless of which word processor you are using.
  325.  
  326. In the following display options, the "-" key is the one on the
  327. keypad:
  328.  
  329. --      Displays all macro definitions
  330. -nnnn-  Displays all definitions starting with keypad macro nnnn
  331. nnnn-   Displays keypad macro nnnn only
  332. -k      Displays keypad macro "k"
  333. -<@>    <@> is ctrl-@ / Displays all current keyboard macros
  334.  
  335. Note:  Diversi-Key may pause for up to 12 seconds when displaying
  336. macros, as it searches for undefined macro numbers.
  337.  
  338. Comments:  You can put comments at the end of your macro definitions
  339. by pressing the keypad "=", followed by the comment.  When displaying
  340. comments, i.e.  with keypad --, Diversi-Key sends these comments as
  341. actual keystrokes.  That is, a <ret> in a macro definition is sent as
  342. the 5 characters, "<ret>", during display.  A <ret> in a comment, is
  343. sent as a real single keystroke carriage return, during display only.
  344. This allows you to send formatting commands in comments, to make them
  345. easier to read.  For example, the built-in comments all start with
  346. <ret> space, to indent them on the next line.
  347.  
  348. ********
  349. FLUSH: CTRL_OPEN-APPLE_DELETE :THE PANIC BUTTON!
  350. ********
  351.  
  352. If you trigger the wrong macro, or hit keypad -- by mistake,
  353. Diversi-Key may go merrily along typing bad keystrokes for some time.
  354. Fortunately, you can stop Diversi-Key at any time by typing the FLUSH
  355. key sequence.  To do this, hold down the control and open-apple keys,
  356. and then press the delete key.  Try this whenever Diversi-Key seems
  357. to be acting "stangely", i.e.  not working.
  358.  
  359. ********
  360. MACRO FILES
  361. ********
  362.  
  363. Diversi-Key macro files are saved on disk as binary files.  You then
  364. BRUN the file to load it into memory for use.  The Diversi-Key disk
  365. contains a standard file named "MACRO" which contains the pre-defined
  366. macro definitions for Appleworks (and other programs).  To load this
  367. file, enter:
  368.  
  369. BRUN MACRO
  370.  
  371. When you do this, the macro definitions on disk in the MACRO file
  372. will replace the current macros in memory.  However, you may keep up
  373. to 10 different macro files in memory at once, each with up to 9999
  374. macros in 32K memory.
  375.  
  376. Macro files in memory are numbered from 0 to 9.  Normally, you will
  377. only use file #0.  To switch to a new macro file number, hold the
  378. option key down, and press the keypad keys "=+n", where n is a keypad
  379. digit from 0 to 9.
  380.  
  381. For example, to load a second macro file named "MAC2" and still
  382. preserve the exisiting macros, enter
  383.  
  384. =+1    (keypad keys with option key down)
  385. BRUN MAC2
  386.  
  387. To switch back to the original macro file, enter "=+0" (keypad-option
  388. key down).
  389.  
  390. Finally, to release the memory allocated for the second macro file,
  391. if necessary, enter "=-*1" (keypad-option key down).
  392.  
  393. We anticipate that you may someday buy commercial programs with
  394. custom Diversi-Key macro files included.
  395.  
  396. ********
  397. SAVING MACRO FILES
  398. ********
  399.  
  400. You can save your current macros in a file, either under ProDOS or
  401. DOS 3.3.  To do this, you must first enter BASIC, and get to the
  402. Applesoft prompt, which is a:
  403.  
  404. ]
  405.  
  406. One way to do this is to choose "BASIC.SYSTEM" from the //GS program
  407. launcher or desktop.
  408.  
  409. When you see this prompt, enter special macro [1.][2.].  That is,
  410. hold the option key down, and press the 4 keypad keys "1.2."  without
  411. letting the option key up.
  412.  
  413. Diversi-Key will type the word "BSAVE" for you, and wait for you to
  414. enter a file name.  Type the name of the macro file you want to save,
  415. and hit <return>.  Diversi-Key will finish the BSAVE command for you.
  416. You may now reboot.  Under ProDOS, you can return to the launcher by
  417. typing "BYE<return>".
  418.  
  419. WARNING!!!!
  420.  
  421. Never enter [1.][2.] while executing a program.  Doing this will
  422. crash the program (and possibly the whole system).  Be sure you see
  423. the Applesoft prompt "]" before entering [1.][2.].
  424.  
  425. ********
  426. CONVERTING TO SYSTEM FILES
  427. ********
  428.  
  429. You can convert your macro files to system files, in order to load
  430. them from a menu manager program, as follows:
  431.  
  432. First CATALOG your disk and note the length of the MACRO file.
  433.  
  434. BLOAD MACRO,A$1000
  435. POKE 4098,0
  436. CREATE SMACRO,TSYS
  437. BSAVE SMACRO,A$1000,Lxxxxx   where xxxx is the length from the CATALOG
  438.  
  439. You can do this with any macro file, not just "MACRO".
  440.  
  441. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  442.                        Advanced Features
  443. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  444.  
  445. ++++++++
  446. TIME AND DATE
  447. ++++++++
  448.  
  449. As you know, the Apple //GS contains a built-in clock, which
  450. Diversi-Key can read.  Special macros [77.] through [99.] may be used
  451. to print the time and date in almost any format.  See the special
  452. macro reference list towards the end of these instructions for a
  453. description of each special macro function.
  454.  
  455. For example, to print the date, define a macro which contains the
  456. following special macro calls:
  457.  
  458. [99.] [93.],19[94.]
  459.  
  460. To print the current time, use the following in a macro definition:
  461.  
  462. [95.]:[96.] [91.]M
  463.  
  464. ++++++++
  465. COUNTER
  466. ++++++++
  467.  
  468. Macros [70.] through [74.] allow you to print an incrementing
  469. counter, up to 8-digits.  The counter starts out at "1".  Macro [70.]
  470. prints the current counter, and increments it.
  471.  
  472. You may set the counter directly from the keyboard by entering
  473. option-keypad nnnn+, shown as [nnnn+] in the reference.  To set the
  474. counter to 210, enter
  475.  
  476. 210+   (on keypad, option key down)
  477.  
  478. You can also set the counter from within a macro, with special macro
  479. function /C (/ is the keypad "/" key).  During a macro definition,
  480. enter:
  481.  
  482. /Cnnnnnnnn<ret>  where nnnnnnnn is 0 to 99999999
  483.  
  484. See the special macro function reference section below for more
  485. information.
  486.  
  487. ++++++++
  488. KEYBOARD INPUT DURING A MACRO
  489. ++++++++
  490.  
  491. Three different special macro functions allow you to stop in the
  492. middle of a macro, and enter keystrokes directly.  They are the /P,
  493. /K, and /S functions.
  494.  
  495. When you are defining a macro, enter /P to pause the macro execution
  496. at that point.  When you execute the macro, Diversi-Key will stop
  497. when it hits the /P function.  It continues as soon as you press any
  498. keyboard key.  The keyboard key is ignored.
  499.  
  500. /K is the same as /P, except the key you type is sent as part of the
  501. macro.
  502.  
  503. /S lets you type a series of keystrokes from the keyboard, in the
  504. middle of executing a macro.  The macro continues when you hit
  505. <return>.  The <return>0kuypruss ys0N_T0sunt.
  506. ?S{ 8wxere0"{"0is qny {eyboard key) is the same as /S, except the
  507. macro will continue when you press the "k" key, instead of the
  508. <return> key.
  509.  
  510. ++++++++
  511. DISPLAYING MESSAGES (PROMPTING)
  512. ++++++++
  513.  
  514. Special macro [15.] puts a message on the top line of the screen, or
  515. [16.] puts the message on the bottom line (text mode only).  Macro
  516. [14.] removes the message.
  517.  
  518. You define the message with the /D (display) function in a macro
  519. definition.  The display message may be up to 79 characters
  520. (80-column screen) or 39 characters (40-column screen).  You end the
  521. display message with open-apple delete, {<del>}.
  522.  
  523. Control keys in a display message are displayed as their
  524. corresponding mousetext (or flashing) characters.  {} keys
  525. (open-apple down) in a message are shown as inverse characters.
  526.  
  527. The display message overwrites whatever is on the screen> 0Txe0<te|>cxarastur0i~ q }essqgu wi|l0s{ip vur0o~e0ssrue~ shqrqcter, i.e.  not
  528. overwrite it.
  529.  
  530. An example use of a display message is as follows:
  531.  
  532. /D<return> {H}{i}{t}{ }{a}{n}{y}{ }{k}{e}{y}{<del>}[15.][Pause][14.]
  533.  
  534. This displays "Hit any key" in inverse letters on the top line of the
  535. screen, waits for a keypress, and removes the message (try this in
  536. 80-column mode for correct inverse lowercase).
  537.  
  538. ++++++++
  539. REPEAT FUNCTION
  540. ++++++++
  541.  
  542. The repeat function allows you to repeat part of a macro from 2 to
  543. 253 times.  You mark the beginning of the section to repeat with:
  544.  
  545. /Rnnn   where nnn=2..253
  546.  
  547. Then, enter the section you want to repeat.  Mark the end of the
  548. repeat section with the /E function.  For example, the following will
  549. type "HI " 5 times:
  550.  
  551. /R5<return>HI /E<return>
  552.  
  553. If you enter this as macro definition [<ret>] or [0013], the screen
  554. display shows this:
  555.  
  556. [0013=<ret>][A-Repeat:005]Hi [End-A]
  557.  
  558. The "A" in the Repeat and End functions signify nest level "A".
  559. Diversi-Key allows you to nest Repeats, as long as each Repeat has a
  560. corresponding End.  An example of this is:
  561.  
  562. [0013=<ret>][A-Repeat:002]Hey [B-Repeat:005]Hi [End-B][End-A]
  563.  
  564. When you execute this macro, it prints:
  565.  
  566. Hey Hi Hi Hi Hi Hi Hey Hi Hi Hi Hi Hi
  567.  
  568. ++++++++
  569. LIST FUNCTION
  570. ++++++++
  571.  
  572. The /L (LIST) function allows you to call a different macro each time
  573. it is executed.  The format is:
  574.  
  575. /Lxxx,nnnn
  576.  
  577. where "nnnn" is any starting keypad macro number 0..9999, and "xxx"
  578. is the number of keypad macros in the list.  For example /L3,1000 is
  579. displayed as:
  580.  
  581. [List:3,1000]
  582.  
  583. The first time this function is executed, it calls macro [1000].  The
  584. next time, it calls [1001], then [1002].  Since there are 3 macros in
  585. the list, it then goes back to [1000] again.
  586.  
  587. Macro [76.] sets a flag to reset the next list function executed, to
  588. the first macro in the list (sets list counter to 0).
  589.  
  590. The "/Z" (Zlist) function "zeros" all list counters until its
  591. corresponding "End" statement.
  592.  
  593. ++++++++
  594. IF/WHILE FUNCTIONS
  595. ++++++++
  596.  
  597. The IF/WHILE functions are for advanced programmers with assembly
  598. language experience.  The format of these functions is:
  599.  
  600. /Ixx/xxxx=yy   (IF)
  601. /Wxx/xxxx=yy   (WHILE)
  602.  
  603. Values are hexadecimal digits 0..9 or A..F (uppercase), where xx/xxxx
  604. is the bank and address to test, and yy is the byte to compare it
  605. with.  The "=" condition may be replaced with the following tests:
  606.  
  607. =       equal
  608. <>      not equal
  609. <=      less than or equal
  610. <       less than
  611. >=      greater than or equal
  612. >       greater than
  613. &       AND (true if xx/xxxx AND yy <>0)
  614. ~&      not AND
  615.  
  616. Each IF and WHILE statement must have a corresponding END statement.
  617. If the condition tests FALSE, then Diversi-Key skips to the END
  618. statement.
  619.  
  620. If the condition is TRUE, Diversi-Key continues executing right after
  621. the IF/WHILE statement, without skipping anything.
  622.  
  623. The WHILE statement repeats everything up to its END statement, as
  624. long as the condition is TRUE.
  625.  
  626. Since the IF/WHILE functions use absolute hexadecimal locations,
  627. you'll need to know the internals of the program you are using.  Some
  628. locations for Appleworks 2.0 are:
  629.  
  630. 00/10F1 =0 insert / <>0 strikeover cursor
  631. 00/10F5 character at cursor
  632. 00/0014 Horiz. cursor position
  633. 00/0015 Vert. cursor position
  634.  
  635. After Diversi-Key sends a character, the program may not have time to
  636. process it before the next IF/WHILE test.  This is because
  637. Diversi-Key is interrupt driven.  To be sure of an accurate test,
  638. then, the character sent immediately before the test must not affect
  639. the test.  It is useful to have a "dummy" character to send for this
  640. purpose, which does not affect the program.  In Appleworks, sending
  641. two open-apple E's, {E}{E}, has no effect, for example.
  642.  
  643. You can test some of the internal variables in Diversi-Key with the
  644. IF/WHILE statements.  To do this, you use an address in bank 7F, or
  645. start your comparison byte with a "?".
  646.  
  647. 7F/00xx   or  ?xx    xx = internal variable number
  648.  
  649. For example, special variable #12 is the "Tick Count", which
  650. increments every 1/60th second.  You can clear the tick count with
  651. [21.].  The following macro types "HI" 5 times, every 2 seconds.
  652.  
  653. [0095=<del>][A-Repeat:005][21.][B-While:7F/0012<78][Null][End-B]Hi [End-A]
  654.  
  655. Note that IF/WHILE statements may be nested, just like REPEAT.
  656.  
  657. The [Null] statement, entered as "/N", allows the program to continue
  658. executing during a REPEAT or WHILE loop which is not sending any
  659. keystrokes.  The [Null] forces Diversi-Key to return to the calling
  660. program for one interrupt cycle.
  661.  
  662. Note that the program will run very slowly while Diversi-Key is in
  663. this kind of loop.  You can speed up the program execution during a
  664. "null" loop with special macro [61.] before the start of the loop.
  665. This slows down the Diversi-Key interrupt rate (and also disables
  666. type-ahead during the macro).  To speed Diversi-Key back up to normal
  667. after the loop, use macro [60.].
  668.  
  669. ++++++++
  670. SLOWING DIVERSI-KEY DOWN / PROGRAM COMPATIBILITY PROBLEMS
  671. ++++++++
  672.  
  673. Diversi-Key sends its keystrokes just like you had typed them.  That
  674. is, they appear at $C000, the normal keyboard location.  This is how
  675. Diversi-Key can work with any program.
  676.  
  677. Unfortunately, some programs throw away keystrokes if you type too
  678. fast.  This is never necessary, but many programmers are in the habit
  679. of doing it.  Diversi-Key automatically corrects this problem in
  680. Appleworks 2.0, and Pascal 1.3, by patching these programs in memory
  681. when they appear.
  682.  
  683. For other programs, your only hope is to slow down Diversi-Key,
  684. (unless you can figure out how to patch them).  Macros [61.] through
  685. [67.] slow down Diversi-Key ([67.] is slowest), and macro [60.]
  686. restores normal speed.
  687.  
  688. Note that when you slow down Diversi-Key, you lose the ability to
  689. type ahead during a macro.  Diversi-Key automatically slows down when
  690. you enter the control panel, so that's why you can't type ahead
  691. there.
  692.  
  693. This problem only shows up with machine language programs, so if you
  694. know some machine language, you can try to patch the problem away.
  695. Typically, the problem is caused by clearing the keyboard strobe at
  696. $C010 unecessarily, usually as follows:
  697.  
  698.         LDA $C010  (NOT NEEDED, CHANGE TO NOP/NOP/NOP)
  699. GETKEY  LDA $C000
  700.         BPL GETKEY
  701.         STA $C010 (NEEDED)
  702.  
  703. You can use the //GS monitor to find references to $C010 as follows:
  704.  
  705. BLOAD program
  706. CALL -151
  707. \10 C0\<800.9600P
  708.  
  709. ++++++++
  710. USING THE MOUSE
  711. ++++++++
  712.  
  713. Diversi-Key allows you to program your mouse to send macro
  714. keystrokes.  You activate the mouse with the special macro:  [51.]
  715.  
  716. With the mouse activated, you can send a total of 10 different macros
  717. from the mouse.  When the program starts, the mouse movements will
  718. send the following macros:
  719.  
  720. With mouse button up:
  721. [<P>] left mouse motion
  722. [<Q>] right mouse motion
  723. [<R>] down mouse motion
  724. [<S>] up mouse motion
  725. [<T>] sent when mouse button goes from down to up
  726.  
  727. With mouse button down:
  728.  
  729. [<V>] left mouse motion
  730. [<W>] right mouse motion
  731. [<X>] down mouse motion
  732. [<Y>] up mouse motion
  733. [<Z>] sent when mouse button goes from up to down
  734.  
  735. You can re-assign these mouse macros with the /B (BMOUSE) and /M
  736. (MOUSE) special functions.  For example:
  737.  
  738. /B/<A> will assign the mouse button down macros to be [<A>} through
  739. [<E>].  /M/<A> does the same for the mouse button up.
  740.  
  741. /B1000 will assign the mouse button down macros to be keypad macro
  742. numbers 1000 to 1004, and similarly for /M1000.
  743.  
  744. To use the mouse, first enter [51.] to enable it.  Then, hold down
  745. the option key, and move the mouse, or press the mouse button.  The
  746. mouse is only active when the option key is down.
  747.  
  748. While holding the option key down, you can press the control key to
  749. enable the one way mouse function.  With the control key down, mouse
  750. left-right motion is ignored.  With the control key up, mouse up-down
  751. motion is ignored.  If you prefer, you can use the control key to
  752. convert mouse left/right motion into up/down motion.  Enter [54.] to
  753. enable this feature.
  754.  
  755. You can lower the mouse sensitivity with [55.] for horizontal, or
  756. [56.] for vertical.  You can enter these macros up to 255 times for
  757. minimum sensitivity (use repeat function).
  758.  
  759. Macro [57.] insruases the ability of the mouse to type ahead.  Each
  760. time you call [57.], can typeahead one more macro call.  You can
  761. increase typeahead 255 times.
  762.  
  763. If you define mouse motion to do cursor movement keystrokes, then the
  764. typeahead behaves as follows:
  765.  
  766. With no typeahead, the cursor moves in the same direction the mouse
  767. moves.  When you stop mouse movement, cursor movement stops.  If you
  768. move the mouse faster than the cursor can follow, nothing changes.
  769.  
  770. With full typeahead, the mouse can get ahead of the cursor.  If you
  771. move the mouse rapidly, the cursor will eventually catch up to the
  772. mouse.  The cursor keeps moving after you stop moving the mouse.
  773. With typeahead, the location of the mouse on the table corresponds to
  774. the location the cursor will eventually reach on the screen.
  775.  
  776. After you start moving the mouse, you can no longer trigger macros
  777. from the keyboard.  You'll notice that the inverse "K" in the upper
  778. right corner disappears during mouse movements.  Let up the option
  779. key for an instant to get the "K" to re-appear, and allow macro
  780. triggering from the keyboard again.  This feature is included to
  781. avoid pausing the program during mouse movements.
  782.  
  783. When using the mouse for a long time, you can enter [45.] to change 
  784. the "trigger" key to <caps lock>, to avoid of having to hold down the
  785. <option> key all the time.  To cancel, enter [40.].
  786.  
  787. With Diversi-Key, the mouse becomes an extremely flexible tool which
  788. can be used in any program, if desired.
  789.  
  790. =================================================================
  791.                    OTHER INFORMATION
  792. =================================================================
  793.  
  794. *** Licensing Information ***
  795.  
  796. Although Diversi-Key is copyrighted, DSR allows copying and
  797. distribution of the program subject to the following restrictions:
  798.  
  799. 1.  Anyone receiving a copy of Diversi-Key must send a $45 license
  800. fee directly to DSR, Inc.  within 2 weeks.
  801.  
  802. 2.  Any company, club, or individual may charge up to $5.00 for
  803. distributing copies of Diversi-Key, provided it is clear that an
  804. additional $45 fee must be sent directly to DSR.
  805.  
  806. Publishers:
  807.  
  808. Unlike Diversi-DOS and Diversi-Cache, we do not license Diversi-Key
  809. to be included with other programs.  However, we do encourage you to
  810. include a custom Diversi-Key macro file on your disks, specific for
  811. your program.  We hope you will recommend that your customurs rter
  812. Tiversi-Key directly from us, in order to use this file.
  813.  
  814. Multiple Computers:
  815.  
  816. Each additional computer license fee is $45, up to a maximum of $250
  817. for all the computers owned by a company (or school district).
  818.  
  819. *** User Support ***
  820.  
  821. Your user support number entitles you to talk directly to the
  822. programmer, Bill Basham.  Please write if possible, or call:
  823.  
  824. 313 553-9460 between 3 and 5 PM Eastern time.
  825.  
  826. *** Diversi-Cache ***
  827.  
  828. Diversi-Cache dramatically increases the I/O speed of the Apple Disk
  829. 3.5, under any operating system (ProDOS, Pascal, DOS 3.3).
  830. Diversi-Cache speeds up the Disk 3.5 in two ways.  First of all,
  831. whenever the system reads a block, Diversi-Cache actually reads an
  832. entire track.  This triples the speed of disk reads, and doubles the
  833. speed of ProDOS writes.
  834.  
  835. Secondly, Diversi-Cache allows you to allocate a cache memory buffer
  836. from 0 to 800K in size.  Whenever the system reads a block,
  837. Diversi-Cache saves it in the cache buffer.  If the system asks for
  838. this block again, it comes out of memory at "Ramdisk" speed.
  839. Diversi-Cache only speeds up the Apple Disk 3.5 designed for the
  840. Apple //gs, and will not affect the speed of the older Apple //c
  841. compatible UniDisk 3.5.
  842.  
  843. *** Diversi-Copy ***
  844.  
  845. Diversi-Copy(tm) is the fastest and easiest way to make back-up
  846. copies of your 3.5 and 5.25 disks.  Diversi-Copy will use all
  847. available memory in an Apple //gs, //e, //c, or II+ compatible to
  848. allow 1-pass copying with a single drive.
  849.  
  850. Diversi-Copy was chosen as inCider magazine's "Editors' Choice".  It
  851. is the best copy program available, for both 5.25 and 3.25 drive
  852. copying.
  853.  
  854. *** How to Order ***
  855.  
  856. To order, please send your check to:
  857.  
  858. DSR, Inc.
  859. 34880 Bunker Hill
  860. Farmington, MI 48018-2728
  861.  
  862. The cost of our programs is as follows:
  863.  
  864. Diversi-DOS     $30
  865. Diversi-Copy    $30
  866. Diversi-Cache   $35
  867. Diversi-Key     $45
  868.  
  869. We only sell our programs by mail-order, and will notify you of
  870. future program updates which you may purchase for $5 each.
  871.  
  872. -----------------------------------------------------------------
  873. REFERENCE
  874. -----------------------------------------------------------------
  875.  
  876. --------
  877. CONVERTING DIVKEY TO A SYSTEM FILE
  878. --------
  879.  
  880. You can convert Diversi-Key to a system file, so you can run it
  881. directly from a menu selection program.  To do this, first run
  882. BASIC.SYSTEM.  Then CATALOG the Diversi-Key disk and note the length
  883. of the DIVKEY file.  Then, enter the following:
  884.  
  885. CREATE SDIVKEY,TSYS,A$2000
  886. BLOAD DIVKEY
  887. BSAVE SDIVKEY,TSYS,A$2000,Lxxxxx   (where xxxxx is length of DIVKEY file)
  888.  
  889. --------
  890. MOVING DIVKEY TO DOS 3.3
  891. --------
  892.  
  893. First, boot DOS 3.3 and format a disk with:
  894.  
  895. INIT HELLO
  896.  
  897. Then, boot ProDOS again and enter:
  898.  
  899. BLOAD DIVKEY
  900. Put in your new DOS 3.3 formatted disk
  901. PR#6
  902. BSAVE DIVKEY,A$2000,Lxxxxx (where xxxxx is length of DIVKEY file).
  903.  
  904. --------
  905. USING DIVERSI-KEY: SUMMARY
  906. --------
  907.  
  908. Executing a macro: Hold down option key and enter:
  909.   [] means keypad keys 
  910.  
  911. [nnnn]  let up option key executes macro nnnn
  912. [nnnn<enter>] executes macro nnnn  1..9999
  913. [nn.]   executes special macro nn 0..99
  914. [nn/]     assigns macro's nn00 to nn95 to keyboard keys
  915.         nn= 1..99
  916.         nn00..nn95 ASCII keys 0..95 (upper/lowercase)
  917.         nn95 = ascii 127 = delete
  918. [cccc+] sets counter to value cccc 0.9999
  919. [nnnn-]  send definition for keypad macro nnnn
  920. [-]k     send definition for keyboard macro k
  921. [-<@>]   send definitions for all keyboard macros A..Z etc.
  922. [-nnnn-] send definitions for macro's nnnn..9999
  923. [--]     send definitions  for ALL macro's 0001..9999
  924.        use these to type macro definitions into a word processor
  925.        for review and later editing
  926.  
  927. --------
  928. DEFINING MACROS
  929. --------
  930. Start definition:       [] means keypad keys
  931.  
  932. [nnnn=] defines keypad macro nnnn
  933. or
  934. [=]k  defines option-k macro where k is keyboard key
  935.  
  936. During <definition>
  937.  
  938. Start with old definition on screen
  939.  
  940. [-] means backspace
  941. [+] means forward space
  942. [*] means delete (as in Appleworks)
  943. [clear] means cancel definition
  944. [enter] means accept definition
  945. [k] means call nested macro for keyboard key "k"
  946. [=] means end of macro, start of comments
  947. [/] means call special function
  948.   end with [enter]
  949.  
  950. --------
  951. SPECIAL FUNCTIONS
  952. --------
  953.  
  954. /nnnn   call nested macro nnnn
  955. /nn.    call special macro nn.
  956. /K      enter and send keystroke
  957. /P      pause until keystroke, ignore it
  958. /S      enter string until <ret> hit / don't send <ret>
  959. /S<key> enter string until <key> hit / don't send <key>
  960. /Rnnn   repeat nnn times, nnn=2..254
  961. /Wbb/aaaa=tt   While conditional
  962. /Ibb/aaaa=tt   If conditional / values are HEX
  963. /E      end / for Repeat,If,While
  964. /N      null
  965. /Cnnnnnnnn     set counter (8 digits)
  966. /Lxxx,nnnn     do xxx macro's in list starting with macro nnnn
  967.             xxx=1..255 / nnnn=1..9999
  968. /Z      zero list counters
  969. /Mnnnn  Mouse button up macros start with [nnnn]
  970. /Bnnnn  Mouse button down macros start with [nnnn]
  971. /M/k    Mouse button up macros start with [k]
  972. /B/k    Mouse button down macros start with [k]
  973. /D      Begin display message / end with {<del>}
  974.  
  975. Special IF/WHILE conditions.
  976.  
  977. Address: 7F/00xx        Test special location xx
  978. Compare byte: ?xx
  979.  
  980. ?0   CVAL: Value at last IF/WHILE address
  981.  Macro [75.] moves CVAL to CVAL1 / CVAL1 to CVAL2 / CVAL2 to CVAL3
  982. ?1   CVAL1
  983. ?2   CVAL2
  984. ?3   CVAL3
  985. ?4   MOUSE / <>0 means mouse is ON
  986. ?5   Y sensitivity
  987. ?6   X sensitivity
  988. ?7   MRPT  typeahead amount for mouse
  989. ?8   FFLAG  format flag byte / default is 0 / bits ON as follows:
  990.    80- UPPER CASE
  991.    40- 24-Hour Clock
  992.    20- Lead space
  993.    10- Abbrev. ASCII month/weekday
  994.    8 - Lead 0 or Space ON
  995. ?9   STACKP stack pointer / >0 means nested macro
  996.  The following are set with [20.] macro
  997. ?A   WEEKDAY / 1-SUN 1..7
  998. ?B   MONTH-1 0..11
  999. ?C   DAY-1 0..30
  1000. ?D   YEAR 0..99
  1001. ?E   HOUR 0..23
  1002. ?F   MIN 0..59
  1003. ?10  SEC 0..59
  1004. ?11  OLDMOD / C025 register before last macro keystroke sent
  1005. ?12  TICK count low byte / 60 HZ increment
  1006. ?13  TICK count hi byte
  1007. ?14  KGOT / Hi bit is OA status / Last key pressed during /S,/K or /P
  1008.  
  1009. --------
  1010. DISPLAY DURING MACRO DEFINITION
  1011. --------
  1012.  
  1013. <left>  ctrl-H
  1014. <tab>0 0ctr|-Y
  1015. <dw~>0 strl=J<up>    ctrl-K
  1016. <ret>   ctrl-M
  1017. <right> ctrl-U
  1018. <esc>   ctrl-[
  1019. <X>    ctrl-X or other ctrl keys
  1020.  
  1021. {A}     open-apple A
  1022. {<X>}    open-apple ctrl-X
  1023.  
  1024. [nnnn=k]        defining macro nnnn / which is keyboard key k
  1025. [nnnn]          call keypad macro nnnn
  1026. [nn.]           call special macro nn
  1027. [k]             call keyboard macro k
  1028. [Key]           insert keystroke
  1029. [Pause]         pause until keystroke
  1030. [String <ret>]  insert keystrokes until <ret>
  1031. [A-Repeat:12]   repeat 12 times / nest level A
  1032. [A-If 00/0000=00] IF conditional, nest level A
  1033. [A-While 00/0000=00]  WHILE REPEAT nest level A
  1034. [End-A]         END nest level A
  1035. [Count=cccccccc] set counter to cccc
  1036. [List:003,1000] alternate macro's 1000,1001,1002 
  1037. [A-Zlist]       Zero list counters until End-A
  1038. [Mouse:1000]    mouse macro [1000]
  1039. [Mouse:<V>]     mouse macro [<V>]
  1040. [Bmouse:1000]   mouse button down macro [1000]
  1041. [Display]       start of message to display / ends with {<del>}
  1042.  
  1043. |  end of macro definition, start of comments
  1044. --------
  1045. SPECIAL MACROS  call with [nn.]
  1046. --------
  1047. [01.] - Lead-in for [2.]
  1048. [02.] - 1.2. means BSAVE macro file / must be in BASIC ] mode
  1049. [10.] - 10. means turn off Diversi-Key. FLUSH keys turn back on
  1050.     May be needed before booting ProDOS on a 5.25 disk with PR#
  1051. [11.] - Turns on Diversi-Key again
  1052.     ALSO clears KGOT to 0 / last key pressed yn0mqcro[12>]0-0Tur~ so|or fv
  1053. [13.] - Turn color on
  1054. [14.] - Turn Prompting Display off
  1055. [15.] - Turn Display on / top line (set display message with /D)
  1056. [16.] - Turn Display on / bottom line
  1057. [20.] - Force new time computation
  1058. [21.] - Clear Tick Counter
  1059.  
  1060. [40.] - Option key triggers macro (normal)
  1061. [41.] - OA trigger
  1062. [42.] - Option-OA trigger
  1063. [43.] - Option-Shift trigger
  1064. [44.] - OA-Shift trigger
  1065. [45.] - Caps Lock trigger (Use for handicapped or easier mouse)
  1066. [46.] - Beeps ON
  1067. [47.] - Beeps OFF
  1068. [48.] - Sound Volume normal
  1069. [49.] - Sound Volume OFF
  1070.  
  1071. [50.] - MOUSE OFF
  1072. [51.] - Mouse on / max sens. / no typeahead / 2-way mode
  1073.         saves old mouse status FIRST
  1074. [52.] - Disable X (horizontal) mouse action
  1075. [53.] - Disablu Y
  1076. [54.] - Use X for Y with one-way mouse
  1077. [55.] - Decrease X sensitivity
  1078. [56.] - Decrease Y sensitivity
  1079. [57.] - Increase typeahead
  1080. [58.] - Restore old mouse status
  1081. [59.] - MOUSE SPECIAL MACRO / Don't use
  1082.  
  1083. [60.] - High-speed macros with typeahead / normal
  1084. [61.]to[67.] - Slow down macros /no typeahead / [67.] is slowest
  1085. [68.] - Allow interrupts during macro (normal)
  1086. [69.] - Disable interrupts during macro
  1087.  
  1088. [70.] - Print counter & INC
  1089. [71.] - DEC counter
  1090. [72.] - INC counter
  1091. [73.] - Clear counter to 1 / # dig to 0 (no leading 0's or spaces)
  1092. [74.] - INC # digits in counter (2..8) to give leading 0's or spaces
  1093. [75.] - Save CVAL to CVAL1, etc. (see IF/WHILE section)
  1094.  
  1095. [76.] - Reset next LIST pointer to first macro in list
  1096.  
  1097. [77.] - SAVE Format
  1098. [78.] - RESTORE Format
  1099. [79.] - RESET Format to defaults (* below)
  1100.  
  1101. Format options for time/date
  1102. [80.]*- Lead 0,Space OFF (*=default)
  1103. [81.] - Lead ON
  1104. [82.] - 0 lead char
  1105. [83.]*- Space lead char 
  1106. [84.]*- 12-Hour clock format
  1107. [85.] - 24-Hour clock format
  1108. [86.]*- Full ASCII weekday and month
  1109. [87.] - Abbrev. ASCII weekday and month
  1110. [88.]*- Send macros upper/lowercase
  1111. [89.] - Send all macros in upper case only
  1112.  Date and time macros / print current clock information
  1113.  Clock is read only when a macro is triggered manually
  1114.  Use [20.] to force clock re-read if needed
  1115. [90.]-Weekday, 1..7 / 1=Sunday
  1116. [91.]-A OR P (M)
  1117. [92.]-Month 1..12
  1118. [93.]-Day 1..31
  1119. [94.]-Year 0..99
  1120. [95.]-Hour 0..23 or 1..12
  1121. [96.]-Minute 0.59
  1122. [97.]-Second 0..59
  1123. [98.]-Weekday ASCII / i.e. "Sunday" or "Sun."
  1124. [99.]-Month ASCII /i.e. "January" or "Jan."
  1125.  
  1126. --------
  1127. Appleworks
  1128. --------
  1129.  
  1130. The file "MACRO" which installs automatically when you boot the
  1131. Diversi-Key disk, contains a set of pre-defined macros for use with
  1132. Appleworks 2.0.  Rather than list these macros here, we suggest that
  1133. you put them into an Appleworks file and use Appleworks to print them
  1134. out.  The macros are all commented, showing what each one does.
  1135.  
  1136. After you install Diversi-Key and "MACRO", boot Appleworks 2.0 and
  1137. open a new word processing file (from scratch).  Then hold the option
  1138. key down and enter:
  1139.  
  1140. [--]  (keypad "-" twice)
  1141.  
  1142.  
  1143.