Installing and using !Help! Help! was designed by Dave Hecker and written by Ewen Wannop. It blossomed from an idea suggested by Lee Sheppard. !Help! is copyrighted 1995-96 by Ewen Wannop, but the original archive may be distributed freely to others, compliments of Seven Hills Software. Seven Hills Software makes lots of great software for your Apple IIGS computer... please contact us for a FREE catalog, then buy some of our software so we can continue making more! :) Contact SevenHills: America Online, Genie: SevenHills Compuserve: 75300,1743 Internet: shss@nettally.com Contact Ewen Wannop: Genie: E.Wannop Compuserve: 76224,211 Internet: ewannop@tcns.co.uk What is !Help! !Help! is a universal Help and information system for the IIgs desktop. We realised that every time a new program for the IIgs was written, a new Help system had to be devised. !Help! was designed to let programmers stop reinventing the wheel, and simply use one universal solution. Once !Help! has been installed, it is simple to add new items to its Subject menu either manually or from your installer. Although !Help! was designed as a Help system for programs, it is equally at home as an information system. We provide a sample Help file, in addition to this file, to show how this is done. The limits of what !Help! can do are only limited by your imagination. Display you favorite recipes, error messages, thoughts for the day, telephone numbers or memorandums. You can copy any part of the text from a !Help! display, so why not put you favorite signatures, or ASCII art, into a !Help! file, and then paste it to the modem when you are next in conference! Setting up and using !Help! The actual files you see displayed are normal Teach or Text files. The control files can also be Teach or Text, and are the only files that need special construction. Within the folder ï*:System:Desk.Accs:Í create a folder called ïHelp.FilesÍ. Within this folder put folders for each Subject or program for which you have !Help! files available. The names of these folders are used to build the Subject menu within !Help!. If a file ïSubject.AliasÍ is found in the target folder, then the first 34 characters from that file are used instead to build the Subject name. These folders would normally be created when installing the target program. Within these program folders put an 'Index' file constructed in the following way: Start: Nothing or blank lines at start Entry: MenuFlags (see list) Name for the Menu Item (34 max) Full path to the file on disk (508 max) At least one blank line to space to next item Further Entries: As above End: Optional blank line or lines to finish Note that this will normally be a full path to the !Help! files. This means the files can be placed anywhere on disk, including the Help.Files folder. It would then be necessary to use ï:System:Desk.Accs:Help.Files:ProgName:Í to point to a file within the Help.Files folder for a specific ProgName. If only a partial path is given, then the prefix ï:System:Desk.Accs:Help.Files:SUBJECT:Í is added. The MenuFlags (these follow the normal Menu conventions): N = normal (removes other flags) P = normal (removes other flags) S = shadow O = outline D = disable item U = underscore V = divider bar I = italics B = bold X = XOR highlight When !Help! is called from the Apple Menu, it builds the Subject Menu and attempts to set it to the currently running program, by matching the name of the program to the folder name. If that fails, it is set to the first item on the Subject list. The Topic Menu is then built from the Index file from the selected Subject folder, and the first entry from the Topic Menu is called up and displayed. If no Index file is available ïNone AvailableÍ is displayed. If !Help! is called from the same program as before, it attempts to open the same Topic file and got to the same position within that Topic. Programming !Help! with IPC Calls A program can control the !Help! NDA by the use of IPC calls. Send IPC calls to: $8000 = (to "Seven Hills~!Help!" stopAfterOne) DataIn: dc i2'4' number of parameters in this block dc i2'Action' dc i4'Subject' dc i4'Topic' dc i4'TargetString' DataOut: dc i2'recvCount' Action = 1 (Are you there). This call is simply accepted, no other parameters needed. = 2 (Open !Help! NDA) Primary call. = 3 (Close !Help! NDA) No other parameters needed. = 4 (Open !Help! NDA) Help Menu call. For the ïOpen ActionÍ command 2 only: Subject = Pointer to pString, max 15, for a program/folder name within the Subject Menu. The string is not case sensitive. Topic = Pointer to pString, 34 max, for a Topic name within the Topic Menu. The string is case sensitive. (Note that if the pString parses out to a valid decimal number, and the number is of a valid item in the Topic menu [range 1 to numitems] that item will be selected.) TargetString = Pointer to a target string, 128 max. That string will be searched for and the text will be scrolled to the first occurrence of that string. The string is case sensitive. (Note that if the pString parses out to a valid decimal number, the display will be scrolled to that point in the text, or to the end, if that is less than the decimal number.) If any of the passed pointers are zero, or are not valid, then the default settings are used. This would be the current program, the first item on the Topic Menu, and the start of any text. For the ïOpen ActionÍ command 4 only: Subject = Pointer to a pString representing the name of the current application. The string is not case sensitive. Topic = The ID of the selected Menu (2 bytes). TargetString = The ID of the selected Menu Item (2 bytes). Note: Command 4 allows programs, through the use the _MenuGlobal option, to send the IDs of a selected Menu Item to !Help!. !Help! will pick up the name of the current application to select the ïtargetÍ folder. ïSubjectÍ need only point to a suitable identifying string that might be displayed in later versions of !Help!. !Help! will then use the passed Menu IDs to cross reference a file called ïDataÍ in the ïtargetÍ folder. This file should be constructed as follows. The entries do not use quotes, and must be an exact match, with no leading or trailing spaces. The entries within the file are similiar to Command 2: Start: Empty line(s) to start Entry: $0000 MenuID, Hex value with ï$Í identifier $0000 MenuItemID, Hex value with ï$Í identifier Subject Program/folder name within the Subject Menu (15 chars max) Topic Topic name within the Topic Menu (34 chars max) TargetString Search string or decimal position within file (128 chars max or decimal number) At least one empty line to space to next item Further Entries: As above End: Empty line or line(s) to finish