home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frozen Fish 1: Amiga
/
FrozenFish-Apr94.iso
/
bbs
/
alib
/
d5xx
/
d547
/
findname.lha
/
FindName
/
FindName.doc
< prev
next >
Wrap
Text File
|
1991-09-19
|
3KB
|
119 lines
//
\\ // FindName V1.0
\//
1991
by
Preben Nielsen
WHAT IS FINDNAME ?
FindName is a little program which could sometimes be useful in scripts.
It allows you to check whether certain structures are present in RAM or not.
It will currently let you search (by name) for:
devices
libraries
memory
messageports
resources
tasks
FindName returns
OK
(0) if it finds what it is searching for, and
WARN
(5)
if it doesn't. If you specify invalid arguments, then FindName will return
ERROR
(10).
HOW TO USE FINDNAME
The usage is 'FindName
-d
|
l
|
m
|
p
|
r
|
t SearchName
' where
-d
makes Findname scan the device-list
-l
makes Findname scan the library-list
-m
makes Findname scan the memory-list
-p
makes Findname scan the messageport-list
-r
makes Findname scan the resource-list
-t
makes Findname scan the task-lists
and
SearchName
is the name to search for.
Notice that FindName is case-sensitive. 'Narrator.device' is
NOT
the
same as 'narrator.device'.
Now follows an example of a script using FindName.
; Start of script
; Find a device
FindName -d narrator.device
IF WARN
echo "The narrator device is not present"
ENDIF
; Find a library
FindName -l gadtools.library
IF WARN
echo "No gadtools library. We are not runnning under Kickstart 2.x"
ENDIF
; Find a memory-header
FindName -m "zkick memory"
IF NOT WARN
echo "You used zkick to install Kickstart 2.x"
ENDIF
; Find a messageport
FindName -p REXX
IF NOT WARN
echo "arexx is running"
ENDIF
; Find a resource
FindName -r potgo.resource
IF NOT WARN
echo "potgo resource is always present"
ENDIF
; Find a task
FindName -t Workbench
IF NOT WARN
echo "Jubii, I found the workbench task"
ENDIF
; End of script
COMPATABILITY !
FindName has been tested under kickstart 1.2, 1.3 and 2.x on a
2.5 MB 68000 based Amiga 1000 (0.5 MB chip-ram). If any problems
is encountered with other configurations then let me know.
COPYRIGHT NOTICE !!
FindName is
Public Domain
.
=====================================================================
Send
bug-reports
,
suggestions
,
comments
etc. to:
///
/// Preben Nielsen
\\\ /// Oehlenschlægersgade 72 st. T.V.
\\\/// 1663 Copenhagen V.
\/// Denmark
Phone: (009 45) 31 21 55 09