home *** CD-ROM | disk | FTP | other *** search
/ Magazyn Amiga Shareware Floppies / ma15.dms / ma15.adf / Yak / Docs / Yak.doc < prev    next >
Text File  |  1993-05-17  |  37KB  |  1,094 lines

  1.  
  2.  
  3. Yak v1.5a Documentation
  4. -----------------------
  5.                               Yak Version 1.5a
  6.                              by Martin W. Scott
  7.  
  8.     TABLE OF CONTENTS
  9.  
  10.      Copyright and Distribution 
  11.      Current users: Notez-bien 
  12.      Introduction 
  13.      Limitations 
  14.      Starting Yak 
  15.      Changing Yak's settings 
  16.          Toggles   Patterns   Miscellaneous   Hotkeys 
  17.      Hotkey Actions 
  18.      AmigaDos Patterns 
  19.      Date format strings 
  20.      Problems 
  21.      Program History 
  22.      Compiling Yak 
  23.      Credits and Thanks 
  24.      Contacting the Author 
  25.      Supplementary Hotkeys.doc 
  26.  
  27.  
  28. Copyright
  29. ---------
  30.               Yak (the binary, sources and documentation) is
  31.        Copyright © 1992, 1993 Martin W. Scott. All Rights reserved.
  32.  
  33. Yak  is  freely  redistributable.   The  source  is  included,  and you are
  34. permitted  to  modify  it for personal use, but any modifications made must
  35. NOT  be distributed.  If you have made changes you think others would like,
  36. send them to me and I'll include them in future versions.
  37.  
  38. Since  Yak  is  free,  it  comes  with  NO  WARRANTIES.   The author is not
  39. responsible  for  any  loss or damage arising from the use of Yak; the user
  40. takes all such responsibility.
  41.  
  42. No  charge may be made for Yak, other than a nominal copy fee.  Yak may not
  43. be  distributed  with  a  commercial  product  without  the  author's prior
  44. consent.   Yak  must  be  distributed  with  all  documentation  intact and
  45. unaltered, and preferably with source too.  Permission is expressly granted
  46. to Fred Fish to distribute on his fine collection of disks.
  47.  
  48. Although Yak is freeware, DONATIONS WOULD BE GLADLY ACCEPTED, either money
  49. or stuff you've written yourself.  See  Contacting the Author .
  50.  
  51.  
  52. Current users: Notez-bien
  53. -------------------------
  54. Yak's  preference  file  format  has  changed again, with preferences being
  55. split into two files, "S:Yak.prefs" and "S:Yak.hotkeys".  A Convert program
  56. is  supplied  to  create the 1.5 preference files from a 1.3/1.4 preference
  57. file.   There  are  two  flaws  in  the  conversion:  you  must reenter the
  58. PopCommand  and  DateFormat  strings using the new Hotkey Definition window
  59. (see section Hotkeys for details on how to do this); the other flaw is that
  60. a  hotkey  will  be  created  to  "Show settings window", which is probably
  61. superfluous, given the discussion on CX_POPKEY below.
  62.  
  63. There  are  some  important  changes  between  v1.4  and  1.5 of Yak.  Most
  64. importantly,  the stack requirement has been increased to 4500 bytes, so do
  65. remember to change the stack size in the icon you use to start Yak.
  66.  
  67. Secondly,  the  AppIcon is by default OFF, and should be explicitly enabled
  68. using  the  APPICON=TRUE  tooltype.   This  tooltype  replaces  the  NOICON
  69. tooltype.
  70.  
  71. Thirdly, the CX_POPKEY tooltype is used to determine the hotkey which opens
  72. Yak's  settings window, and this key cannot be altered or overridden within
  73. the  Hotkey  definition  window (unlike in previous versions); however, you
  74. can create other hotkeys which also open Yak's window.
  75.  
  76. Finally,  the  French  documentation  has been temporarily discontinued, to
  77. give  my  translator  time  to  work  on the new documentation.  However, I
  78. thought it worth releasing v1.5 in the meantime.
  79.  
  80. Of  course,  there  have  been  many  other  changes, and you should browse
  81. through this document to accustomise yourself with them.
  82.  
  83.  
  84. Introduction
  85. ------------
  86. Yak  stands for "Yet Another Kommodity" (never was any good at speling - see
  87.  Jokes ), and is a mouse/window manipulation program along the same lines as
  88. DMouse, MightyMouse etc.
  89.  
  90. Why  write  another one?  None of the others (and I've looked at almost all
  91. of them) were quite right for me.  Yak has the following features:
  92.  
  93.     o AutoPoint (sunmouse) that only activates when mouse stops
  94.           can also specify which screens to include/exclude.
  95.           (Compatible with popup-menu type programs)
  96.  
  97.     o AutoPop windows (bring them to front) when they're
  98.           auto-activated;
  99.  
  100.     o KeyActivate windows (when key pressed);
  101.  
  102.     o Activate windows when menu button pressed;
  103.  
  104.     o Click windows to front or back; may also specify which
  105.           screens/windows to include/exclude.
  106.  
  107.     o Cycle screens with mouse;
  108.  
  109.     o Mouse and Screen blanking (hotkey blanking too);
  110.  
  111.     o Extensible hotkey system (like FKey's) with actions to:
  112.  
  113.         Execute a Dos Command;
  114.         Insert text (with embedded hotkeys);
  115.         Insert date (in custom format if locale present);
  116.         Close/Zip/Shrink/Enlarge windows;
  117.         Cycle screens and windows;
  118.         Activate Workbench;
  119.         Center frontmost screen;
  120.         Blank display;
  121.         Pop up a palette on front screen (needs reqtools);
  122.  
  123.     o KeyClick with adjustable volume;
  124.  
  125.     o Wildstar option (like StarBurst) lets you use '*' as wildcard.
  126.  
  127.     o Optional on-screen AppIcon to bring up preferences window.
  128.  
  129.     o Nice gadtools settings window;
  130.  
  131. Look  familiar?  It's a combination of the AutoPoint, ClickToFront, Blanker
  132. and  IHelp/FKey  standard  commodities  (on the Extras disk) with a hint of
  133. KCommodity and DMouse thrown in.
  134.  
  135. And  it's  quite  small:  it takes up about 22K on disk, and about the same
  136. when  running.   It  achieves this memory efficiency by using overlays; the
  137. settings window code is only loaded when needed.
  138.  
  139.  
  140. Jokes
  141. -----
  142. These might be old, but they're good:
  143.  
  144. Q. What's the difference between a goldfish and a goat?
  145. A. A goldfish mucks around in fountains!
  146.  
  147. And if you got that one, you'll definitely get this one...
  148.  
  149. Q. What's the difference between a magic wand and a truncheon (baton).
  150. A. A magic wand is used for cunning stunts.
  151.  
  152. (I *always* say that last answer wrong)
  153.  
  154.  
  155. Limitations
  156. -----------
  157. Yak  only  has  a  plain screen-blanker.  Since the introduction of OS 2.0,
  158. there  has  been  a  profusion  of  fancy screen blankers, such as Spliner,
  159. ASwarm  (various  incarnations),  FracBlank  and more.  I think most people
  160. have their own favourite fancy blanker, so I didn't include one in Yak.
  161.  
  162. There  is  no mouse-acceleration.  The system default one (settable via the
  163. Input  preferences)  is  more than adequate as far as I am concerned.  If I
  164. get  enough  requests,  I'll  add  faster  acceleration (so far, hardly any
  165. received).
  166.  
  167.  
  168. Starting Yak
  169. ------------
  170. Yak  is  designed to be run from the sys:WBStartup drawer, but may be 'run'
  171. from the Shell (not recommended, as it will use significantly more memory).
  172. All  Yak settings are stored in two files, a prefs-file, "S:Yak.prefs", and
  173. a  hotkey  file, "S:Yak.hotkeys".  When you first use Yak, configure it the
  174. way you like, then save that configuration for later invocations.
  175.  
  176. NB:  Yak  needs  a  stack size of 4500 bytes.  You should set this in Yak's
  177. icon, or if starting it from the Shell, use the following commands:
  178.  
  179.     stack 4500
  180.     run >nil: yak
  181.  
  182.  
  183. The  only tooltypes that Yak takes are the standard Workbench ones (such as
  184. DONOTWAIT),  the  standard  Commodities  ones  (such  as  CX_POPUP) and the
  185. AppIcon ones.  Those tooltypes are:
  186.  
  187. ToolType    Category    Description              Default
  188. ---------------------------------------------------------------------------
  189. CX_POPKEY    HOTKEY        Key to show settings window          RCommand Help
  190. CX_PRIORITY    INTEGER        Priority of this commodity          0
  191. CX_POPUP    BOOLEAN        Show settings window on startup   NO
  192.  
  193. APPICON        BOOLEAN        If TRUE, an AppIcon is made       FALSE
  194. ICONNAME    STRING        Name of AppIcon              "Yak!"
  195. ICONXPOS    INTEGER        x-coordinate of AppIcon          floating
  196. ICONYPOS    INTEGER        y-coordinate of AppIcon          floating
  197.  
  198. You  should also have the tooltype "DONOTWAIT" set if you want to start Yak
  199. from your SYS:WBStartup drawer.
  200.  
  201. The  AppIcon  facility  is  optional,  and  by  default  is  off.   Specify
  202. APPICON=TRUE  if  you  want  it.   If  you do, Yak puts an AppIcon onto the
  203. Workbench  screen,  and  when  it is double-clicked, the Settings Window is
  204. opened.   The  icon imagery is obtained from the icon Yak was started from,
  205. which allows you to customise the AppIcon to your colours/resolution simply
  206. by changing Yak's icon.
  207.  
  208. The CX_PRIORITY may be useful in enabling Yak and other commodities to work
  209. better together.  See, for example, notes on the RMB Activate toggle below.
  210.  
  211.  
  212. Changing Yak's settings
  213. -----------------------
  214. All  of  Yak's  settings  may be modified by means of it's settings window.
  215. Once Yak is started, you may bring up this window by the following means:
  216.  
  217.     Pressing RCommand Help (i.e. the Right Amiga key and the Help key).
  218.         This key-sequence is configurable (via the CX_POPKEY tooltype);
  219.  
  220.     Double-clicking Yak's AppIcon (if this feature is set);
  221.  
  222.     Start Yak again (from Workbench tool icon);
  223.  
  224.     Via the Commodities Exchange (on the Extras disk).
  225.  
  226. The  window then opened contains many gadgets, grouped into classes.  These
  227. classes are:
  228.  
  229.      Toggles 
  230.      Patterns 
  231.      Miscellaneous 
  232.      Hotkeys 
  233.  
  234. Remember  that  you  must  press the RETURN, ENTER or TAB key once you have
  235. edited  a string gadget, so that the change is registered.  Simply clicking
  236. outside  it  will lose the changes.  (The TAB key activates the next string
  237. gadget for text entry).
  238.  
  239. Also  (and  this  applies  particularly to the hotkey window), Intuition by
  240. default  does  not let you cut and paste between string gadgets, but if you
  241. want  this,  you  should  get  "NewEdit" by Uwe Roehm, which adds clipboard
  242. copying and pasting (it's on a Fish disk and ftp sites).
  243.  
  244. Additionally,  the  two  gadgets  "Hide"  and  "Quit"  perform the standard
  245. commodity  operations  respectively  of  hiding  the  settings  window  and
  246. terminating  Yak.   Clicking  the  window's  close-gadget  is equivalent to
  247. hiding the interface rather than ending Yak.
  248.  
  249. The  settings  window  also  has a menu with "Hide" and "Quit" items (which
  250. operate  as  the  gadgets  of the same name), plus items "Load" and "Save".
  251. All  changes  to  Yak's  settings will be lost unless you select the "Save"
  252. item.   If  you wish to restore you're last-saved settings, you may use the
  253. "Load" item.
  254.  
  255.  
  256. Toggles
  257. -------
  258. The following toggles are available:
  259.  
  260.      AutoPoint 
  261.      AutoPopToFront 
  262.      Key Activate 
  263.      Click To Front 
  264.      Click To Back 
  265.      Screen To Back 
  266.      Screen Activate 
  267.      RMB Activate 
  268.      Wild star 
  269.  
  270.  
  271. AutoPoint
  272. ---------
  273. Activate  window under mouse.  This behaves almost exactly like Commodore's
  274. AutoPoint  commodity,  in  that  it  only activates a window when the mouse
  275. stops.  AutoPoint is compatible with popup-menu type programs.
  276.  
  277. Note  that  the AutoPoint and AutoPopToFront functions only take place when
  278. NO  qualifier  (mouse  or  keyboard)  is pressed.  Not only does this avoid
  279. conflict   with   other   programs,   it   provides  a  way  of  preventing
  280. activation/popping when it's not desired.
  281.  
  282. See also:   AutoPopToFront    AutoScreens 
  283.  
  284.  
  285. AutoPopToFront
  286. --------------
  287. Only  operative  when  AutoPoint is set, this tells Yak to bring windows to
  288. the  front  as  well  as activating them.  The exception is when the window
  289. under the mouse has a requester showing.
  290.  
  291. See also:   AutoPoint    AutoScreens    PopWindows 
  292.  
  293.  
  294. RMB Activate
  295. ------------
  296. When  selected, the window under the mouse will be activated when the right
  297. mouse  button  is  pressed, regardless of the status of AutoPoint.  This is
  298. useful in getting the menu you want without either waiting for AutoPoint to
  299. activate the window or clicking into the window to make it active.
  300.  
  301. For  instance, when using the screen depth gadgets, the new front screen is
  302. not  activated,  but  with  this  toggle set, clicking the RMB will get the
  303. correct menus.
  304.             
  305. Note  1:  If  there  is  no window under the mouse, the first window on the
  306. screen will be activated.
  307.             
  308. Note  2:  To  work properly with popupmenu-type programs, Yak's CX_PRIORITY
  309. may need to be higher than the popupmenu program's CX_PRIORITY.
  310.  
  311.  
  312. Key Activate
  313. ------------
  314. Activates window under mouse when key is pressed.  You should only need one
  315. of AutoPoint or KeyActivate.
  316.  
  317.  
  318. Click To Front
  319. --------------
  320. Lets you bring a window to the front of others by double-clicking over it.
  321.  
  322. As with AutoActivate/AutoPopToFront features, clicking to front and back is
  323. disabled whilst a keyboard qualifier is pressed.
  324.  
  325. See also:   ClickScreens    ClickWindows 
  326.  
  327.  
  328. Click To Back
  329. -------------
  330. Lets  you  push  a window to the back of others by pressing and holding the
  331. left mousebutton, then clicking the right mousebutton.
  332.  
  333. As with AutoActivate/AutoPopToFront features, clicking to front and back is
  334. disabled whilst a keyboard qualifier is pressed.
  335.  
  336. See also:   ClickScreens 
  337.  
  338.  
  339. Screen To Back
  340. --------------
  341. Using  the  same mouse sequence as Click To Back, move a screen to the back
  342. of others if:
  343.             
  344.     either    the window under the mouse is a backdrop
  345.         window (like the main Workbench window)
  346.     or    there is only one window on the screen.
  347.  
  348. See also:   Click To Back 
  349.  
  350.  
  351. Screen Activate
  352. ---------------
  353. When  checked,  Yak will activate screens that it shuffles by hotkeys (i.e.
  354. Screen  Cycle  hotkey  and  LCommand  m  hotkey).  This is a toggle because
  355. conflicts arise with some programs.  This is similar (but not identical) to
  356. Steve  Tibbet's  WindX.  By activating screens I mean that it activates the
  357. window under the mouse-pointer of the new front screen.
  358.  
  359.  
  360. Wild star
  361. ---------
  362. When  on,  enables  the  use of * as an AmigaDos pattern-matching character
  363. (like MSDOS and UNIX *).  (This is what the StarBurst program does.)
  364.  
  365.  
  366. Inclusion Patterns
  367. ------------------
  368. The  pattern  gadgets  allow  you  to specify which screens and windows are
  369. affected  by various features of Yak.  All patterns are inclusion patterns,
  370. i.e.   the  title  of  the  window or screen must MATCH the pattern for the
  371. relevant feature to work.  All patterns are standard AmigaDos Patterns.
  372.  
  373. The following patterns are available:
  374.  
  375.      AutoScreens 
  376.      ClickScreens 
  377.      PopWindows 
  378.      ClickWindows 
  379.  
  380.  
  381. AutoScreens
  382. -----------
  383. AutoPoint will work on screens whose title matches this pattern.
  384.  
  385.  
  386. ClickScreens
  387. ------------
  388. Click To Front and Click To Back will work on screens whose title
  389. matches this pattern.
  390.  
  391.  
  392. PopWindows
  393. ----------
  394. AutoPopToFront will work on windows whose title matches this pattern.
  395.  
  396.  
  397. ClickWindows
  398. ------------
  399. Click To Front will work on windows whose title matches this pattern.
  400.  
  401.  
  402. Miscellaneous Settings
  403. ----------------------
  404. Yak has a few other features controlled by these gadgets.  They are:
  405.  
  406.      ClickVolume 
  407.      ScreenTimeOut 
  408.      MouseTimeOut 
  409.      MouseBlank Method 
  410.  
  411.  
  412. ClickVolume
  413. -----------
  414. Controls  the volume of the KeyClick (the sound made when you press a key).
  415. A  volume  of  zero  means 'no click' (yes, that's obvious, but when set to
  416. zero, the audio device won't be opened at all).  Maximum volume is 64.
  417.  
  418.  
  419. ScreenTimeOut
  420. -------------
  421. If  no user input (mouse or keyboard) occurs over this period (of seconds),
  422. the  screen will blank.  Set it to 0 to disable screen blanking altogether.
  423. The  blanking  is  performed  by  opening  a  2-color  screen with the same
  424. displaymode as the frontmost screen.
  425.  
  426.  
  427. MouseTimeOut
  428. ------------
  429. If mouse isn't moved in the period specified, the mouse pointer will blank.
  430. This is only operational if the MouseBlank Method is not set to "None".
  431.  
  432.  
  433. MouseBlank Method
  434. -----------------
  435. This  gadget  determines  the method by which the mouse pointer is blanked.
  436. "None"  disables  mouse-blanking altogether, "Sprites" means blank mouse by
  437. disabling (all) sprites, and "Copper" means blank mouse by modifying copper
  438. list.   This  latter  option only disables sprite 0 (the mouse-pointer), so
  439. terminal  programs  using a sprite for the cursor work okay, but the method
  440. is a bit less robust (the mouse occasionally comes back on).
  441.  
  442. See also:   Problems 
  443.  
  444.  
  445. Defining Yak Hotkeys
  446. --------------------
  447. Clicking  on  the  "Hotkeys..." gadget opens up a new window which lets you
  448. create, edit and delete hotkeys.  Making a key a hotkey means that when the
  449. key is pressed, Yak performs some action (of which there are many to choose
  450. from).   Hotkeys  are defined using a hotkey description string, which is a
  451. very  flexible  method  of  defining input events.  For details on creating
  452. hotkey descriptions, consult the supplementary Hotkeys.doc documentation.
  453.  
  454. You  can  have  as many hotkeys as you like, and each action may pertain to
  455. more than one hotkey.
  456.  
  457. There  are  two  lists  in  the Hotkey Definition window; the left-hand one
  458. lists  the  available  actions,  and  the other lists the hotkeys currently
  459. defined for the selected action.
  460.  
  461. To  add  a  new  hotkey, first select the action you wish it to perform (by
  462. clicking  its  name  in  the left-hand list).  Then click on the Add gadget
  463. below  the  Hotkey  list.   The  string  gadget below this list will become
  464. active, and you should type in the hotkey description string.
  465.  
  466. For  certain actions, other gadgets will become active.  The Options gadget
  467. (the  cycle  gadget  below  the  Actions  list)  determines what happens to
  468. screens  when  the  hotkey  is  pressed.   Currently, the options are to do
  469. nothing,  to  bring  the  Workbench  to the front, and to bring the default
  470. public  screen  to  the  front.  Typically this will be used in Dos Command
  471. hotkeys to automatically show the screen a window opens on.
  472.  
  473. The  Argument  gadget  is  a string gadget which becomes active for certain
  474. Action  types,  and  provides a means of setting a string to be attached to
  475. the Hotkey.
  476.  
  477. You  can  edit an existing hotkey by selecting it and editing the necessary
  478. gadgets.  And of course the Delete gadget deletes a hotkey from Yak's list.
  479.  
  480. When  you're  finished  editing hotkeys, click on the "Return..." gadget to
  481. return  to  the  main  settings  window, or the close gadget to 'hide' Yak.
  482. Remember  to  save  your  changes  using  the  "Save" menu item of the main
  483. settings window.
  484.  
  485. See  Hotkey Actions 
  486.  
  487.  
  488. Hotkey Actions
  489. --------------
  490. The many actions available are:
  491.  
  492.      Dos Command 
  493.      Close Window 
  494.      Zip Window 
  495.      Shrink Window 
  496.      Expand Window 
  497.      Cycle Windows 
  498.      Open Palette 
  499.      Screen to Front 
  500.      Screen to Back 
  501.      Activate Workbench 
  502.      Center Screen 
  503.      Blank Display 
  504.      Insert Text 
  505.      Insert Date 
  506.      Show Yak Interface 
  507.  
  508.  
  509. Dos Command
  510. -----------
  511. Argument: command to execute
  512.  
  513. Executes  the  Dos  command as specified in the Argument string.  Note that
  514. you  may  use  the  Options gadget to bring the Workbench or default public
  515. screen to the front (useful if the command causes a window to open).
  516.  
  517. The  command  is  executed asynchronously, so there is no need to prepend a
  518. run  command.   Also,  if  the  command  generates  any output (or requires
  519. input),  a console window will open.  You can of course specify redirection
  520. (as in the shell).
  521.  
  522. Examples:
  523.  
  524.   A hotkey to open a shell:
  525.  
  526.     This  is  traditionally attached to the hotkey "lcommand esc", and mine
  527.     is set up to run the command
  528.  
  529.     "NewShell CON:79/177/582/78/AmigaShell/CLOSE/ALT2/58/660/197"
  530.  
  531.     Note  the  use  of  the ALT flag in the console specification, which is
  532.     poorly  documented (read "not mentioned").  I actually use two hotkeys,
  533.     one to start a normal shell, and one to start a CShell.
  534.  
  535.   A hotkey to free unused memory:
  536.  
  537.     SAS/C  uses  shared libraries that can often fill precious chip memory.
  538.     I have a hotkey set up with the command "avail >nil: flush" which frees
  539.     this memory.
  540.  
  541.   A hotkey to list contents of each disk inserted:
  542.  
  543.     Set the hotkey to "diskinserted", and the Argstring to "Dir df0:".
  544.  
  545. See also:   Problems    Hotkeys.doc 
  546.  
  547.  
  548. Close Window
  549. ------------
  550. Argument: NONE
  551.  
  552. Close  the  currently  active window (this is equivalent to clicking on the
  553. window's close gadget).
  554.  
  555.  
  556. Zip Window
  557. ----------
  558. Argument: NONE
  559.  
  560. Zip  the  currently  active  window  (this  is  equivalent to clicking on the
  561. window's "Toggle size" gadget).
  562.  
  563.  
  564. Shrink Window
  565. -------------
  566. Argument: NONE
  567.  
  568. Make the currently active window as small as possible.
  569.  
  570.  
  571. Expand Window
  572. -------------
  573. Argument: NONE
  574.  
  575. Make the currently active window as large as possible.
  576.  
  577.  
  578. Cycle Windows
  579. -------------
  580. Argument: NONE
  581.  
  582. Bring  the  rearmost  window  to  the  front.  Useful for getting at deeply
  583. 'buried' windows.
  584.  
  585.  
  586. Open Palette
  587. ------------
  588. Argument: NONE
  589.  
  590. Open a palette on the frontmost screen.  The palette is run asynchronously,
  591. and  you  can  open  as many as you want (subject to memory).  However, Yak
  592. cannot  be  terminated  while  palettes remain open.  The Options gadget is
  593. enabled  for  this  command  (so you can open a palette specifically on the
  594. Workbench screen, if you so wish.
  595.  
  596. NOTE:  You  must  have  reqtools.library  installed on your system for this
  597. action to work.
  598.  
  599. WARNING:  Always close the palette window before causing the screen it's on
  600. to  close,  otherwise  you'll  at least be left with an open screen, and at
  601. worst crash the system.
  602.  
  603.  
  604. Screen to Front
  605. ---------------
  606. Argument: NONE
  607.  
  608. Bring the rearmost screen to front.
  609.  
  610. See also:   ScreenActivate 
  611.  
  612.  
  613. Screen to Back
  614. --------------
  615. Argument: NONE
  616.  
  617. Push the front screen behind all others.
  618.  
  619. See also:   ScreenActivate 
  620.  
  621.  
  622. Activate Workbench
  623. ------------------
  624. Argument: NONE
  625.  
  626. Activate  a  Workbench window (and if necessary, bring the Workbench screen
  627. to  the  front).   This  enables  you to access the Workbench menus without
  628. having  to find a Workbench window to activate (if, for instance, you had a
  629. shell window the size of the screen).
  630.  
  631.  
  632. Center Screen
  633. -------------
  634. Argument: NONE
  635.  
  636. Center horizontally the front screen. 
  637.  
  638.  
  639. Blank Display
  640. -------------
  641. Argument: NONE
  642.  
  643. Immediately blank the display.
  644.  
  645. See also:   ScreenTimeOut .
  646.  
  647.  
  648. Insert Text
  649. -----------
  650. Argument: text to be inserted
  651.  
  652. Inserts  the  text  specified  in the Argument string into the read stream.
  653. This string is preprocessed as follows:
  654.  
  655.     \n        converted to carriage-return
  656.     \r        converted to carriage-return
  657.     \t        converted to tab
  658.     \\        converted to backslash \
  659.     <hotkey desc>    converted to specified hotkey
  660.     \<        converted to <
  661.  
  662. Because  of  this  preprocessing, insertion strings can perform many useful
  663. tasks.  For example, I have a hotkey set up to insert my name and the date,
  664. using the argument string (without the quotes):
  665.  
  666.     "Martin W Scott, <lcommand d>"
  667.  
  668. Here, the hotkey "lcommand d" is another Yak hotkey I have set up to insert
  669. the  date.  By using more complicated strings, you can create simple macros
  670. for other programs.
  671.  
  672. CAVEAT: Embedded hotkey strings, though useful, should be used with care.
  673. In particular, you must avoid recursive definitions, e.g.
  674.  
  675.     f1 insert text    "<f2>"
  676.     f2 insert text    "<f1>"
  677.  
  678. Pressing  f1  or f2 results in an endless loop.  If you are silly enough to
  679. do this, start the Commodities exchange and make Yak inactive.  Then select
  680. the  Exchange's  Show  Interface  gadget  and delete/redefine the offending
  681. hotkey(s).
  682.  
  683. Another  thing to be aware of is that strings that call other hotkeys (e.g.
  684. the date insertion example above) may not work as you might think.  Suppose
  685. the  Argument  string  was  "<lcommand d>\n".  This would actually create a
  686. carriage  return  and  THEN  the  date,  because  by  the time Yak gets the
  687. "lcommand d" hotkey, the carriage return has gone through the input handler
  688. and been sent to the active window.
  689.  
  690.  
  691. Insert Date
  692. -----------
  693. Argument: date format string
  694.  
  695. Insert  the  date  into  the  read-stream (and so into the currently active
  696. window).   If  you are running AmigaDos 2.1 or above, you may customise the
  697. format  of  the  date  inserted.   This format is specified in the Argument
  698. string.   See  Date  format  strings.  If you are unlucky
  699. enough  to  be  running  AmigaDos  2.0,  the  date is in standard DD-MMM-YY
  700. format.
  701.  
  702. Example: the format "%e %B %Y" generates dates of the form "1 May 1993".
  703.  
  704.  
  705. Show Yak Interface
  706. ------------------
  707. Argument: NONE
  708.  
  709. Show  Yak's  settings window (if necessary by bringing the Workbench screen
  710. to  the  front and opening the window).  This is the same function that the
  711. CX_POPKEY hotkey performs.
  712.  
  713.  
  714. AmigaDos Patterns
  715. -----------------
  716. AmigaDos   patterns   are   used   to   include/exclude  a  list  of  named
  717. screens/windows for a particular feature.  These pattern specifications aid
  718. in compatibility with other programs you may use.
  719.  
  720. Pattern  matching  is  case-sensitive.  "Amiga" is not the same as "AMIGA".
  721. The standard AmigaDos patterns available are:
  722.  
  723.     ?    Matches a single character.
  724.     #    Matches the following expression 0 or more times.
  725.     (ab|cd) Matches any one of the items separated by '|'.
  726.     ~    Negates the following expression.  It matches all strings
  727.         that do not match the expression (aka ~(foo) matches all
  728.         strings that are not exactly "foo"
  729.     [abc]    Character class: matches any of the characters in the class.
  730.     a-z    Character range (only within character classes).
  731.     %    Matches 0 characters always (useful in "(foo|bar|%)").
  732.     *    Synonym for "#?", not available by default.  Available if
  733.         Wild star option is set.
  734.  
  735. If  you're  not  used to patterns, you may find all of that quite daunting.
  736. Consult your system manual for further details.  There are two basic things
  737. you'll  want:  either  a  finite  list  of names that the feature should be
  738. enabled  on, or a finite list for which it should be disabled.  To ENABLE a
  739. feature on all objects (be they screens or windows, as appropriate) use the
  740. "#?"  pattern (matches everything).  To enable a feature on N objects named
  741. "name1" to "nameN", use
  742.  
  743.     (name1|name2| ... |nameN)
  744.  
  745. and to DISABLE the feature for these names, prepend a tilde ~, viz.
  746.  
  747.     ~(name1|name2| ... |nameN)
  748.  
  749. An example: I don't want AutoPopToFront popping the Workbench window or any
  750. Protext (WP from Arnor) window, so exclude them with the pattern
  751.  
  752.     ~(Workbench|#?Arnor#?)
  753.  
  754. Note that the second 'name' is actually a pattern, which matches any title
  755. with the text "Arnor" in it.
  756.  
  757. Another  example:  I  don't want AutoActivation on Directory Opus's screen.
  758. It  doesn't show its title in the program so I have to use ARTM or Xoper to
  759. find  the  screen's  name, and find that it's "DOPUS.1".  Figuring that the
  760. "1"  would  bump  to "2" if I ran two copies, I decide to exclude all DOpus
  761. screens using
  762.  
  763.     ~(DOPUS#?)
  764.  
  765.  
  766. Note  1:  Specifying  the Workbench screen in a pattern is a bit tricky, as
  767. it's  title  keeps  changing, depending on what window is active.  For most
  768. purposes,   a   pattern  such  as  "#?Workbench#?"  will  match,  but  some
  769. applications  set  the  Workbench  title  to  a descriptive string of their
  770. application.
  771.  
  772. Note  2:  Screens  or  windows  with titles that are unset (i.e.  are NULL)
  773. always pass the patterns.
  774.  
  775.  
  776. Date format strings
  777. -------------------
  778. For  date-insertion  hotkeys,  you  must specify a locale-style date format
  779. string  (and  need  to  be  running AmigaDos 2.1 or higher).  The available
  780. formatting options under locale.library are as follows:
  781.  
  782.     %a - abbreviated weekday name
  783.     %A - weekday name
  784.     %b - abbreviated month name
  785.     %B - month name
  786.     %c - same as "%a %b %d %H:%M:%S %Y"
  787.     %C - same as "%a %b %e %T %Z %Y"
  788.     %d - day number with leading 0s
  789.     %D - same as "%m/%d/%y"
  790.     %e - day number with leading spaces
  791.     %h - abbreviated month name
  792.     %H - hour using 24-hour style with leading 0s
  793.     %I - hour using 12-hour style with leading 0s
  794.     %j - julian date
  795.     %m - month number with leading 0s
  796.     %M - the number of minutes with leading 0s
  797.     %n - insert a linefeed
  798.     %p - AM or PM strings
  799.     %q - hour using 24-hour style
  800.     %Q - hour using 12-hour style
  801.     %r - same as "%I:%M:%S %p"
  802.     %R - same as "%H:%M"
  803.     %S - number of seconds with leadings 0s
  804.     %t - insert a tab character
  805.     %T - same as "%H:%M:%S"
  806.     %U - week number, taking Sunday as first day of week
  807.     %w - weekday number
  808.     %W - week number, taking Monday as first day of week
  809.     %x - same as "%m/%d/%y"
  810.     %X - same as "%H:%M:%S"
  811.     %y - year using two digits with leading 0s
  812.     %Y - year using four digits with leading 0s
  813.  
  814. That  list  is  pretty  exhaustive,  and  should handle most needs; you can
  815. insert your own text freely in the format string.  Some examples:
  816.  
  817.     "The time is %X"    gives (e.g.)    "The time is 20:44:16"
  818.     "Have a nice %A!"    gives (e.g.)    "Have a nice Monday!"
  819.  
  820. If  you  need  more  details, consult the AutoDocs on locale.library if you
  821. have them.
  822.  
  823.  
  824. Problems
  825. --------
  826. There  are  a  few problems that I am currently aware of.  Firstly, a shell
  827. created by a Dos Command hotkey doesn't have the stack or current directory
  828. as  set  at boot-time (in the Startup-Sequence).  It DOES retain your path,
  829. though.   Your Shell-Startup file should set the CD and the stack you need.
  830. By  default, processes started in this way have the system boot disk (SYS:)
  831. as their current directory.
  832.  
  833. The  Close  window  hotkey doesn't work for shell windows.  This is because
  834. they handle intuition events differently from other windows.
  835.  
  836. If  you're not happy with Yak's mouse-blanking, you could try the Commodore
  837. MouseBlank  commodity (WB3.0), which should blank the mouse on all displays
  838. correctly.
  839.  
  840. NOTE  FOR  AMOS  USERS:  I  hate AMOS (that's enough of my opinion), partly
  841. because it is so system unfriendly.  It completely steals the input stream,
  842. so  that  mouse  blankers  (in programs like Yak) kick-in, thinking there's
  843. been  no input, and the mouse isn't restored, because there's no mousemoves
  844. to unblank it.  Because Yak uses a rather bad blanking method, problems can
  845. occur (mouse vanishes and won't come back).  Two solutions:
  846.  
  847.     1) Use 'Copper' blanking.
  848.     2) Set MouseBlankTime to zero. You'll still have key blank,
  849.        but no timed blank.
  850.  
  851. Then the AMOS problem of the pointer disappearing should be solved.
  852.  
  853.  
  854. Program History
  855. ---------------
  856.  (* = new feature)
  857.  
  858.  v1.5a    - Stack requirement increased (may have been outgrowing previous
  859.        stack size).
  860.  
  861.     - NOICON tooltype removed, APPICON tooltype added in its place.
  862.  
  863.     - Further tweaking of new Hotkey system.
  864.  
  865.  v1.5    * Extensible hotkey system added.
  866.  
  867.     * Revamped GUI.
  868.  
  869.     * Documentation now in AmigaGuide format (oh really??).
  870.  
  871.     * Date insertion now also works on 2.0 machines.
  872.  
  873.     - New preference file format, and now also uses a hotkey file.
  874.       Prefs files for earlier versions cannot be loaded.
  875.  
  876.  
  877.  v1.4a    * Added RMB Activate toggle - window under mouse is activated when
  878.       right mouse button pressed.
  879.  
  880.     * New improved mouse-blanking: Method 'Sprites' is same as before,
  881.           but method 'Copper' has been completely rewritten; it still only
  882.           blanks sprite 0, but is now compatible with LacePointer.
  883.  
  884.     - Now compiled with SAS/C 6.2.
  885.  
  886.  
  887.  v1.4    - Range-checking now performed on number-gadgets.
  888.  
  889.     - NewLookMenus for WB 3.0.
  890.  
  891.  v1.3f    * Settings window now font-sensitive (uses screen font).
  892.  
  893.     * ScreenToBack by mouse-clicks now activates first window on front
  894.           screen when no window is under mouse (this helps programs like
  895.           MagicMenu).
  896.  
  897.     * Screen blanking now opens screen with same displaymode as front
  898.           one.
  899.  
  900.     - Further mouse-blanking bug removed.
  901.  
  902.     - Conflicts between window-cycle hotkey and key activation
  903.           resolved, although they don't really go well together.
  904.  
  905.     - Window-cycle (via hotkey) now also cycles Workbench windows; when
  906.           initially written, Yak emulated IHelp's (CBM OS2.0) function of
  907.           cycling application windows only, but I get so many reports from
  908.           people saying that this function doesn't work, I figured folks
  909.           really want to cycle ALL windows.
  910.  
  911.     - More enforcer-hits removed (oh I wish I had an 030 etc., then I
  912.           could fix these all by myself, instead of relying on others
  913.           informing me).
  914.  
  915.  
  916.  v1.3e    - Version string added.
  917.  
  918.     - Now a choice of mouse-blanking method (so quit the flames...).
  919.  
  920.  v1.3d    - Fixed bug in KeyActivate routine (was losing first keystroke).
  921.  
  922.  v1.3c    - Fixed small enforcer hit which may have caused Window cycle to
  923.       fail. 
  924.  
  925.  
  926.  v1.3b    * New ClickWindows pattern, allows you to specify which windows may
  927.           be clicked-to-front (n.b. has no effect on click-to-back).
  928.  
  929.     * Mouse-blank timeout may now be specified.
  930.  
  931.     - [Click volume now specified via integer gadget].
  932.  
  933.  
  934.  v1.3a    - Now all Intuition calls are outside the input-handler to avoid
  935.       possible deadlocks (thanks to Eddy Carroll for reporting this).
  936.  
  937.     * New hotkey: Screen to back. Previously, this was hardcoded to
  938.           LCommand m, but can now be changed.
  939.  
  940.     * New hotkey: Blank display. Instant screen-blank.
  941.  
  942.     * Can now click screens to back in the titlebar (previously not
  943.           permitted due to system conflicts).
  944.  
  945.     * Palette runs asynchronously now, and you can have as many open as
  946.           you like. They MUST be closed before their parent screen closes,
  947.           and before Yak is terminated.
  948.  
  949.     - Now a disk-insertion halts screen-blanking.
  950.  
  951.     - Centering of screens via hotkey adjusted by 1 pixel, to be
  952.           consistent with Display, AutoCentre etc. (i.e. I was wrong...)
  953.  
  954.     - If started from Workbench (the usual way) Yak now sets it's
  955.           current directory to SYS:; this is then inherited by shells
  956.           created with PopCommand.
  957.  
  958.     - Some more mouse-blanking problems fixed. Also, screen-blanking
  959.           mouse-flicker fixed - hardly anyone uses Yak's blanker, so it
  960.           went unnoticed.
  961.  
  962.     - Fixed small bug in channel allocation priority.
  963.  
  964.     - Bug fixed in hotkey cancellation (by clearing string gadget).
  965.           Previously used to cancel a hotkey only for current session, and
  966.           still continue to show old key definition. How do I miss these
  967.           things?
  968.  
  969.  
  970.  v1.3    * Executable is now overlayed. Now uses less memory than earlier
  971.           versions, even with new features!
  972.  
  973.     * Can now specify which screens AutoActivate and ClickToFront/Back
  974.           operate on, by means of a standard AmigaDos pattern.
  975.  
  976.     * Date insertion uses locale.library-style format specification.
  977.       (Unfortunately, date insertion feature now requires WB 2.1).
  978.  
  979.     * AutoPopToFront feature added.
  980.  
  981.     * Improved mouse-blanking: now Yak only blanks sprite 0, so
  982.           programs that use other sprites are unaffected.
  983.  
  984.     * PopCommand now retains paths (but not directory/stack in
  985.           startup-sequence).
  986.  
  987.     - Auto-activation and key-activation now works more sensibly.
  988.  
  989.     - Somehow managed to remove volume check for clicking. Now a volume
  990.           of zero means that no click will be attempted.
  991.  
  992.     - Date insertion now inserts key-up events to aid compatibility
  993.           with other programs.
  994.  
  995.     - Window cycling (via hotkey) now works on all screens (previously
  996.           just on WB, but I didn't mention it in the docs).
  997.  
  998.      NB    - Contention code in v1.2c was rather severe in cases, and
  999.           unnecessary if I changed the way Yak AutoActivated. Now Yak only
  1000.           AutoActivates (and AutoPops) when no qualifier or mouse-button is
  1001.           pressed. Contention-checking code has therefore been removed.
  1002.       Should be no problems with well-behaved programs.
  1003.  
  1004.      NB    - Settings file changed; now uses S:Yak.prefs instead of
  1005.           S:Yak.config; this is because format of that file changed. A
  1006.           'Convert' program is supplied to create a 1.3 file from existing
  1007.           1.2 file.
  1008.  
  1009.     - [Changed prefs window layout; looks nicer now (I think).]
  1010.  
  1011.  
  1012.  v1.2c    - Inclusion of HotKey documentation (adapted from Stefan Becker's
  1013.           ToolManager documentation).
  1014.  
  1015.     - Enforcer hit removed. (But there may be more).
  1016.  
  1017.     - Improved contention-checking; now Yak's AutoActivate works with
  1018.           Dragit V2, for instance.
  1019.  
  1020.  
  1021.  v1.2b    - maximum length of hotkey definitions increased from 29 to 49
  1022.           characters to allow (almost) all possible definitions.
  1023.  
  1024.  
  1025.  v1.2a    - small bug crept into v1.2; wasn't removing old hotkey when
  1026.           changing existing definition.
  1027.  
  1028.  <history for v1.2 and below has been omitted>
  1029.  
  1030.  
  1031. Compiling Yak
  1032. -------------
  1033. Yak has been written to compile under SAS/C, and as from v1.4a, using SAS/C
  1034. version 6.2.  The code passes cleanly with ANSI checking, so users of other
  1035. ANSI-compliant  compilers should have little problem recompiling - the only
  1036. places changes may be needed are in SAS-specific keywords (like __saveds).
  1037.  
  1038. Yak  uses overlays, but this can be compiled out by removing the definition
  1039. USE_OVERLAYS in SCOPTIONS.
  1040.  
  1041. GTB  2.0b  was  used  to  generate  the user-interface.  The generated code
  1042. (popup.c,  popup.h)  needs  only  minimal modification, specifically to use
  1043. NewLookMenus  under  WB3.0  and  above;  changes  are indicated by comments
  1044. beginning with four asterisks, e.g.  /**** ADDED */.
  1045.  
  1046.  
  1047. Credits
  1048. -------
  1049. Yak  is written entirely in C, and compiled with SAS/C 6.2.  Thanks to Reza
  1050. Elghazi for help in the transition to 6.2.
  1051.  
  1052. The  Settings  window  gadgetry was created using the excellent (apart from
  1053. the v2.0 glitch:) GadToolsBox v2.0b, from Jaba Development.
  1054.  
  1055. Yak  makes  use  of  reqtools.library,  which  is  Copyright Nico François.
  1056. Thanks  must also go to Mike Meyer et.  al.  for Mg3, Steve Koren for SKsh,
  1057. Matt  Dillon  for  DMouse (which answered many of my how-to questions), and
  1058. Kai  Iske for KCommodity, which is where the KeyClick sound was 'borrowed'.
  1059. Yak also uses WB2CLI, a very useful little link-module by Mike Sinz.
  1060.  
  1061. The   HotKey  definition  documentation  is  taken  from  the  ToolsManager
  1062. distribution, by kind permission of Stefan Becker.
  1063.  
  1064. Thanks to Stefan Sticht for his public domain MouseBlanker commodity - this
  1065. is where I pinched the 'Copper' mouse-blanking method.
  1066.  
  1067. And  a  big  thank-you to all those people who have written to me about Yak
  1068. with  suggestions  and bug reports, and especially to Gaël Marziou who drew
  1069. the  nice  Yak icons and translated the documentation into French -- thanks
  1070. Gaël!
  1071.  
  1072.  
  1073. Contacting the Author
  1074. ---------------------
  1075. I can be reached with comments, suggestions, bug reports, praise, money etc.
  1076. at the following addresses:
  1077.  
  1078. BEFORE END OF JULY 1993:
  1079.  
  1080.     Martin W. Scott,
  1081.     23 Drum Brae North,
  1082.     Edinburgh  EH4 8AT
  1083.     United Kingdom
  1084.  
  1085. AFTER END OF JULY 1993:
  1086.  
  1087.     Martin W. Scott, c/o
  1088.     557 Great Western Road,
  1089.     Ground flat right,
  1090.     Aberdeen  AB1 7PA
  1091.     United Kingdom
  1092.  
  1093. OR BY EMAIL UNTIL END OF JULY 1993: mws@castle.ed.ac.uk
  1094.