home *** CD-ROM | disk | FTP | other *** search
/ World of A1200 / World_Of_A1200.iso / programs / system / ambush1.03a / docs / ambush.doc next >
Text File  |  1995-02-27  |  15KB  |  365 lines

  1.  
  2.  
  3.  
  4.                                Ambush User Guide
  5.  
  6.                        Copyright ©1993 Silicon Based Life
  7.  
  8.  
  9.  
  10.  
  11.                        Contents
  12.  
  13.  
  14.                        1. What does Ambush do?
  15.  
  16.                        2. How do I make it work?
  17.  
  18.                           2.1 From the shell.
  19.                           2.2 From an icon.
  20.                           2.3 With a particular package.
  21.                           2.4 The Ambush Control Window.
  22.  
  23.                        3. Who are Silicon Based Life?
  24.  
  25.                        4. And what do they want?
  26.  
  27.  
  28.  
  29. 1. WHAT DOES AMBUSH DO?
  30.  
  31. A short story,
  32.  
  33. Once upon a time, the Amiga's operating system existed in versions 1.2/1.3.
  34. Although hard to believe to those that never started there, these versions
  35. had no 3 dimensional buttons, a colour scheme popular with 70's interior
  36. decorators, and all the text was displayed in topaz 8, especially the
  37. default text for the title bars of windows etc.  Many great Amiga programs
  38. were written and still function flawlessly even on the very latest version
  39. of Workbench, thanks to careful observation of Amiga programming rules and
  40. practices.  Cute furry animals skip and jump in the forest, picking flowers
  41. and singing love songs.
  42.  
  43. An evil demon lurks in the trees however.  What many programmers failed to
  44. do, was to explicitly specify the topaz 8 font in their programs, relying
  45. on the fact that the system font would always be set to topaz.  With the
  46. arrival of Workbench 2 and above, a new preferences program allows the user
  47. to change the default screen font into a much larger, often
  48. proportional typeface, to make workbench look more attractive and title bar
  49. text and menus easier to read (this is especially important with the advent
  50. of AGA and the 1942 monitor, and also display cards such as the Retina,
  51. which both allow flicker free high resolution Workbench screens).  As a
  52. matter of trivia, this practice of not specifying, but assuming topaz, was
  53. not correct even under 1.3, as the then global preferences program allowed
  54. the selection of 60 column topaz over 80 column topaz causing text to spew
  55. from the right side of gadgets and other objects.
  56.  
  57. Many of the old programs described and even some new ones (I have even
  58. found a shareware program which REQUIRES Workbench 3 that does this - no
  59. names) have not had the simple changes made, but are still on sale and
  60. become unusable, or simply unpleasant to look at and embarrassing to run in
  61. anything other than topaz 8.  Having found this problem with a number of
  62. programs, such as the Professional Page and Professional Draw utilities
  63. (Gold Disk), Trace, Clipmap, Makefont... and Real 3D 1.4.x/ Classic
  64. (RealSoft) utilities DeltaConvert, DeltaToIFF... I mused that a program to
  65. intercept just these programs and provide them with the environment they
  66. require (a topaz workbench screen) would be a worthwhile investment of my
  67. time, if only for my own use.  Shortly afterwards, Ambush was born.
  68. The fluffy bunnies once again danced through the flower meadows to the
  69. song of Nightingales.
  70.  
  71. If you have never run Workbench with a 22 point title bar font such as I
  72. do, you may have never experienced what I describe, Ambush therefore is not
  73. for you.  If you do use a large screen font, but have not experienced this
  74. problem, then you are far richer than I, to be able to afford the latest
  75. versions of the software.  If you boot all your software from floppy then
  76. you can set the prefs for the individual disks, and it is probably set
  77. right to start with anyway.
  78.  
  79. Naturally, from the description, you will require at least workbench 2 to
  80. use Ambush.
  81.  
  82.  
  83. DEVELOPERS.
  84.  
  85. Ambush may also be of use to developers, who may wish to test programs for
  86. their appearance on a standard 640x256 four colour workbench (Ambush always
  87. uses 640 across regardless of overscan settings). This neatly avoids the
  88. hassle of changing the preferences settings (Close all windows...). Indeed
  89. I used Ambush to ensure that the accompanying AmigaGuide document looked
  90. correct by ambushing MultiView.
  91.  
  92.  
  93.  
  94. 2. HOW DO I MAKE AMBUSH WORK?
  95. 2.1 RUNNING AMBUSH FROM A SHELL.
  96.  
  97. Ambush is designed to be run from the shell or from a script.
  98. The general format of the Ambush command line is as follows,
  99.  
  100.      AMBUSH D=DELAY/N/K,L=LACE/S,N=NO3D/S,A=ACTIVATE/S,C=COMMAND/F/A
  101.  
  102. What this all means is,
  103.  
  104.      DELAY: This allows you to adjust the time in seconds (up to 10
  105.             minutes) for the ambushing of your command to be completed. You
  106.             would want to do this if for example, the command that you run
  107.             takes a number of seconds to open it's window(s). (It loads in
  108.             from a floppy disk?)
  109.  
  110.             The default time is 2 seconds, after which control is returned
  111.             to the Workbench screen.  If you find that your application is
  112.             opening onto the Workbench, try increasing this value.
  113.             (Alternatively see ACTIVATE below.)
  114.  
  115.             Example: 1.SYS:> ambush delay=10 calculator
  116.                  or: 1.SYS:> ambush d=10 calculator
  117.  
  118.  
  119.       LACE: This puts the Ambush screen into interlace mode.
  120.  
  121.  
  122.       NO3D: This suppresses the Workbench 2 and higher 3D intuition look
  123.             (buttons etc.) and sets the colour scheme to the 1.3 style
  124.             (Yuck!)
  125.  
  126.             Example: 1.SYS:> ambush lace no3d calculator
  127.                  or: 1.SYS:> ambush l n calculator
  128.  
  129.  
  130.   ACTIVATE: This makes the ambush screen stay active, regardless of the
  131.             DELAY setting.  You may return control to the Workbench screen
  132.             manually by using the `Ambush Control' window.
  133.             You would do this if a program opens further windows onto the
  134.             Workbench in response to your actions (and hence the delay
  135.             option is inappropriate).
  136.  
  137.             Example: 1.SYS:> ambush a calculator
  138.  
  139.  
  140.    COMMAND: The rest of the command line (no double quotes required) is the
  141.             command which you want to ambush, along with any arguments, as
  142.             if you had typed it directly at the command line prompt.  If
  143.             you simply wish to open the Ambush screen, use a command of "",
  144.             that is, an empty string, (You WILL need the quotes to do this,
  145.             of course).
  146.  
  147.             Examples: 1.SYS:> ambush d=5 l n calculator tape con:
  148.                       1.SYS:> ambush calculator
  149.                       1.SYS:> ambush ""
  150.  
  151.  
  152.  
  153. 2.2 RUNNING AMBUSH FROM AN ICON.
  154.  
  155. Ambush is not designed to be run directly from the workbench, but to be set
  156. up in such a way that it appears to run automatically - You double click an
  157. icon to run the application of your choice, the Ambush screen appears, and
  158. then the application opens onto it.  However, to make this magic work, does
  159. require a little work.
  160.  
  161. Following are the steps that you must follow (in the shell) to set up an
  162. application to run on an Ambush screen from it's icon. I will use a program
  163. sys:tools/calculator in my example. It is not a program that needs
  164. ambushing, but, is handy to illustrate the process.
  165.  
  166.  
  167. 1) Install Ambush once, somewhere on the search path - I like to keep mine
  168.    in SYS:Utilities. (Alternatively place it into the same directory as
  169.    each program you intend to ambush, if there is only a couple.)
  170.  
  171.    1.SYS:> copy df0:Ambush to SYS:Utilities
  172.  
  173.  
  174. 2) Change directory to where the program you want to ambush is kept.
  175.  
  176.    1.SYS:> cd SYS:tools
  177.  
  178.  
  179. 3) Rename the program to a different name, (but not the .info file)
  180.  
  181.    1.SYS:tools> rename Calculator Calculator2
  182.  
  183.  
  184. 4) Create a simple script file that would ambush your program, using the
  185.    old name of your application for the script (remember to use Ambush on
  186.    the new name of the  application or you will create an `endless loop'.
  187.  
  188.    1.SYS:tools> ed Calculator
  189.  
  190.    ------------------------------------ While inside ed.
  191.    ambush calculator2                   Remember to use new name!
  192.    ------------------------------------ <esc><x>.
  193.  
  194.    A number of options are available as command line switches. See the
  195.    section `Running Ambush from the shell' for a detailed description of
  196.    these.
  197.  
  198.  
  199. 5) Load the Icon Editor (IconEdit) and load the .info file for your
  200.    application (calculator.info).  Go to the `Type' menu and change the
  201.    icon type from `Tool' to `Project' and then save the icon again.
  202.  
  203.  
  204. 6) Now find the icon on the workbench screen and select it (click once).
  205.    Select `Information' from the `Icon' menu.  Change the `Default Tool' to
  206.    read `iconx' and save (not yet if you have Workbench 2).
  207.  
  208.    If you have Workbench 3, everything is now complete, you can double
  209.    click on the icon and (hopefully) run your application.
  210.  
  211.    If you have Workbench 2, create a `Tool Type' which reads,
  212.  
  213.                 WINDOW=CON:0/0//256/IconX/AUTO/CLOSE
  214.  
  215.    the AUTO bit is the important bit, as it stops the irritating window
  216.    that iconx produces from opening, unless some output occurs (which can
  217.    always be redirected to nil: in the script).
  218.  
  219.  
  220.    PROGRAMS THAT REQUIRE LARGE STACKS.
  221.  
  222.    In order to ambush programs requiring stack space of greater than
  223.    4096 bytes, you will need to create two scripts,
  224.  
  225.    ------------------------------------ file: calculator.script
  226.    stack 50000
  227.    calculator2                          (remember, this is the program)
  228.    ------------------------------------
  229.  
  230.    ------------------------------------ file: calculator
  231.    ambush d=5 execute calculator.script
  232.    ------------------------------------
  233.  
  234.    What you are simply doing is ambushing the script file
  235.    (calculator.script) rather than ambushing the calculator directly,
  236.    this gives you the opportunity to issue a stack command before executing
  237.    the program.
  238.  
  239.  
  240.  
  241. 2.3 USING AMBUSH WITH A PARTICULAR PACKAGE
  242.  
  243. If you examine the directory `AmbushScripts', you will find script files
  244. for a number of packages for which Ambush has been used.  If you cannot
  245. find the exact one you need, the selection works as a useful library of
  246. examples of the simple process.  You will need to follow the procedure
  247. described in `Running Ambush from an icon'.
  248.  
  249.  
  250. IMPORTANT!
  251.  
  252. You must remember to rename the original package before copying the files.
  253. Remember you must ALWAYS keep/use backups of your software (and esp. your
  254. hard disk).
  255.  
  256.  
  257.  
  258. 2.4 AMBUSH CONTROL WINDOW
  259.  
  260. On the Ambush screen, in the bottom right corner, you will find a small
  261. title bar window called `Ambush Control'.  When highlighted a menu is
  262. available which has just a few simple options.
  263.  
  264.  
  265.   Project/Active/Normal (Workbench)
  266.                 /Ambush
  267.  
  268.     These allow you to make either the Ambush or Workbench screen the
  269.     currently active screen.  So, if you have a program which opens a new
  270.     window when you click on a button, which because of the way the program
  271.     is written, would open the new window onto Workbench, you may
  272.     temporarily change the active screen to make it appear in the right
  273.     place.  You may also use these options to make Ambush active and then
  274.     double click on a program icon on the Workbench screen.
  275.  
  276.   Project/About
  277.  
  278.     Tells you what version of Ambush you are running, along with our
  279.     excellent autoscaling logo...
  280.  
  281.   Project/Quit
  282.  
  283.     Normally, Ambush will shut down when the last application window is
  284.     closed.  However, if you ambush a program which then fails to open it's
  285.     window or you simply typed `ambush ""' then you are left with an Ambush
  286.     screen with nothing on it.  Use the quit option to shut down Ambush.
  287.     (If any applications still have a lock on the screen, then Ambush will
  288.     refuse, informing you that you still have applications running - not
  289.     unlike Workbench's behaviour to a quit.)
  290.  
  291.  
  292.  
  293. 3. WHO ARE SILICON BASED LIFE?
  294.  
  295. Silicon Based Life are a small group of dedicated Amiga enthusiasts, who
  296. enjoy to use and to develop for the machine.  We attempt to understand and
  297. to appreciate all that is the technological masterpiece that the Amiga
  298. range represents and try to present it in it's best light in what ever way
  299. we can find.
  300.  
  301. We are a varied group of individuals, each with differing levels of
  302. experience, but all with a passion for getting the best out of our
  303. equally diverse Amiga computers.
  304.  
  305. Please enjoy your Amiga, in the knowledge that you have the finest in
  306. computer hardware that your money could buy.  Thankyou.
  307.  
  308.  
  309.  
  310. 4. WHAT DO SBL. WANT?
  311.  
  312. Ambush is freeware, however if you want to help us, please send a letter or
  313.  a pretty postcard to the address below, stating which product (Ambush) you
  314. are using.  This allows us to gauge the response to each completed package
  315. and to therefor direct our activities as best as possible.  Money is of
  316. course welcome, but, must be in UK pounds (lots of them!).
  317.  
  318. If you have any suggestions or have discovered a bug, please write with a
  319. detailed description to
  320.  
  321.  
  322.                            James Ling
  323.  
  324.                            93 Weatherbury Way
  325.                            Dorchester
  326.                            Dorset     DT1 2EE
  327.                            England
  328.  
  329.  
  330. Please remember that it is helpful to include a description of your
  331. Amiga setup - model, RAM size, Hard disk, monitor type, esp. when reporting
  332. possible faults.
  333.  
  334. Writing does not guarantee a reply, (an SAE increases your chances), but I
  335. will try to reply to most sensible correspondence.
  336.  
  337.  
  338. DISCLAIMER
  339.  
  340. Silicon Based Life does not take any responsibility for any damage, loss of
  341. data, caused directly or indirectly by the use of Ambush or any of the
  342. associated material.  A standard text accompanies each package, Legal.doc,
  343. which must accompany the package when it is duplicated.
  344.  
  345.  
  346. DISTRIBUTION
  347.  
  348. Ambush may be distributed freely, however, we request that only a minimal
  349. fee should be charged to cover the duplication service (if you have paid
  350. more than a couple of quid, you've been ripped off.)
  351.  
  352. The package must be distributed in full, that is, the following files must
  353. be present,
  354.           Ambush
  355.           Start-Ambush
  356.           Start-Ambush.info
  357.           docs/Ambush.Guide
  358.           docs/Ambush.doc
  359.           docs/Legal.doc
  360.           AmbushScripts/#?
  361.  
  362. Please write to confirm if you wish to include Ambush as part of a large
  363. distribution such as a coverdisk.
  364.