home *** CD-ROM | disk | FTP | other *** search
-
-
-
-
-
-
-
-
-
- Helper v0.07
-
- (c) 1989 Mike Cargal
-
-
- NOTICE:
- Helper requires ARP 1.3 to function correctly. Many thanks
- to the folks behind ARP who have made programming the Amiga a
- much less painful proposition.
-
- COPYRIGHT STUFF
-
- Helper is freely redistributable but not part of the Public
- Domain. You may copy and distribute Helper as you like. If you
- make changes to Helper please either release it under a new name
- or send your changes to me for consideration in the next version.
- You may not charge a fee for Helper other than reasonable disk
- duplication fees associated with Freely Redistributable libraries
- such as the Fred Fish collection. I retain the Copyright to
- Helper.
-
- GENERAL INFORMATION:
-
- Helper is a small utility to ease the transition to using the
- CLI, or even to speed up certain functions if you're a CLI pro.
- Helper allows you to define up te 12 help keys which are
- available to your CLI window. Along with the ability to set up
- any command to execute at the touch of a button, you may also
- specify that a file requester (ala ARP (AmigaDOS Replacement
- Project) to select any file parameters required by a command.
-
- WHY HELPER?
-
- Helper was written to bridge the gap between the WorkBench and
- CLI in a manner to help you move into the CLI environment.
- Unlike directory utilities which give you a gadget/requestor
- interface to AmigaDOS, Helper keeps you in a CLI environment.
- You will notice that Helper always keeps your CLI window active,
- and that Helper commands are entered exactly as you would type
- them if using the CLI alone. In fact this is so similar to
- typing your commands at the command prompt that if you are using
- a CLI Shell (as comes with AmigaDOS 1.3), all Helper executed
- commands will be in your command history buffer and take
- advantage of aliases.
-
- USING HELPER:
-
- From WorkBench:
-
- Double click on the Helper icon. Helper will open its own CLI
- for your use. You may customize the CLI which is opened by using
- the INFO menu item to add tool types. Valid tool types and their
- meanings are as follows: (Capitalization must be exact)
-
- 1) WINDOW=<Window Specification> This window specification
- must be the same as you would use for the NewCLI or
- NewShell DOS commands. (See your DOS manual for format)
-
- 2) STARTUP=<name of Startup file to execute upon opening
- window>.
-
- 3) CONFIG=<name of Helper configuration file to use>.
-
- 4) SHELL=<YES or NO> to indicate whether or not you desire a
- CLI shell. Yes opens a Shell and NO opens a plain CLI.
-
- From CLI:
-
- Initiate helper by typing the following on your command line:
-
- 1> Helper
-
- When Helper is executed it will detach itself in order to run
- concurrently with your CLI. At this point Helper will appear
- with it's default commands and window placement. Try clicking on
- a couple of the buttons ("Gadgets" in Amiga Lingo). You will
- notice that some commands will bring up a file requestor before
- executing (CD is an example of this). This allows you to select
- the file (or directory in the case of CD) on which your command
- your command will operate.
-
- Once you are comfortable with Helper, try clicking between the
- buttons in the helper window. This will activate the Helper
- window so that you have access to it's menu. Normally Helper
- will automatically activate your CLI window when it executes a
- command. This saves you from having to click back in the CLI
- window after using Helper. In the Helper menu you will notice
- the following items:
-
- Load L
- Change C
- Save S
- Save Defaults D
- Quit Q
-
- Let's begin with Change. By selecting Change from the menu,
- or typing Amiga-C with the Helper window active, you will be
- presented with a window of the current state of Helper commands.
- The first column is the Label which will appear on your Helper
- button. The second is the command to be executed whenever that
- Helper button is clicked. And the third is a gadget to tell
- Helper whether or not to ask for a file name to append to your
- command. Try changing any of these. Remember to hit RETURN
- after changing a label or command. Whenever you have Helper
- customized to your needs click on the Close gadget (the Square
- box in the upper left-hand corner of the window). Now try using
- the Helper buttons. They should display your labels and respond
- with your commands.
-
- Since you probably do not wish to customize Helper every time
- you use it, you may now select the Save menu option (or type
- Amiga-S with the Helper window active). This will bring up a
- file requestor for you to give your configuration file a name.
- Notice that by default, the requestor comes up pointed to your S:
- device. This is where configurations are generally kept on the
- Amiga. Type a name to save your current configuration. Now
- click on the OK gadget. Your current configuration will be saved
- in this file. To test this, click on Helper's close gadget to
- exit Helper.
-
- Run helper again and notice that it comes up with the default
- configuration. Now click between the Helper gadgets and select
- the Load menu item. A file requestor will appear for you to
- select the configuration file you desire. Click on the file you
- just saved in the previous step, and then on the OK gadget.
- Helper will read this file and return to the configuration you
- established before. You may even notice that if you moved the
- Helper window before saving your configuration, Helper will now
- be positioned wherever you had it when you saved your
- configuration.
-
- If you have one configuration you will use most of the time,
- you may want to have it be the default whenever you run helper.
- To do this, set up your configuration (including where you want
- the window to appear), and select Save Defaults from the Helper
- menu. This will save a file Helper.cnf in your S: device. This
- file is searched for and used each time you run Helper. Try
- saving your default configuration and exiting Helper. Now run
- Helper and notice that it comes up with your default
- configuration active.
-
- The final menu item may be used to exit Helper, and functions
- exactly the same as closing the Helper window.
-
- PROGRAMMER'S NOTES:
-
- If you are new to the Amiga, or simply interested in Helper as
- a user, then you need read no further. The following information
- is for programmers wishing to know how Helper works its magic.
-
- Helper is written in M2Sprint for the Amiga (a development
- system which I can recommend most highly). Source code is
- included for your perusal. But to save you some time, I'll try
- to summarize the techniques used in Helper (You can get the
- details from the source).
-
- Helper accomplishes its "magic" by activating the CLI window
- and feeding Input Events to the Input Device. In this manner, it
- appears to the CLI exactly as though those characters had been
- typed from the keyboard. This allows Helper to make full use of
- command aliases and history. Though this sounds straightforward
- enough, there is a small hitch in that the Input Device expects
- Raw Key codes. There is no system routine for converting
- characters back to Raw Key Codes, and depending upon the KeyMap
- currently in use, these codes can be different for the same
- character. The DoRawTbl module was written to solve this
- problem. It uses the current KeyMap to build a table which
- Helper can use to translate back to the Raw Key Codes for the
- current map.
-
- Helper also employs a technique to separate itself from the
- CLI. Although there is probably a better and more elegant way of
- doing this, currently I'm having helper start itself up using the
- ARP ASyncRun, and then ending the initial program. This leaves
- the second helper running while the first returns control back to
- the CLI. This also has the added advantage of allowing me to
- pass the address of the CLI's process structure to Helper (which
- is running as a separate process). By having access to this
- structure Helper is able to keep its current directory in sync
- with the current directory of the CLI, so that Helper file
- requester's will come up initially in the CLI's current
- directory.
-
- I might add that Helper makes rather extensive use of the
- "Easy" libraries provided with M2Sprint. Programmers from other
- Amiga programming environments, may wish to see how easy it can
- be to set up intuition functions. These make initial prototyping
- a pleasure. I had the initial version of Helper up and running
- in a matter of about 3-4 hours.
-
- Oh yes, special thanks to Martin Taillefer and the others on
- BIX who were helpful in answering my questions.
-
- (*------------------------------------------------------------*)
-
- Flames, bug reports, large sums of money and general accolades
- may be sent to me through the following means:
-
- Local Boards I frequent Regularly:
-
- Ami-GA (404) 327-3450
- C.I.A. (404) 561-5359
- Columbus Connection (404) 687-3151
-
- National service:
-
- BIX -- mcargal
-
- U.S. Mail
-
- Mike Cargal
- 7857 Crescent Drive
- Columbus, GA 31909
-
-