home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 201.lha / ClockDJ_v3.01 / clockdj.doc < prev    next >
Encoding:
Text File  |  1988-12-28  |  16.9 KB  |  638 lines

  1.  
  2. ClockDJ   - Assembly language clock, mouse, screen and window program.
  3. Version   - 3.01
  4. Copyright - Copyright (c) by David Jenkins, 29 Nov 1988, 
  5.             I can be reached at Bloom Beacon 416-297-5607.
  6.                                     and M31  416-439-0493
  7.  
  8.      This program may be distributed freely, but please keep the 
  9. documentation and source with the load module.
  10.  
  11.  
  12.  
  13. Version 3.01 changes
  14. ~~~~~~~~~~~~~~~~~~~~
  15.  
  16. A number of bug fixes and minor improvements:
  17.  
  18. 1. After a re-boot the key mapping used to only work after the mouse was moved.
  19.    This is fixed, so key mapping should be active as soon as the clock starts. 
  20.    
  21. 2. It was possible to move hidden windows; when a moved window was restored
  22.    a guru could occur. This is fixed.
  23.  
  24. 3. The key combination to resize the clock window conflicted with CygnusED.
  25.    I have changed it to Left-shift+Left-Amiga+Control+up or down arrow.
  26.  
  27. 4. The hide window and retrieve window conflicted with Snipit so these
  28.    have changed to Left-shift+Left-Amiga+Control+Left or Right mouse button. 
  29.  
  30. 5. Pressing CTRL-` (the "ctrl" key and the "`" key) is an escape for
  31.    the next key/mouse sequence entered. This will prevent translation or
  32.    macro generation on  the next key/mouse sequence. 
  33.  
  34. 6. Left-Amiga+n will now activate a window on the Workbench screen. The
  35.    previous version required a mouse button click.
  36.  
  37. 7. Left-Amiga+n followed by Left-Amiga+m will now return you to the screen
  38.    you left when you hit Left-Amiga+n.
  39.  
  40.  
  41.  
  42. Version 3.00 changes
  43. ~~~~~~~~~~~~~~~~~~~~
  44. I fixed a bug in the character delay routine. The clock would stop
  45. after a macro string with delays between the character.
  46.  
  47. Version 2.99 changes
  48. ~~~~~~~~~~~~~~~~~~~~
  49.  
  50. 1. The menus have been cleaned up.
  51.  
  52. 2. Submitting a string using the macro feature causes some programs
  53.    (CygnusED and Online!, for example) to choke and display incorrect
  54.    characters because the string was submitted to the input stream too fast.
  55.    I have included a new parameter at the end of the string; it specifies
  56.    a  delay between the submission of each character.
  57.  
  58. 3. The current date can be generated in a macro string by including "&dat", and
  59.    the current time by including "&tim".
  60.  
  61. 4. All special keys can now be included in a macro string by preceding the 
  62.    mnemonic with a "&". Eg.: "&del" for delete and "&ria" for right 
  63.    arrow.
  64.  
  65.    This gives some interesting possibilities. For example:
  66.  
  67.    \lam\ria\&ria&ria&ria\r\2
  68.  
  69.    will submit three right arrows each time left-Amiga right arrow
  70.    is pressed.
  71.    
  72.  
  73. 5. A character in a macro string may now include a qualifier: eg., 
  74.    "%lal,%ctla" would specify left alt-control-a. The qualifiers
  75.    should be separated by commas.
  76.  
  77. 6. The size of the clock window can be changed by hitting 
  78.    Left-shift+Left-alt+Right-shift+up arrow or down arrow. 
  79.    This will allow the characters of larger fonts to be displayed correctly.
  80.    The size will be saved in the config file when "Save" is selected
  81.    from the menu.
  82.  
  83.  
  84.  
  85. Program Description
  86. ~~~~~~~~~~~~~~~~~~~
  87.  
  88.  
  89.  
  90.      This utility combines a clock, mouse accelerator, screen blanker,
  91. window manipulator, function keys and macros. 
  92.  
  93.     The display is a  small  borderless  window  which  shows the
  94. total memory left in the system  (chip  and fast) and the time in
  95. 12 hour format. The  window  pops  to  the front of the workbench
  96. screen once every  minute. 
  97.  
  98.     The program should NOT be started using Runback or ARun NOIO if
  99. you plan on using the command macro function; doing so will probably
  100. end in a guru. To start it in a start-up sequence where the CLI is to
  101. be closed do something like this:
  102.  
  103. newcli "con:0/0/580/200/AmigaDOS " from df0:commands
  104. endcli > nil:
  105.  
  106. "commands" is a file located on df0: containing the following:
  107.  
  108. run clockdj
  109.  
  110.  
  111. Start-up parameter
  112. ~~~~~~~~~~~~~~~~~~
  113. "r" specified as the first parameter will reverse the action of the
  114. mouse buttons for the features that require both to be depressed.
  115. The default is "n".
  116.  
  117.  
  118.  
  119. Window manipulation
  120. ~~~~~~~~~~~~~~~~~~~
  121.  
  122. The following can be selected from the menu or by clicking the correct
  123. combination of mouse buttons:
  124.  
  125.  
  126. 1. Screen blanking after a pre-defined period of inactivity.
  127.  
  128. 2. Pointer blanking after a pre-defined period of inactivity.
  129.  
  130. 3. Mouse accelerator.
  131.  
  132. 4. Sun mouse.
  133.  
  134. 5. Click the window to front with the left mouse button.
  135.  
  136. 6. Click the window to back by pressing the left mouse button followed by the
  137.    right mouse button, with the left button still down.
  138.  
  139. 7. Cycling through screens by pressing the right mouse button followed by the
  140.    left mouse button with the right button still down.
  141.  
  142. 8. Left-Amiga-m will shuffle screens if "Screen Cycle" is selected.
  143.  
  144.  
  145. The button sequences for 6. and 7. can be reversed by specifying the
  146. parameter "r" when starting the clock: eg:
  147. run clockdj r
  148.  
  149.  
  150. All the above can be selected my menus and saved in the configuration
  151. file.
  152.  
  153.  
  154. Delete Window
  155. ~~~~~~~~~~~~~
  156. The program will allow the user to select a window and remove it
  157. from the screen while leaving the task that started it unaffected. 
  158.  
  159. To do this, point at the window you want to remove, hold the 
  160. Left-shift+Left-Amiga+Control keys down and press the left mouse button;
  161. the window should disappear. To bring the window back hold
  162. Left-shift+Left-Amiga+Control keys and press the right mouse button.
  163.  
  164. Up to 60 windows can be hidden in this way. When retrieving windows
  165. the last one removed is brought back first. A separate list of hidden windows
  166. is maintained for each screen, so only the windows for the active screen are
  167. retrieved.
  168.  
  169. I put this feature in because my workbench screen is often cluttered
  170. with small windows opened by tasks like VirusX. These windows serve no useful
  171. purpose and I decided I would like a means of removing them.
  172.  
  173. Restrictions: 
  174.  
  175. 1. CLI windows cannot be removed. Doing so confuses things and ends in a guru,
  176.    so the CLI windows are ignored when selecting a window to hide.
  177.  
  178.  
  179. 2. Some programs look at their window size; FileInjector does this. If the
  180.    small FileInjector window is hidden and the hot key sequence is used, the
  181.    resulting window is smaller than it should be. The solution is one of: don't
  182.    hide this type of window; retrieve the window before the hot key; retrieve
  183.    the window after the hot key. The last option would require a window refresh
  184.    too (move the window).
  185.  
  186. 3. You should use this feature with caution. Some programs don't expect
  187.    to have other tasks interfere with their windows and gurus can occur.
  188.    Generally, if the window holds only text then there will not be a problem.
  189.  
  190.  
  191.  
  192. Changing the window size of the clock display
  193. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  194.  
  195. The size of the clock window can be changed by hitting 
  196. Left-shift+Left+alt+Right-shift+up arrow or down arrow. This will allow the
  197. characters of larger fonts to be displayed correctly.
  198.  
  199. The size will be saved in the config file when "Save" is selected
  200. from the menu. 
  201.     
  202.  
  203. Menu options
  204. ~~~~~~~~~~~~
  205.  
  206. NewCLI
  207. ------
  208.  
  209. Gives you a new CLI window at the bottom of the screen.
  210.  
  211.  
  212.  
  213. Chip/Fast
  214. ---------
  215.  
  216. This option gives chip and fast memory displays separately. When selected
  217. the menu toggles to "Total Memory" to enable you to get back to a total
  218. memory display.
  219.  
  220.  
  221.  
  222. Colour
  223. -----
  224.  
  225. Allows you to select the colour of the clock display.
  226.  
  227.  
  228.  
  229. Priority
  230. --------
  231.                      
  232. The default priority of the clock is 2 which seems to work OK in most
  233. circumstances. Setting it to 0 makes it the same priority as other 
  234. tasks  started  from CLI. Making it negative gives it a lower priority
  235. than other CLI tasks. This option gives you a choice of running the clock
  236. from -3 to +4. I found the negative values useful while running a Basic
  237. drawing program: anything above -1 made the drawing process
  238. jerky.
  239.  
  240.  
  241.  
  242. Refresh
  243. -------
  244.  
  245. This is the maximum rate at which the program will update the display.
  246. The default is 5 times per second and the options allow from 10 times
  247. to once per second. I  only  do an PrintIText if something has changed,
  248. so even 10 times per second does  not  use much CPU - you can
  249. use pm to see how much.  
  250.  
  251.  
  252. Blank Screen
  253. ------------
  254.  
  255. The screen will blank after the specified time (in minutes) if there is no
  256. keyboard or mouse activity.
  257.  
  258.  
  259. Blank Pointer
  260. -------------
  261.  
  262. The mouse pointer will blank after the specified time (in seconds) if there is
  263. no mouse activity.
  264.  
  265.  
  266.  
  267. Mouse Speed
  268. -----------
  269.  
  270. Accelerates the mouse pointer. 1 is no acceleration.
  271.  
  272.  
  273.  
  274. Click to front
  275. --------------
  276.  
  277. Clicking the left mouse button in a window the specified number of
  278. times will bring it to the front.
  279.  
  280.  
  281. Click to back
  282. -------------
  283.  
  284. Click the window to back by pressing the left mouse button followed by the
  285. right mouse button the specified number of times.
  286.  
  287.  
  288. Note that this sequence can be reversed by specifying "r" as a start-up
  289. parameter
  290.  
  291.  
  292. Sun Mouse
  293. ---------
  294.  
  295. Activates the window the pointer is above without having to click the left
  296. mouse button.
  297.  
  298.  
  299.  
  300. Screen Cycle
  301. ------------
  302.  
  303.  
  304. Cycling through screens by pressing the right mouse button followed by
  305. the left mouse button with the right button still down.
  306.  
  307. Note that this sequence can be reversed by specifying "r" as a
  308. start-up parameter
  309.  
  310. The screen cycle can also be triggered by hitting Left-Amiga-m.
  311.  
  312.  
  313. Key Activate
  314. ------------          
  315.  
  316. If this feature is used, the window under the pointer will be activated
  317. when a key is depressed.
  318.  
  319. Pop to Front
  320. ------------
  321.  
  322. Selecting this item causes the clock to pop to the front of the 
  323. workbench screen once per minute.
  324.  
  325.  
  326. Map Keys
  327. --------
  328.  
  329. When checked, the key mapping and macro functions are active.
  330.  
  331.  
  332. Load Keys
  333. ---------
  334.  
  335. Loads in a new set of key and macro definitions.
  336.  
  337.  
  338. Save
  339. ----
  340.  
  341. If you select "Save", all the current settings, including the window
  342. position, will be written to a file called "clockdj.config" in the 
  343. root directory of sys:. You should be careful to ensure that sys: is
  344. assigned to the correct disk so that the file can be read when the clock
  345. is next started.
  346.  
  347.  
  348. The next time clockdj starts it will attempt to read this file and set
  349. up the clock and associated parameters exactly as they were when you 
  350. selected "Save".
  351.  
  352. You should select this option when you are happy with the way the clock
  353. looks, and then make sure you have the disk with the clockdj program 
  354. on it assigned to sys:. 
  355.  
  356.  
  357.  
  358. Quit
  359. ----
  360.  
  361. Ends the program.
  362.  
  363.  
  364. Macros and redefining the keys
  365. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  366.  
  367. ClockDJ will allow you re-map the keyboard, substitute a string
  368. of characters for a single key depression, or execute a command when
  369. a particular key sequence is pressed. The key definitions and macros
  370. must be created by you and saved in a file; the default file read when
  371. the program starts is sys:clockdj.keys. The key definitions can be changed
  372. by selecting Load Keys from the menu.
  373.  
  374.  
  375. The statement format is:
  376.  
  377. \xxx,yyy\z\wwwwww\r\s\5
  378. |    |   |   |    k c |
  379. |    |   |   |    | | |_The delay between each character in 10ms increments.
  380. |    |   |   |    | | 
  381. |    |   |   |    | |_ s = string; c = command
  382. |    |   |   |    |
  383. |    |   |   |    |_ r = replace character with the string or command
  384. |    |   |   |       k = generate string or command, but keep the original
  385. |    |   |   |           character.
  386. |    |   |   |
  387. |    |   |   |_ String to be generated, or command to be executed.
  388. |    |   |   
  389. |    |   |_ Character to be re-mapped. 
  390. |    |
  391. |    |_ List of qualifiers (see below), separated by commas.
  392. |
  393. |
  394. |_ Delimiter.
  395.  
  396.  
  397. Delimiter
  398. ---------
  399.  
  400. A "\" is the character used to delimit fields. If you wish to include 
  401. one in the string, precede it with a "^".
  402.  
  403. Qualifiers
  404. ----------
  405.  
  406. This defines which keys must be pressed with the re-map character
  407. to generate the string or command. eg., you may want the qualifiers to be
  408. left shift and right alt. If no qualifiers are needed to trigger the re-map, 
  409. the statement would start with a "\\".
  410.  
  411. Multiple qualifiers are specified by separating them by commas: eg.,
  412. "lsh,lat,ctl".
  413.  
  414.  
  415.  
  416. The valid qualifiers are: (all in lower case)
  417.  
  418. lsh    Left shift.
  419. rsh    Right shift.
  420. clo    Caps lock.
  421. ctl    Control (CTRL).
  422. lal    Left alt.
  423. ral    Right alt.
  424. lam    Left Amiga.
  425. ram    Right Amiga.
  426.  
  427.  
  428. The above qualifiers must be specified in lower case.
  429.                      ~~~~
  430.  
  431. Character to be re-mapped.
  432. ------------------------
  433.  
  434. This field is either a single character - "w", for example - or
  435. a string of characters which represents a single character.
  436. If a single character is specified it must be in lower case; if you want
  437. the upper case character re-mapped you must use two statements with
  438. "lsh" and "rsh" qualifiers. This also applies to keys like "{", "!"
  439. etc. whose lower and upper case representations are different.  
  440.  
  441. Valid strings are: (in lower case)
  442.  
  443. f01    The function keys. 
  444. f02            |
  445. f03            |
  446. f04            |
  447. f05            |
  448. f06            |
  449. f07            |
  450. f08            |
  451. f09            |
  452. f10            V
  453.  
  454. hel     Help key.
  455. esc     Escape key.
  456. tab     Tab key.
  457. bsp     Backspace key.
  458. ret     Return key.
  459. del     Delete key.
  460. upa     Up arrow.
  461. lea     Left arrow.
  462. doa     Down arrow.
  463. ria     Right arrow.
  464. kp0     Key pad 0.
  465. kp1     Key pad 1.
  466. kp2     Key pad 2.
  467. kp3     Key pad 3.
  468. kp4     Key pad 4.
  469. kp5     Key pad 5.
  470. kp6     Key pad 6.
  471. kp7     Key pad 7.
  472. kp8     Key pad 8.
  473. kp9     Key pad 9.
  474. kp.     Key pad ..
  475. kp-     Key pad -.
  476. kpe     Key pad enter.
  477. kp)     Key pad ).
  478. kp(     Key pad (.
  479. kp/     Key pad /.
  480. kp+     Key pad +.
  481.  
  482.  
  483. The above keys must be specified in lower case.
  484.                ~~~~
  485.  
  486.  
  487.  
  488. String
  489. ------
  490.  
  491. The string of characters which will replace the character to
  492. be re-mapped. 
  493. Version 3.00 will accept special keys (del, bsp, for example) in the string.
  494. They are specified by preceding the key name with a "&". For example,
  495. "&del" would be delete, "&ret" would be return, etc. Any key listed above
  496. in the "Character to be re-mapped" section can be specified in this way (still
  497. in lower case).
  498.  
  499. Previous version of the program allowed a limited set of control characters
  500. in the string by using the "^". This will still work. The characters
  501. which can be defined in this way are:
  502.  
  503.  
  504. ^[   Escape.
  505. ^h   Backspace.
  506. ^i   Tab.
  507. ^m   Return.
  508.  
  509. The "^" and "\" can be included in the string by preceding them
  510. with a "^".
  511.  
  512.  
  513. A character in a macro string may now include a qualifier: eg., 
  514. "%lal,%ctla" (in lower case)  would specify left-alt-control-a.
  515. Multiple qualifiers should be separated by commas. This can be useful
  516. for entering data in a string gadget (a file requester, for example).
  517. The file name you want in the requester may be "myfile"; specifying
  518. "%ramxmyfile" in the string would clear the gadget before filling it
  519. with "myfile".
  520.  
  521.  
  522.  
  523. The string should appear in the active window.
  524.  
  525. Each statement can be up to 1000 characters long.
  526.  
  527.  
  528. Replace/Keep
  529. ------------
  530.  
  531.  
  532. An "r" causes the re-mapped character to be replaced with the
  533. string or command. A "k" will keep the re-mapped character.
  534.  
  535. This must be specified in lower case.
  536.  
  537.  
  538. String/Command
  539. --------------
  540.  
  541. An "s" will submit the string into the input stream: it should
  542. appear in the active window.
  543.  
  544. A "c" will execute the string as a command. A "^m" (CR) or "&ret" at the end
  545. of the command is not needed. The command will be launched from the clock
  546. task AT THE SAME PRIORITY AS THE CLOCK; the default clock priority is 2.
  547. Some programs do not run well at priority 2 -  eg Txed, Excellence, Blitz -
  548. since they use input handlers running at priority 0. To avoid this kind of
  549. problem either run the clock at priority 0 or use the ARP Arun command and
  550. set the priority of the new task to 0.
  551.  
  552.  
  553. This must be specified in lower case.
  554.  
  555.  
  556. Delay
  557. -----
  558.  
  559. Some programs will not accept a continuous stream of characters in
  560. the input stream. CygnusED and Online! will not, for example. The delay 
  561. value will delay each character by the value*10 milliseconds. Eg.,
  562. a value of 5 specifies 50 ms. CLI windows do not need a delay; you should
  563. experiment to find out whether a program you are using needs the delay.
  564.  
  565. The delay field can be between 0 and 9.
  566.  
  567. If the delay is ommitted, a delay of 0 is assumed.
  568.  
  569. Examples
  570. ~~~~~~~~
  571.  
  572.  
  573. \\f01\arun >nil: <nil: stack 4096 pri 0 ed\r\c
  574.  
  575. Will run ed as a task at priority 0. Notice that no qualifier was specified
  576. for the function key F1. The redirection to nil: is to prevent unwanted
  577. messages in the console window.
  578.  
  579.  
  580.  
  581.  
  582. \ctl,lsh\f01\dir df0:\r\c
  583.  
  584. When CTRL, left shift and F1 are depressed a dir df0: will execute and the
  585. result will appear in the window belonging to the cli which started ClockDJ.
  586.  
  587.  
  588.  
  589.  
  590. \lal\t\arun >nil: <nil: stack 16000 pri 0 Terminals:gt/gt\r\c
  591.  
  592. Run GT when left-alt t is depressed.
  593.  
  594.  
  595.  
  596.  
  597. \lal\esc\newcli <nil: >nil:\r\c
  598.  
  599. Start a new cli when Left-alt esc is depressed.
  600.  
  601.  
  602.  
  603.  
  604. \lal\n\David Jenkins\r\s\5
  605.  
  606. Submit the string when left-alt n is depressed and insert a 50 ms delay
  607. between each character.
  608.  
  609.  
  610.  
  611. \lal\m\Inter-Office Correspondence^m^mFrom:  David Jenkins^m^mTo:^m^mSubject:^m^m______________________________________________________________________________^m^m\r\s\5
  612.  
  613. Submit the string when left-alt m is depressed and insert a 50 ms delay
  614. between each character..
  615.  
  616.  
  617. \clo\`\~\r\s
  618. \clo\1\!\r\s
  619.  
  620.  
  621. Convert Caps lock "`" and "1" to "~" and "!".
  622.  
  623.  
  624. \lal\f\%ramxdf0:file1\r\s
  625.  
  626.  
  627. Is useful for putting a string into a requester. The "%ramx" will submit a
  628. Right Amiga-x which will clear the string gadget before submitting the
  629. "file1" string.
  630.  
  631.  
  632.  
  633.  
  634.                         David Jenkins.
  635.  
  636.  
  637.  
  638.