home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frozen Fish 1: Amiga
/
FrozenFish-Apr94.iso
/
bbs
/
alib
/
d7xx
/
d724
/
xsearch.lha
/
XSearch
/
English
/
XSearch.doc
< prev
next >
Wrap
Text File
|
1992-09-04
|
24KB
|
555 lines
X S E R I E S / P E E K E R B I T S
-------------------------------------
XSearch 1.0
©/Programme 1992 SP/PeekerBits
Author:
Stefan Plöchinger
Kleiststraße 27
DW- 8012 Ottobrunn
programmed in KICKPascal (MAXON GmbH)
requiring AMIGA OS2.0
···········
XSearch 1.0 is FreeWare. All rights prohibited. The program
may only be distributed for non-commercial purposes.
···········
1 . T H E P U R P O S E O F X S E A R C H
Well, everyone knows the problem: Where is this sh... file on the
HardDisk. I know the name, but not the place. XSearch ought
to help you in such a situation. It searches files on a
device.
¡! I'll always talk of files to search. But of course you can
also search directories. Maybe some things can only refer to
files, in this case, I'll write it down in this .doc, and in
this case, too, you can tell the program what to do with direc-
tories (in the Preferences Requester). You'll read more about
this later.
2 . T H E C O N C E P T I O N O F X S E A R C H
XSearch has been divided in three seperate modules (of course
included in one executeable file). These modules are:
· Options module: In this module, you tell XSearch what to
search and how to do this.
· Places module: In this module, you can select the directories
and files XSearch searches in.
· Searching module: Here, XSearch searches.
When in the Options module, you can go to the Places and to the
Searching module, when in the Places Module, to the Options and
the Searching module. In the Searching module, you can go to
the module in which you went to the Searching module.
3 . H A N D L I N G , G E N E R A L L Y
XSearch is as easy to handle as every OS2.0-supporting AMIGA
programme. Perhaps you'll know about Application windows
and the User Interface Style Guide (Gadgets are selectable
by keys, menus are built as Commodore's standards want it and
so on). Well, you'll find it in XSearch.
Well, and finally a warning concerning the handling: always
press Enter or Tab after having edited a text in a text gadget.
4 . P R O J E C T S
Important: XSearch owns the possibility to generate projects.
This means, all the things you did in the Options or the
Places module can be stored on a device like the text in a
word processor. For this purpose, you'll find these menus
in each module window of XSearch.
Project » Title of the menu :-)
New A N » Opens a new project with the standard
options
Open... A O » Loads a saved project
--------------------
Save A S » Stores the current project using the
current name
Save as... A A » Stores the current project using a name
specified in an appearing file requester
--------------------
Preferences » Brings up the Prefs window
About » Shows some Informations about me :-)
Quit A Q » Well, I think, it quits XSearch
In the Searching module, simply the first two menu items aren't
shown.
The current project name is shown in the window title:
+---+----------------------------------------------+---+---+
| · | XSearch 1.0 - {project name} | · | · |
|---+----------------------------------------------+---+---|
: :
5 . T H E O P T I O N S M O D U L E
5.1 WINDOW
+---+----------------------------------------------+---+---+
| · | XSearch 1.0 - {project name} | · | · |
|---+----------------------------------------------+---+---|
| +---+------------+ |
| | & | Options | |
| +---+------------+ |
| |
| +--+ +-----------------------------+ |
| | | Name: Pattern | | |
| +--+ +-----------------------------+ |
| |
| . |
: : :
| |
| +----------+ +--------+ |
| | Search | | Quit | |
| +----------+ +--------+ |
+----------------------------------------------------------+
| {messages} |
+----------------------------------------------------------+
{messages}: Here, several messages are shown (e. g. error msgs).
Zoom-Gadget: Selecting this, the window will be iconified.
"Name:": The gadget left of this shows if the option "Name Pattern"
is to be used when searching.
"Pattern:": Here, in this text gadget, you specify the name
pattern. More about these two gadgets later.
(Below these gadgets, there are several others. Later more, too.)
"Options": Pressing this Cycle gadget means changing to the
Places module.
"Search": Pressing this gadget means starting the search and
going to the Searching module (what else?).
"Quit": Hope it's clear.
5.2 HANDLING
As already mentioned in 5.1, all the options are specified in
text gadgets. But even when there is data specified, an option
can be turned off by pressing the gadget on left side of the
text gadget.
These options exist: Name patterns, length control, control of
file attributes, time specifications, Comment and IFF patterns
and file-internal search.
The options "en detail":
· Name pattern: Here you can specify an AMIGA-typical pattern
like "#?.c". Only files on which these pattern matches
are accepted.
· Length control: Here, you can select files which are bigger
than a certain value, and which are smaller than another one.
In a small graph, this looks like this:
+············[--------------O--------]··········· · · · ·
0 /|\ /|\ /|\
minimum of size File size |
maximum of size
The line represents the size. You specify the maximum and the
minimum. Only the files between or on these frontiers are
accepted.
These are the rules if the value in ">=" is bigger than the one
in "<=":
+------------]·······················[---------- - - - -
0 /|\ /|\ /|\ /|\
| minimum of size | File size²
File size¹ maximum of size
The line represents again the size. But this time, only files
are accepted when their size is under the minimum or over
the maximum, or of course if the size is equal to one
frontier.
The length option only affects files.
· Control of file attributes: Here you can control the file
attributes of an AMIGA file. The string in the text gadget
can be built up by these chars:
· -: The attribute mustn't be set.
· *: The value of the attribute is uninteresting.
· h/s/p/a/r/w/e/d: These are the eight file attributes. They
can only be used in this order. Using them means that
an attribute has to be set.
Some examples:
----RWED: The HSPA-attributes mustn't be set, in contrast to the
RWED-attributes.
****RWED: The HSPA-attributes don't matter, the RWED-attributes
have to be set.
RWED****: This isn't acceptable. RWED isn't at the right po-
sition.
HSPA----: The HSPA-attributes have to be set, the RWED-attributes
mustn't.
· Time specifications: With every file, the point of time
is stored when it has been changed last. You can select certain
files by specifying two points of time between the 12-31-77/
12-31-1977 (notification may be set in the Preferences reques-
ter) 23:59:59 and the 1-1-2000 00:00:01. If the second date
is earlier than the first, there is the same exclusion of files
as when controlling the length.
· Comment pattern: The same as the name pattern, but with the
comment of a file.
Instead of a checkbox on the left side of the text gadget, there
is a cycle gadget with three possible states:
"-": The comment isn't examined.
"G=k": The comment is examined, the case (sensitive or insen-
sitive) isn't controlled.
"G÷k": The comment is examined, the case is controlled.
· IFF pattern: Using this option, you can select IFF-Files.
Specify an IFF filetype, and the file currently searched will
be (if the option is turned on, of course) controlled if it's
an IFF file, and if the IFF pattern matches.
IFF files vary in their basic structure: there are IFF-FORM
files (very common), and IFF-CAT and IFF-LIST files (not
very common, not common either). If XSearch supported CAT and
LIST, the whole file had to be searched (now guess if it supports
them), and if supporting only FORM, simply the beginning of a
file has to be examined.
In the text gadget, you may specify all IFF types. The have
to be listed in this way:
TYPE{|TYPE{|TYPE{|...}}}
This means for example:
"ILBM|ANIM": All ILBM (DPaint Pictures) and ANIM (DPaint Ani-
mations) IFFs are searched.
"ILBM": Only ILBM IFF types are searched.
IFF types can only contain letters from A to Z, numbers from
0 to 9 and spaces.
The length option also only affects files. You can specify
in the Preferences requester what to do with Non-IFF files
when searching.
· File-internal search: A file is read and it is looked if
the pattern you specified in this text gadget matches to
one line of the file. Then, the file is accepted. You may
specify again if the case is sensitive or not. Of course,
this option only affects files again.
¡! Don't think that this option is very flexible. It's not
very fast and not very safe either, I must say. I'm sorry
for this, but I've been "too tired" to add a highly tuned file-
internal searching routine.
Additionally: XSearch is very flexible in accepting data from the
text gadgets. E. g., it converts a "1-1-92" in the "Date Field"
into a "01-01-92", a space in the "Attribute Field" into a "*",
and seperators like ",", ";" or " " in the "IFF Field" into a "|".
5.3 FINE TUNING
You can find an own menu for the Option settings:
Options » What could this be?
Standard values » You may save options as standard
values (4th menu item). You take them
over in the current project by
selecting this menu item.
out of Project... » Takes over the options out of another
XSearch project.
out of File attributes...
» Takes over the options out of the
attributes of a file (only a file!).
-----------------------
Save as Standard values » Store the current options as the
standard values in "ENVARC:XSearch.Std"
Additionally: The Options window is a so-named Application Window.
This means that you can drag icons of the Workbench over this
window and drop them there. XSearch will react as if you loaded
this file in the file requester of "out of file attributes..." and
will make the combination requester appear (the one which appears
when choosing "out of file attributes...", too).
6 . T H E P L A C E S M O D U L E
6.1 WINDOW
+---+----------------------------------------------+---+---+
| · | XSearch 1.0 - {project name} | · | · |
|---+----------------------------------------------+---+---|
| +---+------------+ |
| | & | Places | |
| +---+------------+ |
| |
| +-----------------------+ +-----------------------+ |
| | | | | |
| | | | | |
| | +-----+ | |
| | | |<-- makes exchange | |
| | +-----+ between the both | |
| | File-/Dir- +---+ | lists possible | |
| | list | · | | | |
| | +---+ | | |
| | | # | | | |
| | +---+ | List of all | |
| | +---+ | search places | |
| | | + | | | |
| +-----------------------+---+ | | |
| +-------------+---+---+ +---+ | |
| | Devices | : | / | | - | | |
| +-------------+---+---+ +---+ | |
| +---------------+ | ± | | |
| Dir | | +---+ | |
| +---------------+ +---+ | |
| +---------------+ | · | | |
| Ptt. | | +---+ | |
| +---------------+ | # | | |
| +---+-----------------------+ |
| |
| +----------+ +--------+ |
| | Search | | Quit | |
| +----------+ +--------+ |
+----------------------------------------------------------+
| {message} |
+----------------------------------------------------------+
"Places": Changes to the Options Module.
the are on the left: This area wors like a file requester.
the gadget making exchange between both lists possible:
This gadget is a checbox. If it's selected, the File-/Dirlist
on the left side of the window changes. If you select an entry
there, an "·" appears in front of it. This means the file or
dir is selected. You deselect it in the same way.
the list of all search places: Here all files select left can be
taken over. This is also the list in which all places are
stored XSearch will search in when in the Searching Module.
All entries in this list can be selected.
"·": Selects all entries of a list.
"#": Reverses the selection of a list.
"+": All selected entries left are taken over to the list of
search places right.
"-": All selected places right are removed out of the list.
"±": Every directory right has a certain property: you may
specify if, when XSearch searches in this dir, the sub-
dirs ought to be searched, too. If this is the case, there is
a "D" in front of the dir's name, if not, there's a "d".
With this gadget, the state of each selected dir on the right
is changed.
"Search"/Quit: Guess what.
6.2 FINE TUNING
You may use "Drag and Drop" again. If you drag an icon over
the file/dir list on the left, the icon's dir will be loaded
there. If you drag it anywhere else, the icon's name will appear
in the list of search places.
Double-clicking on an entry right loads the dir of the entry
double-clicked on in the file list on the left.
7 . S E A R C H I N G M O D U L E
+---+----------------------------------------------+---+---+
| · | XSearch 1.0 - {project name} | · | · |
|---+----------------------------------------------+---+---|
| +-----------------------+ +-----------------------+ |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | list of results | | path list | |
| | +---+ | | |
| | | · | | | |
| | +---+ | | |
| | | # | | | |
| +-----------------------+---+ +-----------------------+ |
| +---------------+ +-----+ +------+ +---+ |
| in | & | Clipboard | | New | | Stop | | | Pause |
| +---------------+ +-----+ +------+ +---+ |
| +----------+ ----------------------- |
| | copy | +----------+ +--------+ |
| +----------+ | Cancel | | Quit | |
| +----------+ +--------+ |
+----------------------------------------------------------+
list of results: Here, the results of the searching process are
displayed. The entries may be selected.
path list: If XSearch is still searching, the current searching
path is displayed here.
If not, you may select a file or dir in the list of results,
and then, its path will be displayed here.
If the dir to display was "DH0:System/Icons", the list would
look like this:
DH0:
System
Icons
{file, if necessary and not searching}
"in Clipboard"/"copy": The cycle gadget "in" has two states:
"Clipboard" or "File". If you press "copy", the paths of
all selected entries in the list of results are copied to
the thing that is selcted in the "in"-gadget. In the case
of "File", a file requester appears.
"New": Restarts the searching process.
"Stop": Stops the searching process.
"Pause" (Shortcut: Space): If this checkbox is turned on, the
search process is paused, and vice versa.
"Cancel": XSearch returns to the modul out of which you went
to the Searching module.
"Quit": Guess what (again).
8 . P R E F E R E N C E S
You enter the Preferences by selceting the Menu item "Preferences"
in the Project menu.
You can set the following things:
"Start with": Here, you select in which module to start
"in dir.:" Here, specify the dir in which the Places Module ought
to start. Specifying nothing means starting in the devices
list. This will also be caused if the directory specified
here couldn't be accessed when starting XSearch.
Selecting "Get..." brings up a directory requester in which
you can specify the dir comfortably.
"Projects in": Here, specify the standard project directory.
"Dir. with Subdirs": In the Places Module, a directory can
be specified as a directory in which the subdirs are also
searched or not. Here specify what the standard is when
taking over a dir from the filerequester list to the list
of search places.
"Case sens.": Taking over values out of an another project or
out of certain file attributes gives the possibility to
active automatically the options taken over. When taking
over the comment or file-internals, XSearch doesn't know,
if instructed to set the options automatically, if it ought
to set the options to case senstive or insensitive. Specify
here.
"Textgadg. coloured": XSearch can colour the background of a
text gadget. Specify here if it should or not.
"Date": Here, specify the date format. DD means days in two
numbers, MM the months and YY the years. "." and "-" are the
seperators.
"current Date when new values": Specify if, when having selected
"New" or "Standard values", the current date ought to be
entered in the "Time" fields.
"Dir. at length control": The probolem mentioned above: What
should be done with a directory if checking for the length?
A dir has no length, so you can tell XSearch here what to
do: you may say that it ought to pass the dir (takes the
dir over in the list of found files and dirs if the other
options are true) or that it ought to exclude it (not take
it over in any case).
"IFF control": The same as "length control", but when XSearch
controls IFF files and not the length.
"file-internal search": The same as "length" or "IFF", but with
the file-internal search.
"other files at IFF": You may specify what should be done with
non-IFF-files when controlling the IFF type (pass or exclude).
"Save": Stores the settings in "ENVARC:XSearch.Config" and leaves
the requester.
"Use": Leaves the requester and uses the settings now specified.
"Cancel": Leaves the requester and uses the settings that were
used before going into the Preferences requester.
···········
Finally, I'd like to do two things:
· Say sorry for my bad English and thanks to my teachers
trying again and again to improve it.
· Say thanks to some certain persons:
Felix Hermann for the beta-testing,
the new "Bayern 3" (A radio station. What, you didn't know?)
for music supportment,
Commodore for OS2.0 and AMIGA Corp. for the AMIGA and
Jens Gelhar for KICKPascal
PS: Who wants to support a poor 16-year-old pupil to help to
get his 68030-processor-card? My adress is a the beginning of
this doc (any currency accepted).