home *** CD-ROM | disk | FTP | other *** search
-
-
- GetString
- ~~~~~~~~~
-
- A small utility for the Shell
- By Diego Caravana
-
- Actual Version: 1.3
-
- ---
-
-
- 1. Legal Stuff
- ==============
-
- GetString is placed in the Public Domain for the Amiga.
- No fee is requested to use it, nor anyone can ask anything for it
- (except for the media). Feel free to use it, but AT YOUR OWN RISK, as
- I cannot be considered responsible for any damage caused to your
- system. Have Fun!
-
-
- 2. What is it?
- ==============
-
- GetString is a small utility that I have written mainly for me, but I
- think it can be very useful also for you. It is a Shell-only program
- and its work should be clear: it opens a string requester and store
- the result in an environment variable (either local or global) or
- prints it, enabling you to use it in your Shell scripts (or for what
- you want) in a very simple way.
-
-
- 3. How to use
- =============
-
- It requires OS 2.04+ and the fabulous 'reqtools.library' V38+.
- As said above, GetString is a Shell-only program, so do not try to use
- from Workbench. It uses the standard parser of OS 2.x. Try to
- execute GetString with a `?' as argument and you will get something
- like this:
-
- TITLE/A,STRING/K,MSG=MESSAGE/K,VAR=VARIABLE/K,GLOBAL/S,STDOUT/S,
- PUBSCREEN/K
-
- Now, a little explanations of arguments:
-
- TITLE/A you MUST supply a string that will be the title of
- the requester; if you do not do, there will be an
- error.
-
- STRING/K is a string that will appear in the string gadget
- inside the requester and then will be the default
- string returned.
-
- MSG=MESSAGE/K is a string that appears between the title and the
- string gadget, a new feature of ReqTools! It should
- explain even more the target of the requester.
-
- VAR=VARIABLE/K is the name of the environment variable that will
- contain the input of the user; it must obey to the
- rules of DOS; the default is `GetStringResult'.
- Do not mix with STDOUT keyword.
-
- GLOBAL/S if present , the variable will be global (setenv);
- the default is a local variable (set). Do not mix
- with STDOUT keyword.
-
- STDOUT/S if present, the resulting string will be printed
- in stdout (i.e. on the Shell you started
- GetString) and not stored in any variable.
-
- PUBSCREEN/K is the name of the Public Screen on which you want
- your requester appear.
-
- The keywords above followed by `/K' MUST appear in the command line
- followed by their argument. Those followed by `/S' act like switches,
- i.e. if they appear, the corresponding feature will be enabled.
- Remember to use apices when necessary!
-
- To find Public Screens names, I have written PubScreenNames, a small
- utility that you should find in the same place you found GetString.
-
- A simple example of how to use GetString is given below:
-
- ; stuff...
-
- GetString "Insert Date:" STRING "24-02-1972 4:00" VAR tmpDate
- date $tmpDate
- unset tmpDate
-
- ; or even...
-
- date `GetString "Insert Date and Time" STDOUT`
-
- ; even more stuff...
-
- Note that above in the first GetString line, you must NOT include the
- `$' sign before the variable name! Once more, note the use of
- backquote (a new 2.0+ feature!) in the second GetString line: it
- means that what will be printed by the `backquoted' command, will
- became a parameter for date (in this case) and will be no more printed.
-
- Again, note that the title MUST ALWAYS be supplied; this is a feature,
- because it is fundamental when the requester appears. Try to imagine
- a requester without a title appearing in front of you... :)
-
-
- 4. The Language
- ===============
-
- I have used E language to write GetString. What? E ?! Yea! Go and
- see the source !!! :-)
- But Why? Because it is a very powerful simple-to-use language
- dedicated explicitly to our Amiga, influenced by C and Modula-2, so
- you can imagine its power. It offers an incredibly vast number of
- features, like high speed in compiling, extremely compact executables,
- inline assembly, direct access to Amiga Shared Libraries, powerful
- type system, exception handling, etc.
-
- Cool, eh? Try it, if you do not believe to your eyes ! :-)
- The author of E language is:
-
- Wouter van Oortmerssen ($#%!)
- Levendaal 87
- 2311 JG Leiden
- HOLLAND
-
- If you have access to Email:
-
- Wouter@alf.let.uva.nl (E-programming support)
- or: Wouter@mars.let.uva.nl (personal)
- or: Oortmers@gene.fwi.uva.nl (other)
-
-
- 5. The Author
- =============
-
- If you want to send me bug-reports or a time-bomb *:), I can be
- contacted in the following manners:
-
- by snail-mail
-
- Diego Caravana
-
- V. Liguria, 24
- 10071 Borgaro (TO)
- Italy
-
- by e-mail
-
- `Diego Caravana' on
-
- FIDO 2:334/308
- 2:334/308.9
- AMIGANET 39:101/3
-
- Internet Diego.Caravana%bbs@osra.sublink.org
-
- To find me and the E language stuff, you can call the BBS on which I
- am CoSysOp (located in Turin, Italy):
-
- *The New ATH*
- ~~~~~~~~~~~
- TEL +39-11-5629284
- +39-11-5629290
- FIDO 2:334/308
- AMIGANET 39:101/3
- Internet <soon>
-
-
-