home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Fish 1
/
GoldFishApril1994_CD1.img
/
d1xx
/
d102
/
silicon
/
sil-icon_readme
< prev
next >
Wrap
Text File
|
1987-09-06
|
3KB
|
47 lines
[Revision 8701.3]
Invoking Sili(Con:) from an icon
________________________________
Normally you will probably want to start Sili(Con:) running from the
Startup-Sequence file, but you can also invoke it directly from the
WorkBench if you use Xicon as an intermediary. (You can't start this
version DIRECTLY from an icon -- only from the CLI.)
"Sil-Icon" on this disk is an example of how to do this. Double-click
on the icon to see it work, and investigate HOW it works by looking at
the Info (from the WorkBench menu) for the icon and the startup scripts:
Sil-Icon itself and Sil-Icon_script. (And read on below...)
It is set up to start Sili(Con:) from this disk: if you want to move it
to your own environment, you will probably have to change both the icon
info and the startup scripts. At startup time you have to have both Xicon
and the DOS commands "NewCLI" and "Run" available. NewCLI and Run should
be in your C: directory; Xicon can be anywhere, provided the icon has its
default tool set to the right pathname.
The mechanism of operation when you invoke the icon is as follows.
The icon starts its tool Xicon, which notes from the first ToolTypes line
(MODE=closewindow) that it is to close the window and terminate immediately
it has done its work. The directory it has been invoked from is recorded
in a ram file (LOCDIR=), some explanatory text is displayed from the file
"sil-icon_text", then it automatically continues with its associated script
file "Sil-Icon". This just uses the ram file to set the current directory
correctly, and invokes newcli with the second file "Sil-Icon_script" to
actually start sili (after a couple of informational messages).
The startup sequence may seems strangely complex, but it was done this way
to make it a little less dependent on the actual disk configuration. The
first script sets the correct directory, while the second is supplied to
newcli to invoke Sili(Con:) properly. (In case you wondered, you COULD run
Sili(Con:) directly from Xicon, but there are snags: you could issue
commands all right -- and they would be executed -- but as mentioned in
the Xicon Manual you can't use the Xicon window itself for console
input, so you wouldn't be able to interact with programs when they
needed it. Working though NewCLI avoids these problems. In fact, you
might find other uses for this approach where you want Xicon to run
interactive commands.)