home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 266.lha / ClockDJ_v4.03 / ClockDJ.doc < prev    next >
Text File  |  1989-07-10  |  29KB  |  1,148 lines

  1.  
  2. ClockDJ   - Assembly language clock, mouse, screen and window program.
  3. Version   - 4.03
  4. Copyright - Copyright (c) by David Jenkins, 10th June 89, 
  5.             I can be reached at Bloom Beacon 416-283-5924.
  6.  
  7.  
  8.      This program is copyright but may be distributed freely. Please keep the
  9. documentation with the load module.
  10.  
  11. Version 4.03 
  12. ~~~~~~~~~~~~
  13.  
  14.     This version fixes a bug which made Key Activate
  15. unreliable.
  16.  
  17.  
  18. Version 4.02 
  19. ~~~~~~~~~~~~
  20.     Version 4.02 includes a couple of improvements in the
  21. click to front and click to back routines:
  22.  
  23. 1. The click to front code removes the last mouse button click
  24.    to prevent something unintentional happening when you simply
  25.    want to click a window to the front.
  26.  
  27. 2. In this version you can hold down the left mouse button and
  28.    click many windows to the back (with the right mouse button)
  29.    without having to release the left button.
  30.  
  31.  
  32.     The zoo file also has WTFPatch3 which has a corresponding
  33. change and should replace WTFPatch2 in your startup sequence.
  34.  
  35.  
  36.  
  37. Version 4.01 
  38. ~~~~~~~~~~~~
  39.  
  40.     This version fixes a bug which caused a machine freeze
  41. when the left mouse button was pressed under some circumstances.
  42.  
  43.  
  44.  
  45. Version 4.00 
  46. ~~~~~~~~~~~~
  47.  
  48.     This  version  has  an  AREXX  port.   See  the ARexx section for
  49. details.
  50.  
  51.  
  52. Version 3.09 changes
  53. ~~~~~~~~~~~~~~~~~~~~
  54.  
  55. 1. This version supports the Arp 1.3 file requester. Also, a new parameter
  56.    is supported in the macro to give you the option of changing the 
  57.    colours of the requester. For example:
  58.  
  59.    \lal\`\&arf1\r\s\2
  60.               ^
  61.             gives colour 1
  62.  
  63.    \lal\`\&arf2\r\s\2
  64.               ^
  65.             gives colour 2
  66.  
  67.  
  68.  
  69. 2. The 'Load Keys' will now bring up the Arp file requester.
  70.  
  71.  
  72.  
  73.  
  74. Version 3.08 changes
  75. ~~~~~~~~~~~~~~~~~~~~
  76.  
  77. 1. The main change in this version is the ability to invoke  
  78.    the Arp file requester from a macro. For this to
  79.    work you must have V 34 of Arp.Library in your libs: directory.
  80.    To call the requester include a macro that looks like this:
  81.  
  82.    \lal\`\&arf\r\s\2
  83.  
  84.    This will open the requester on the top screen when you press the
  85.    Left-alt and ` (top left of the keyboard) together. Obviously you
  86.    can make the key combination anything you want. 
  87.    When you have selected a file from the requester, the next left mouse
  88.    button click will cause the selected file (including disk and dir)
  89.    to be entered into the window where you click. The character delay
  90.    (2 in the above example) will be observed.
  91.    
  92.    There are a couple of ways to modify the string that is generated:
  93.    
  94.     
  95.    Holding down Left Shift when you click will insert a right Amiga x
  96.    at the start of the characters; this is useful for clearing existing
  97.    data out of a string gadget.
  98.  
  99.    Holding down CTRL will submit the directory for the first mouse click
  100.    and the file for the second. This is useful for filling in strings
  101.    where the directory and file are in separate gadgets (in Dpaint, for 
  102.    example).
  103.  
  104.    Holding down CTRL+Left Shift when you click will submit the directory
  105.    and file names separately and precede each with a Right Amiga x.
  106.  
  107.  
  108. 2. I check for some more snooze shapes in this version. Snooze blank
  109.    suppression should now work on Dpaint, Professional Page and Draw Plus.
  110.  
  111.  
  112.  
  113. Version 3.07 changes
  114. ~~~~~~~~~~~~~~~~~~~~
  115.  
  116. 1. The Mouse Speed menu item contains entries 7 and 8; these entries 
  117.    give additional speed.
  118.  
  119. 2. The Blank Pointer menu item now contains a Snooze Off entry.
  120.    When it is checkmarked the pointer will not blank if it is 
  121.    a snooze pointer. This can avoid having to move the mouse to
  122.    see if an operation is complete when the pointer has been blanked.
  123.  
  124. 3. A couple of bugs are fixed.
  125.  
  126.  
  127. Version 3.06 changes
  128. ~~~~~~~~~~~~~~~~~~~~
  129.  
  130.  
  131.     A bug in the screen blanker caused an occasional guru; V3.06
  132. fixes this.
  133.  
  134.  
  135.  
  136. Version 3.05 changes
  137. ~~~~~~~~~~~~~~~~~~~~
  138.  
  139.      The arc file contains 'WTFPATCH2', an improved version of the 
  140. WindowToFront patch. Include 'WTFPatch2' in your start-up sequence, 
  141. but make sure you remove the old version of the patch (WTFPatch) first.
  142.    
  143.  
  144.     'WTFPatch2' corrects an Intuition bug in WindoToFront and
  145. WindowToBack. To use it, simply put the 'WTFPatch2' program in your
  146. c: directory and include 'WTFPatch2' in your startup sequence.
  147.  
  148.     Previous versions of the clock had timing code designed to get
  149. around the Intuition bug. The patch is more effective and should
  150. eliminate machine lockups caused by WindowToFront. Since the timing
  151. code has been removed from V3.05, you must run 'WTFPatch2' with this 
  152. version of the clock.
  153.  
  154.  
  155.  
  156. Program Description
  157. ~~~~~~~~~~~~~~~~~~~
  158.  
  159.  
  160.  
  161.      This utility combines a clock, mouse accelerator, screen blanker,
  162. window manipulator, function keys and macros. 
  163.  
  164.     The display is a  small  borderless  window  which  shows the
  165. total memory left in the system  (chip  and fast) and the time in
  166. 12 hour format. The  window  pops  to  the front of the workbench
  167. screen once every  minute. 
  168.  
  169.     You can start the program with a 'Run ClockDJ' or 'Runback ClockDJ'.
  170. (Do NOT use  Workbench 1.3 'run >nil:' or the ARP Arun NOIO commands. 
  171. Only RunBack will work correctly in this situation). 
  172.  
  173. Using 'Runback' is useful if you want to close ALL CLI windows. If you start
  174. the clock with 'Runback', the output which is directed to the default CLI
  175. will not be seen. This is not usually a problem since this output is typically
  176. of the '[CLI 3]' variety. 
  177.  
  178.     If you use 'Runback' to start the program, command macros 
  179. (those ending with a '\c') MUST specify output and input redirection to
  180. nil:. Eg.:                 ~~~~
  181.  
  182. \lal\b\run <nil: >nil: blitz\r\c
  183.  
  184. If you do not do this the MACHINE WILL GURU.
  185.    
  186. If you want to start the clock with a 'run' so that the output from macros
  187. to the default CLI is preserved, but the startup CLI is to be closed,
  188. do something like this:
  189.  
  190. newcli "con:0/0/580/200/AmigaDOS " from df0:command.file
  191. endcli > nil:
  192.  
  193. "commands.file" is a file located on df0: containing the following:
  194.  
  195. run clockdj
  196.  
  197.  Starting the clock in this way preserves the file handle of the CLI
  198. which launched the clock and passes it to programs started by the macros.
  199.  
  200.  
  201.  
  202. Start-up parameters
  203. ~~~~~~~~~~~~~~~~~~~
  204. "r" specified as the first parameter will reverse the action of the
  205. mouse buttons for the features that require both to be depressed.
  206. The default is "n", for normal operation.
  207.  
  208. The "Newcli" entry in the menu may now be changed by specifying a second
  209. parameter when starting the clock. Eg.:
  210.  
  211.         run clockdj n NewWsh con:0/0/640/150/Myname
  212.  
  213. Note that if the second parameter is specified, the first parameter must
  214. also be specified.
  215.  
  216.  
  217. Arp File requester
  218. ~~~~~~~~~~~~~~~~~~
  219.  
  220.    The Arp file requester can be called from a macro. For this to
  221. work you must have V 34 of Arp.Library in your libs: directory. To call
  222. the requester include a macro that looks like this:
  223.  
  224.    \lal\`\&arfx\r\s\2
  225.  
  226. where x is either 1 or 2. The numbers change the colour scheme
  227. of the requester,
  228.  
  229.    This will open the requester on the top screen when you press the
  230. Left-alt and ` (top left of the keyboard) together. Obviously you
  231. can make the key combination anything you want. 
  232.  
  233. When you have selected a file from the requester, the next left mouse
  234. button click  will cause the selected file (including disk and dir)
  235. to be entered into the window where you click. The character delay
  236. (2 in the above example) will be observed.
  237.   
  238. There are a couple of ways to modify the string that is generated:
  239.  
  240.     
  241. Holding down Left Shift when you click will insert a right Amiga x
  242. at the start of the characters; this is useful for clearing existing
  243. data out of a string gadget.
  244.  
  245. Holding down CTRL will submit the directory for the first mouse click
  246. and the file for the second. This is useful for filling in strings
  247. where the directory and file are in separate gadgets (in Dpaint, for 
  248. example).
  249.  
  250. Holding down CTRL+Left Shift when you click will submit the directory
  251. and file names separately and precede each with a Right Amiga x.
  252.  
  253.  
  254. If '&arf' is specified as the string, no other characters are
  255. valid in the string field other than 1 or 2 (to change the colours).
  256.  
  257.  
  258.  
  259.  
  260. Window manipulation
  261. ~~~~~~~~~~~~~~~~~~~
  262.  
  263. The following can be selected from the menu or by clicking the correct
  264. combination of mouse buttons:
  265.  
  266.  
  267. 1. Screen blanking after a pre-defined period of inactivity.
  268.  
  269. 2. Pointer blanking after a pre-defined period of inactivity.
  270.  
  271. 3. Mouse accelerator.
  272.  
  273. 4. Sun mouse.
  274.  
  275. 5. Click the window to front with the left mouse button.
  276.  
  277. 6. Click the window to back by pressing the left mouse button followed by the
  278.    right mouse button, with the left button still down.
  279.  
  280. 7. Cycling through screens by pressing the right mouse button followed by the
  281.    left mouse button with the right button still down.
  282.  
  283. 8. Left-Amiga-m will shuffle screens if "Screen Cycle" is selected.
  284.  
  285.  
  286. The button sequences for 6. and 7. can be reversed by specifying the
  287. parameter "r" when starting the clock: eg:
  288.  
  289. run clockdj r
  290.  
  291.  
  292. All the above can be selected my menus and saved in the configuration
  293. file.
  294.  
  295.  
  296. Delete Window
  297. ~~~~~~~~~~~~~
  298. The program will allow the user to select a window and remove it
  299. from the screen while leaving the task that started it unaffected. 
  300.  
  301. To do this, point at the window you want to remove, hold the 
  302. Left-shift+Left-Amiga+Control keys down and press the left mouse button;
  303. the window should disappear. To bring the window back hold
  304. Left-shift+Left-Amiga+Control keys and press the right mouse button.
  305.  
  306. Up to 60 windows can be hidden in this way. When retrieving windows
  307. the last one removed is brought back first. A separate list of hidden windows
  308. is maintained for each screen, so only the windows for the active screen are
  309. retrieved.
  310.  
  311. I put this feature in because my workbench screen is often cluttered
  312. with small windows opened by tasks like VirusX. These windows serve no useful
  313. purpose and I decided I would like a means of removing them.
  314.  
  315. Restrictions: 
  316.  
  317. 1. CLI windows cannot be removed. Doing so confuses things and ends in a guru,
  318.    so the CLI windows are ignored when selecting a window to hide.
  319.  
  320.  
  321. 2. Some programs look at their window size; FileInjector does this. If the
  322.    small FileInjector window is hidden and the hot key sequence is used, the
  323.    resulting window is smaller than it should be. The solution is one of: don't
  324.    hide this type of window; retrieve the window before the hot key; retrieve
  325.    the window after the hot key. The last option would require a window refresh
  326.    too (move the window).
  327.  
  328. 3. You should use this feature with caution. Some programs don't expect
  329.    to have other tasks interfere with their windows and gurus can occur.
  330.    Generally, if the window holds only text then there will not be a problem.
  331.  
  332.  
  333.  
  334. Changing the window size of the clock display
  335. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  336.  
  337. The size of the clock window can be changed by hitting 
  338. Left-shift+Left+alt+Right-shift+up arrow or down arrow. This will allow the
  339. characters of larger fonts to be displayed correctly.
  340.  
  341. The size will be saved in the config file when "Save" is selected
  342. from the menu. 
  343.     
  344.  
  345. Menu options
  346. ~~~~~~~~~~~~
  347.  
  348. NewCLI
  349. ------
  350.  
  351. Gives you a new CLI window at the bottom of the screen.
  352.  
  353.  
  354.  
  355. Chip/Fast
  356. ---------
  357.  
  358. This option gives chip and fast memory displays separately. When selected
  359. the menu toggles to "Total Memory" to enable you to get back to a total
  360. memory display.
  361.  
  362.  
  363.  
  364. Colour
  365. -----
  366.  
  367. Allows you to select the colour of the clock display.
  368.  
  369.  
  370.  
  371. Priority
  372. --------
  373.                      
  374. The default priority of the clock is 2 which seems to work OK in most
  375. circumstances. Setting it to 0 makes it the same priority as other 
  376. tasks  started  from CLI. Making it negative gives it a lower priority
  377. than other CLI tasks. This option gives you a choice of running the clock
  378. from -3 to +4. I found the negative values useful while running a Basic
  379. drawing program: anything above -1 made the drawing process
  380. jerky.
  381.  
  382.  
  383.  
  384. Refresh
  385. -------
  386.  
  387. This is the maximum rate at which the program will update the display.
  388. The default is 5 times per second and the options allow from 10 times
  389. to once per second. I  only  do an PrintIText if something has changed,
  390. so even 10 times per second does  not  use much CPU - you can
  391. use pm to see how much.  
  392.  
  393.  
  394. Blank Screen
  395. ------------
  396.  
  397. The screen will blank after the specified time (in minutes) if there is no
  398. keyboard or mouse activity.
  399.  
  400.  
  401. Blank Pointer
  402. -------------
  403.  
  404. The mouse pointer will blank after the specified time (in seconds) if there is
  405. no mouse activity.
  406.  
  407. When the Snooze Off entry is checkmarked the pointer will not blank if it is 
  408. a snooze pointer. This can avoid having to move the mouse to
  409. see if an operation is complete when the pointer has been blanked.
  410.  
  411.  
  412. Mouse Speed
  413. -----------
  414.  
  415. Accelerates the mouse pointer. 1 is no acceleration.
  416.  
  417.  
  418.  
  419. Click to front
  420. --------------
  421.  
  422. Clicking the left mouse button in a window the specified number of
  423. times will bring it to the front.
  424.  
  425.  
  426. Click to back
  427. -------------
  428.  
  429. Click the window to back by pressing the left mouse button followed by the
  430. right mouse button the specified number of times.
  431.  
  432.  
  433. Note that this sequence can be reversed by specifying "r" as a start-up
  434. parameter
  435.  
  436.  
  437. Sun Mouse
  438. ---------
  439.  
  440. Activates the window the pointer is above without having to click the left
  441. mouse button.
  442.  
  443.  
  444.  
  445. Screen Cycle
  446. ------------
  447.  
  448.  
  449. Cycling through screens by pressing the right mouse button followed by
  450. the left mouse button with the right button still down.
  451.  
  452. Note that this sequence can be reversed by specifying "r" as a
  453. start-up parameter
  454.  
  455. The screen cycle can also be triggered by hitting Left-Amiga-m.
  456.  
  457.  
  458. Key Activate
  459. ------------          
  460.  
  461. If this feature is used, the window under the pointer will be activated
  462. when a key is depressed.
  463.  
  464. Pop to Front
  465. ------------
  466.  
  467. Selecting this item causes the clock to pop to the front of the 
  468. current screen if 'Windows' is selected, or to the top screen if
  469. 'Screens' is selected.
  470.  
  471.  
  472. Map Keys
  473. --------
  474.  
  475. When checked, the key mapping and macro functions are active.
  476.  
  477.  
  478. Load Keys
  479. ---------
  480.  
  481. Loads in a new set of key and macro definitions.
  482.  
  483.  
  484. Save
  485. ----
  486.  
  487. If you select "Save", all the current settings, including the window
  488. position, will be written to a file called "clockdj.config" in the 
  489. root directory of sys:. You should be careful to ensure that sys: is
  490. assigned to the correct disk so that the file can be read when the clock
  491. is next started.
  492.  
  493.  
  494. The next time clockdj starts it will attempt to read this file and set
  495. up the clock and associated parameters exactly as they were when you 
  496. selected "Save".
  497.  
  498. You should select this option when you are happy with the way the clock
  499. looks, and then make sure you have the disk with the clockdj program 
  500. on it assigned to sys:. 
  501.  
  502.  
  503.  
  504. Quit
  505. ----
  506.  
  507. Ends the program.
  508.  
  509.  
  510. Macros and redefining the keys
  511. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  512.  
  513. ClockDJ will allow you re-map the keyboard, substitute a string
  514. of characters for a single key depression, or execute a command when
  515. a particular key sequence is pressed. The key definitions and macros
  516. must be created by you and saved in a file; the default file read when
  517. the program starts is sys:clockdj.keys. The key definitions can be changed
  518. by selecting Load Keys from the menu.
  519.  
  520.  
  521.  
  522.    Pressing CTRL-` (the "ctrl" key and the "`" key) is an escape for
  523. the next key/mouse sequence entered. This will prevent translation or
  524. macro generation on  the next key/mouse sequence. 
  525.  
  526.  
  527.  
  528. NB. 'Map Keys' must be selected from the menu to activate the macro
  529.     function.
  530.  
  531.  
  532. The statement format is:
  533.  
  534. \xxx,yyy\z\wwwwww\r\s\5
  535. |    |   |   |    k c |
  536. |    |   |   |    | | |_The delay between each character in 10ms increments.
  537. |    |   |   |    | | 
  538. |    |   |   |    | |_ s = string; c = command
  539. |    |   |   |    |
  540. |    |   |   |    |_ r = replace character with the string or command
  541. |    |   |   |       k = generate string or command, but keep the original
  542. |    |   |   |           character.
  543. |    |   |   |
  544. |    |   |   |_ String to be generated, or command to be executed.
  545. |    |   |   
  546. |    |   |_ Character to be re-mapped. 
  547. |    |
  548. |    |_ List of qualifiers (see below), separated by commas.
  549. |
  550. |
  551. |_ Delimiter.
  552.  
  553.  
  554. Delimiter
  555. ---------
  556.  
  557. A "\" is the character used to delimit fields. If you wish to include 
  558. one in the string, precede it with a "^".
  559.  
  560. Qualifiers
  561. ----------
  562.  
  563. This defines which keys must be pressed with the re-map character
  564. to generate the string or command. eg., you may want the qualifiers to be
  565. left shift and right alt. If no qualifiers are needed to trigger the re-map, 
  566. the statement would start with a "\\".
  567.  
  568. Multiple qualifiers are specified by separating them by commas: eg.,
  569. "lsh,lat,ctl".
  570.  
  571.  
  572.  
  573. The valid qualifiers are: (all in lower case)
  574.  
  575. lsh    Left shift.
  576. rsh    Right shift.
  577. clo    Caps lock.
  578. ctl    Control (CTRL).
  579. lal    Left alt.
  580. ral    Right alt.
  581. lam    Left Amiga.
  582. ram    Right Amiga.
  583.  
  584.  
  585. The above qualifiers must be specified in lower case.
  586.                      ~~~~
  587.  
  588. Character to be re-mapped.
  589. ------------------------
  590.  
  591. This field is either a single character - "w", for example - or
  592. a string of characters which represents a single character.
  593. If a single character is specified it must be in lower case; if you want
  594. the upper case character re-mapped you must use two statements with
  595. "lsh" and "rsh" qualifiers. This also applies to keys like "{", "!"
  596. etc. whose lower and upper case representations are different.  
  597.  
  598. Valid strings are: (in lower case)
  599.  
  600. f01    The function keys. 
  601. f02            |
  602. f03            |
  603. f04            |
  604. f05            |
  605. f06            |
  606. f07            |
  607. f08            |
  608. f09            |
  609. f10            V
  610.  
  611. hel     Help key.
  612. esc     Escape key.
  613. tab     Tab key.
  614. bsp     Backspace key.
  615. ret     Return key.
  616. del     Delete key.
  617. upa     Up arrow.
  618. lea     Left arrow.
  619. doa     Down arrow.
  620. ria     Right arrow.
  621. kp0     Key pad 0.
  622. kp1     Key pad 1.
  623. kp2     Key pad 2.
  624. kp3     Key pad 3.
  625. kp4     Key pad 4.
  626. kp5     Key pad 5.
  627. kp6     Key pad 6.
  628. kp7     Key pad 7.
  629. kp8     Key pad 8.
  630. kp9     Key pad 9.
  631. kp.     Key pad ..
  632. kp-     Key pad -.
  633. kpe     Key pad enter.
  634. kp)     Key pad ).
  635. kp(     Key pad (.
  636. kp/     Key pad /.
  637. kp+     Key pad +.
  638. arf    Arp file requester  (valid in the string field only).
  639.  
  640. The above keys must be specified in lower case.
  641.                ~~~~
  642.  
  643.  
  644.  
  645. String
  646. ------
  647.  
  648. The string of characters which will replace the character to
  649. be re-mapped. 
  650.  
  651. Version 3.00 will accept special keys (del, bsp, for example) in the string.
  652. They are specified by preceding the key name with a "&". For example,
  653. "&del" would be delete, "&ret" would be return, etc. Any key listed above
  654. in the "Character to be re-mapped" section can be specified in this way (still
  655. in lower case).
  656.  
  657. Previous version of the program allowed a limited set of control characters
  658. in the string by using the "^". This will still work. The characters
  659. which can be defined in this way are:
  660.  
  661.  
  662. ^[   Escape.
  663. ^h   Backspace.
  664. ^i   Tab.
  665. ^m   Return.
  666.  
  667. The "^" and "\" can be included in the string by preceding them
  668. with a "^".
  669.  
  670.  
  671. A character in a macro string may now include a qualifier. 
  672. Any of the qualifiers listed above under "Qualifiers" are valid.
  673. The qualifier is preceded by a "%" and multiple qualifiers are
  674. separated by commas. Eg., 
  675.  
  676. "%lal,%ctla" 
  677.  
  678. (in lower case)  would specify left-alt-control-a.
  679.  
  680. Multiple qualifiers should be separated by commas. This can be useful
  681. for entering data in a string gadget (a file requester, for example).
  682. The file name you want in the requester may be "myfile"; specifying
  683. "%ramxmyfile" in the string would clear the gadget before filling it
  684. with "myfile".
  685.  
  686.  
  687.  
  688. The string should appear in the active window.
  689.  
  690. Each statement can be up to 1000 characters long.
  691.  
  692.  
  693. Replace/Keep
  694. ------------
  695.  
  696.  
  697. An "r" causes the re-mapped character to be replaced with the
  698. string or command. A "k" will keep the re-mapped character.
  699.  
  700. This must be specified in lower case.
  701.  
  702.  
  703. String/Command
  704. --------------
  705.  
  706. An "s" will submit the string into the input stream: it should
  707. appear in the active window.
  708.  
  709. A "c" will execute the string as a command. A "^m" (CR) or "&ret" at the end
  710. of the command is not needed. The command will be launched from the clock
  711. task AT THE SAME PRIORITY AS THE CLOCK; the default clock priority is 2.
  712. Some programs do not run well at priority 2 -  eg Txed, Excellence, Blitz -
  713. since they use input handlers running at priority 0. To avoid this kind of
  714. problem either run the clock at priority 0 or use the ARP Arun command and
  715. set the priority of the new task to 0.
  716.  
  717.  
  718. This must be specified in lower case.
  719.  
  720.  
  721. Delay
  722. -----
  723.  
  724. Some programs will not accept a continuous stream of characters in
  725. the input stream. CygnusED and Online! will not, for example. The delay 
  726. value will delay each character by the value*15 milliseconds. Eg.,
  727. a value of 5 specifies 75 ms. CLI windows do not need a delay; you should
  728. experiment to find out whether a program you are using needs the delay.
  729.  
  730. The delay field can be between 0 and 9.
  731.  
  732. If the delay is omitted, a delay of 0 is assumed.
  733.  
  734. Examples
  735. ~~~~~~~~
  736.  
  737.  
  738. \\f01\run  >nil: <nil: ed\r\c
  739.  
  740. Will run ed . Notice that no qualifier was specified
  741. for the function key F1. The redirection to nil: is to prevent unwanted
  742. messages in the console window.
  743.  
  744.  
  745.  
  746.  
  747. \ctl,lsh\f01\dir df0:\r\c
  748.  
  749. When CTRL, left shift and F1 are depressed a dir df0: will execute and the
  750. result will appear in the window belonging to the cli which started ClockDJ.
  751. This would work only if ClockDJ has NOT been started with 'RunBack'.
  752.  
  753.  
  754.  
  755. \lal\t\run >nil: <nil: Terminals:gt/gt\r\c
  756.  
  757. Run GT when left-alt t is depressed.
  758.  
  759.  
  760.  
  761.  
  762. \lal\esc\newcli <nil: >nil:\r\c
  763.  
  764. Start a new cli when Left-alt esc is depressed.
  765.  
  766.  
  767.  
  768.  
  769. \lal\n\David Jenkins\r\s\5
  770.  
  771. Submit the string when left-alt n is depressed and insert a 50 ms delay
  772. between each character.
  773.  
  774.  
  775.  
  776. \lal\m\Inter-Office Correspondence&ret&retFrom:  David Jenkins&ret&retTo:&ret&retSubject:&ret&ret______________________________________________________________________________&ret&ret\r\s\5
  777.  
  778. Submit the string when left-alt m is depressed and insert a 50 ms delay
  779. between each character..
  780.  
  781.  
  782. \clo\`\~\r\s
  783. \clo\1\!\r\s
  784.  
  785.  
  786. Convert Caps lock "`" and "1" to "~" and "!".
  787.  
  788.  
  789. \lal\f\%ramxdf0:file1\r\s
  790.  
  791.  
  792. Is useful for putting a string into a requester. The "%ramx" will submit a
  793. Right Amiga-x which will clear the string gadget before submitting the
  794. "file1" string.
  795.  
  796.  
  797.  
  798.  
  799.  
  800.  
  801.  
  802.  
  803.                               ARexx Macros
  804.                               ~~~~~~~~~~~~
  805.  
  806.     ClockDJ versions 4.00 and above contain an ARexx port.  The clock
  807. is  an  ARexx  host  and will accept commands from an ARexx program; the
  808. commands  are  listed below.  If a result is expected it will be returned
  809. in  the  special  ARexx  variable  'result';  any commands which return a
  810. result should have a 'options results' statement in the program.
  811.  
  812.  
  813. Title of ClockDJ
  814. ----------------
  815.  
  816.     The clock window has a title of 'ClockDJ' (case sensitive);
  817. you can use this title in some of the ARexx macros. For an example of this
  818. take a look at Move.Rexx and Move2.Rexx.
  819.  
  820.  
  821. Host Name
  822. ---------
  823.  
  824.     The host name of ClockDJ is CLOCKDJ (in capitals).
  825.  
  826.  
  827. Errors
  828. ------
  829.  
  830.     Errors are reported by setting a return code (the RC variable).
  831.  
  832. A return code of 20 is set for an unrecognized command.
  833.  
  834. A  return  code  of 10 is set for an invalid parameter (an invalid window
  835. address, for example).
  836.  
  837.  
  838. Commands
  839. --------
  840.  
  841. NOTE:  when executing commands which manipulate windows (like MOVE), be
  842. careful  not  to submit too many requests for the same window without a
  843. pause  between  the  requests.   Intuition  gets upset if it receives a
  844. request  for  a window before it has acted on the previous request; the
  845. ARexx   function  'delay'  (in  rexxsupport.library)  can  be  used  to
  846. accomplish this:  eg., 'call delay 5'.
  847.  
  848.  
  849.  
  850.  
  851.     ACTIVATEWINDOW    address        
  852.  
  853.  
  854. Activate the window with this address. The window may be on any screen.
  855.  
  856.  
  857.                            *******************
  858.  
  859.      COLOUR    nn    
  860.  
  861.  
  862. Change the colour of the clock display to nn (0-11).  Note: nn
  863. corresponds to a colour item menu selection
  864.  
  865.  
  866.                            *******************
  867.  
  868.  
  869.      CHIP         
  870.  
  871. Change the clock to display chip/fast memory.
  872.  
  873.  
  874.                            *******************
  875.  
  876.  
  877.      DELAY    value        
  878.  
  879.  
  880. Specify an inter-character  delay value in microseconds for injected data.
  881. The delay value remains in effect for all injected data; if you want to
  882. reset it to zero, submit a 'delay 0' command.
  883.  
  884.                            *******************
  885.  
  886.  
  887.      FILEREQUESTER
  888.  
  889.  
  890. Call the Arp file requester.  The full pathname of the selected file will
  891. be  returned  in  'result'.   If  'cancel'  is  selected  on the Arp file
  892. requester, a null string will be returned in 'result'.
  893.  
  894.  
  895.                            *******************
  896.  
  897.  
  898.      GETACTIVEWINDOW      
  899.  
  900.  
  901. Gets the active window address and returns it in 'result'.
  902.  
  903.  
  904.                            *******************
  905.  
  906.  
  907.     GETNEXTWINDOW    address        
  908.  
  909.  
  910. Get  the  address  of  the  next window on a screen.  The parameter is an
  911. address of a window.
  912.  
  913.                            *******************
  914.  
  915.  
  916.  
  917.      GETPOINTERWINDOW          
  918.  
  919.  
  920. Get the address of the window under the pointer. The address is returned
  921. in 'result'.
  922.  
  923.  
  924.                            *******************
  925.  
  926.  
  927.     GETSCREEN    title
  928.  
  929.  
  930.  
  931. Get  the  screen  address  from  the  title.  Note that the title is case
  932. sensitive.  The address is returned in 'result'.
  933.  
  934.  
  935.                            *******************
  936.  
  937.     
  938.     GETTITLEOFSCREEN address    
  939.  
  940.  
  941. Get a screen title from a screen address. The title is returned in
  942. 'result'.  
  943.  
  944.  
  945.                            *******************
  946.  
  947.  
  948.      GETTOPSCREEN
  949.  
  950.  
  951. Get the address of the top screen. The address is returned in 'result'.
  952.  
  953.  
  954.                            *******************
  955.  
  956.  
  957.      GETWINDOW    title
  958.  
  959.  
  960. Get  the  address of the window with this title.  The address is returned
  961. in  'result'.  Note that 'title' is case sensitive; make sure you specify
  962. the exact title.  The window can be on any screen.
  963.  
  964.  
  965.                            *******************
  966.  
  967.  
  968.  
  969.      HIDEWINDOW    address        
  970.  
  971.  
  972. Hide the window with the specified address.
  973.  
  974.  
  975.                            *******************
  976.  
  977.  
  978.      INJECT    CLICK    data    
  979.  
  980.  
  981. Injects  data  into  the window where you click the left mouse button.  A
  982. small  window will appear on the top screen asking you to click where you
  983. want  the  data  injected.   The  data to be injected is specified by the
  984. second  operand.  If you precede the data by a hex '01' ('01'x in ARexx),
  985. a Right Amiga+x will be inserted to clear a string requester).
  986.  
  987.  
  988.                            *******************
  989.  
  990.  
  991.      INJECT    ACTIVE    data
  992.  
  993.  
  994. Injects data into the active window. The data to be injected is specified
  995. by the second operand.
  996.  
  997.  
  998.                            *******************
  999.  
  1000.  
  1001.      INJECT    address    data
  1002.  
  1003.  
  1004. Injects  data into the window with the the address specified in the first
  1005. operand.  The data is specified by the second operand.
  1006.  
  1007.  
  1008.                            *******************
  1009.  
  1010.  
  1011.      LOADKEYS filename
  1012.  
  1013.  
  1014. Load new key definitions from the specified file name.
  1015.  
  1016.  
  1017.                            *******************
  1018.  
  1019.  
  1020.     MOVEWINDOW    address x-position y-position    
  1021.  
  1022.  
  1023. Move  a  window  to  a  new  position.   The  first parameter is a window
  1024. address,  the  second  is the X position and the third is the Y position.
  1025. If you attempt to move a window outside a screen's limits a return code of
  1026. 10 will be set.
  1027.  
  1028.  
  1029.                            *******************
  1030.  
  1031.  
  1032.     POPUP        OFF        
  1033.             WINDOWS
  1034.             SCREENS
  1035.  
  1036.  
  1037. Set the popup status of the clock.
  1038.  
  1039.  
  1040.                            *******************
  1041.  
  1042.  
  1043.     QUALIFIER  'nnnn'x  
  1044.  
  1045.  
  1046. Set  a key qualifier for injected data.  The qualifier is 2 hex bytes and
  1047. the values are explained below. This feature is useful if you want to
  1048. inject,  for  example,  a  Right Amiga+Right Shift+Return.  The qualifier
  1049. remains  set  for  all injected data, so you must reset it.  A normal key
  1050. depression has a qualifier of '8000'x (relative mouse).
  1051.  
  1052. NOTE:   this  is  only  effective for data injected with INJECT ACTIVE or
  1053. INJECT address.  It will not work with INJECT CLICK.
  1054.  
  1055.  
  1056.  
  1057. Qualifiers
  1058. ----------
  1059.  
  1060. IEQUALIFIER_LSHIFT    EQU   $0001        Left shift
  1061. IEQUALIFIER_RSHIFT    EQU   $0002        Right Shift
  1062. IEQUALIFIER_CAPSLOCK    EQU   $0004        Caps Lock
  1063. IEQUALIFIER_CONTROL    EQU   $0008        CTRL
  1064. IEQUALIFIER_LALT    EQU   $0010        Left Alt
  1065. IEQUALIFIER_RALT    EQU   $0020        Right Alt
  1066. IEQUALIFIER_LCOMMAND    EQU   $0040        Left Amiga
  1067. IEQUALIFIER_RCOMMAND    EQU   $0080        Right Amiga
  1068. IEQUALIFIER_RELATIVEMOUSE     EQU   $8000   Reset to this value.
  1069.  
  1070.  
  1071. NB. OR the bits together to set a qualifier: eg: '8022'x is Right shift+
  1072.     Right alt+Relative mouse.  You should always include the relative mouse 
  1073.     bit.
  1074.  
  1075.  
  1076.                            *******************
  1077.  
  1078.  
  1079.      RETRIEVEWINDOW     address    
  1080.  
  1081.  
  1082. Retrieve the hidden window with this address.
  1083.  
  1084.  
  1085.                            *******************
  1086.  
  1087.  
  1088.      SCREENFLIP
  1089.  
  1090.  
  1091. Push the top screen to the bottom.
  1092.  
  1093.  
  1094.                            *******************
  1095.  
  1096.  
  1097.     SCREENFORWINDOW    address    
  1098.  
  1099.  
  1100.  
  1101. Get  the address of the screen which contains this window.  The parameter
  1102. is a window address. The address is returned in 'result'.
  1103.  
  1104.  
  1105.                            *******************
  1106.  
  1107.  
  1108.     SCREENTOFRONT    address        
  1109.  
  1110.  
  1111.  
  1112. Bring the screen with this address to the front.
  1113.  
  1114.  
  1115.                            *******************
  1116.  
  1117.  
  1118.      TOTAL             
  1119.  
  1120. Change the clock to display total memory.
  1121.  
  1122.  
  1123.                            *******************
  1124.  
  1125.  
  1126.  
  1127.     WINDOWTOBACK    address        
  1128.  
  1129.  
  1130.  
  1131. Push the window with this address to the back.
  1132.  
  1133.  
  1134.                            *******************
  1135.  
  1136.  
  1137.     WINDOWTOFRONT    address
  1138.  
  1139.  
  1140.  
  1141.  
  1142. Bring the window with this address to the front.
  1143.  
  1144.  
  1145.  
  1146.  
  1147.                         David Jenkins.
  1148.