@database "NewDefTool.guide"


@width 78
@Node Main "New Default Tool Documentation"

This is the New Default Tool Document in AmigaGuide format.
Click the gadgets to read the corresponding text.

@{" About NDT! " Link About}
@{" What it does? " Link Do}
@{" Start from CLI. " Link CliStart}
@{" Start from WorkBench. " Link WBStart}
@{" Project Icons. " Link ProjIcons}
@{" Configuration. " Link Config}
@{" Using Wildcards. " Link Wild}
@{" History. " Link History}
@{" Credits. " Link Credits}
 
**************************************************************************
*                                                                        *
* NewDefaultTool V1.01 by Kjell Cederfeldt               92-Jan-01       *
*                                                                        *
* Copyright (C) by Kjell Cederfeldt 1992. All rights reserved.           *
*                                                                        *
* Change Default tool in a project icon.                                 *
*                                                                        *
* Written in  DevPac assembler with CygnusED Pro on Amiga 3000.          *
*                                                                        *
*  Kjell Cederfeldt           Phone  +46 31 - 306334        home         *
*  Hammarkulletorget 39              +46 31 - 139316        office       *
*  S-442 37  ANGERED   SWEDEN        +46 31 - 306310/307610 support BBS  *
*                                                                        *
*  UseNet ...{uunet|pyramid|rutgers}!cbmvax!cbmehq!cbmswe!datac!kjell    *
*                                                                        *
**************************************************************************
@EndNode
$VER: NewDefaultTool V1.01 (92-Jan-01)  by Kjell Cederfeldt 1992

The filesize of NewDefTool is 5888 bytes.
Checksum according to BRIC is 3888892034b.

@Node About " About New Default Tool? "

WHAT IS NEWDEFAULTTOOL?
=======================

NewDefaultTool is Public Domain, and it may be spread for non-commercial
purposes only. (It's OK to copy, spread and use it, but not to make money
from doing so).


Disclaimer:

NewDefaultTool is "as is". You run this program on Your own risk. I will
not be held responsible for damage caused by the program. I have done my
best to make it as safe as possible, and much time is spent on testing it.
There are no bugs that I know of. Should You find any, please let me know.

Good Luck!

@EndNode
@Node Do " What does NDT do? "

WHAT IT DOES?
=============

NewDefaultTool changes the default tool in a project icon. I'm sure that
You have been annoyed more than once when You try to read a docfile or
start a script and AmigaDOS pops up a requester telling You that it can't
find the default tool specified for the icon.
(ie. "Can't find :C/MuchMore")
To get things working You normally will have to choose info from the
WorkBench menu and change the default tool and try again. NewDefaultTool
has another approach to this problem. In the configuration file
NewDefTool.cfg, which should be placed in S:, You simply type the default
tools that NewDefaultTool will look for and the tools to change them to.
You can use @{" wildcards "Link Wild} in the configuration, this way You
can deal with all kinds of More-programs in one single line by typing
#?More. NewDefaultTool takes up very little amount of memory and only
occupies the processor when it is changing tools.

@EndNode
@Node CliStart
HOW TO START IT?
================

NOTE! NewDefaultTool can only run under DOS 2.0 or later!

NewDefaultTool (from now on called NDT) can be run both from WB or CLI. 


FROM CLI
=======

type: NewDefTool <filename|dir> [filename|dir]...

<filename> is the name of the icon to change. Remember to type the whole
path to the file. You don't have to type the suffix .info since NDT will
handle this for You.

<dir> is the directory name to work upon. All project icons in the
directory will be changed if a match is found in the configuration file.  

You can type several files and directories and even mix files and
directories on the command line as long as You put a space between each of
them. If names have spaces imbedded You must "quote them". If You want to
change all icons in the current directory You can simly type:
NewDefTool ""

From CLI You can get help with the -?, ? or -h option. Wildcards in
filenames are not supported from CLI.
If NDT finds a project icon it will print: Found tool... whatever
and if the tool has a match in the configuration, thus changed, it will
print: Changed to...newtool.

Example: Found tool... :c/MuchMore
         Changed to... SYS:Utilities/More

If no filename is typed the ASL file requester will be invoked. You use
the file requester to get to the file You want to change in the usual
manner. If You don't select a file, all the project icons in the directory
specified in the requester's drawer gadget will be changed. 

NOTE! NTD never changes a default tool unless a match is found in the
configuration file. 
@EndNode
@Node WBStart

FROM WORKBENCH
==============

Simply double-click the NDT icon. If the configuration has no APPICON
specified (described later) the ASL file-requester will be invoked.

If You have specified an APPICON in the configuration the NDT will put an
Application icon on the WorkBench screen. You can tell NDT where to put
the icon by specifying X and Y values in the configuration file. To use
the appicon simply drag the icon You want to change over the appicon and
drop it. It's a good idea to put NDT in the WBStartup-drawer and use the
same icon as appicon. Remember to set DONOTWAIT in the tooltypes list.

You can drop files as well as drawers and disks. You can use multiple
select by holding down the shift button and select several icons and drag
them over the appicon. It is the mouse pointer that determines where icons
are dropped so be sure to get it right. It is totally safe to drop any
icon on the appicon. NDT always checks that icons are project icons and
that a match is found in the configuration before it changes anything.

The appicon stays on the WorkBench screen until You quit the program. This
is done by double clicking the appicon.
@EndNode
@Node ProjIcons
WHAT ICONS ARE PROJECT ICONS?
=============================

Project icons are usually files created by a program. For example a
textfile created with a word-processor or an editor, a painting made with
a paint-program etc. You can check an icon by selecting the icon and
choosing Information from the WorkBench Icon menu. If the icon is a
project icon the word (project) will appear after the filename.
@EndNode
@Node Config

CONFIGURATION
=============


The configuration file (NewDefTool.cfg) should be placed in S: but NDT
will also look for it in the current directory.

The configuration file contains keywords, these are:

APPICON:   Tells NDT to use an appicon and the path to it.
X:         x-position for the appicon.
Y:         y-position for the appicon.
TOOLS:     arguments for defaulttools starts here.
FILENAME:  list of filenames starts here.

TOOLS: This is where You type the default tools to look for and after each
tool You type the complete path to the tool to replace the old tool with.
The path can be omitted if the tool and the project icon are in the same
directory. If You don't know how to write the path, look it up in Your
AmigaDos manual.

FILENAME: This is where the filenames to look for are typed. After each
filename You type the complete path to the tool to use for these
filenames. This is handy when files are named ReadMe, ReadMeFirst etc. You
can then set Your favourite textviewer as default tool for these files but
a c-source file ending in .c can have an editor as default tool even if
they had the same default tool before You ran NDT.

APPICON: The path to the icon You want to use as appicon (without .info
suffix).

APPICON: = Sys:WBStartup/NewDefTool
X: = 620
Y: = 210

These  changes to These
  |                 |
  |                 |
  |                 |
  V                 V

TOOLS:
#?MuchMore   Sys:Utilities/More
#?less       Sys:Utilities/More
#?XIcon      C:IconX
#?DPaint#?   Work:Apps/Graphics/DPaint/DPaint
:ced         Work:Util/ED
FILENAME:
ReadMe#?     Work:Util/View80

The length of the space between old tools and new tool are not
important and it is OK to use tabs.

A complete configuration file can look like this:

APPICON: = Sys:WBStartup/NewDefTool
X: = 620
Y: = 210
TOOLS:
(#?MuchMore|#?less) Sys:Utilities/More
#?XIcon             C:IconX
#?DPaint#?          Work:Apps/Graphics/DPaint/DPaint
:ced                Work:Util/ED
FILENAME:
(Read#?Me#?)        Work:Util/View80
(#?.s|#?.asm|#?.c)  Work:Util/Ced
@EndNode
@Node Wild

WILDCARDS
=========

Using wildcards will be of great help to make Your configuration as
flexible as possible. In the exampleconfiguration, all tools ending in
MuchMore or Less will be changed to SYS:Utilities/More. Tools ending in
XIcon changes to C:IconX and all tools that have the string DPaint in the
name will be changed to Work:Apps/Graphics/DPaint/DPaint.

Files that are named ReadMe, ReadMeFirst etc. will be given the default
tool Work:Util/View80. Filenames ending in .c or .s or .asm will have
Work:Util/Ced as their new default tool.

Consult Your AmigaDOS manual on how to use wildcards if You are not
familiar with it.
@EndNode
==========================================================================
@Node History
HISTORY

verison 0.33-.034
-----------------

Worked OK except for a memory bug found by Robert Wahlstrm. Fixed in
v0.90.

Version 0.32
-------------

Improved CLI handling and CLI error messages.

Version 0.28-0.30
-----------------

Many bug-fixes. Window now substituted with requester when doubleclicking
the appicon. Requesters for many error messages.

Version 0.21
------------

All versions above 0.17k will not work on any OS less than 2.0. Only ASL
filerequester supported. (Goodbye ARP and REQ).
Appicon added as option. To quit NDT just double-click the appicon. 


Version 0.17k
-------------

Fixed Guru on 68000 Amigas when choosing all files in a directory.
(Thanks Lorenz and Nicklas)


Version 0.17
------------

Works partly under 1.3.
This is the last version that will support 1.3. Added FILENAME as keyword
in configuration file for future use. Not implemented in the actual
program yet.
@EndNode
==========================================================================
@Node Credits
THANKS!
-----

Thanks to the following for their help:

Patrik Holmsten
Lorenz Einarsson
Nicklas Pernblad
Kjell Harnesk
Robert Wahlstrm
Jerry Sandstedt


/Kjell Cederfeldt

@EndNode
