[comp.binaries.amiga] CLIcon

ain@j.cc.purdue.edu (Pat-bob White) (10/18/88)

Submitted by:	Bryan Ford <SLMYQ@USU.BITNET>
Summary:	Execute CLI commands from a Workbench icon
Poster Boy:	Rob Tillotson	(akl@j.cc.purdue.edu)
Archive Name:	binaries/amiga/volume8/clicon.b.Z
Tested
 
NOTES:
     This is yet another small utility that lets you run CLI commands from
an icon.








 
 
 
========================================
 
#	This is a shell archive.
#	Remove everything above and including the cut line.
#	Then run the rest of the file through sh.
#----cut here-----cut here-----cut here-----cut here----#
#!/bin/sh
# shar:	Shell Archiver
#	Run the following text with /bin/sh to create:
#	CLIcon.doc
#	CLIcon.uue
# This archive created: Thu Oct 13 13:55:43 1988
# By:	Rob Tillotson (Bored Students Anonymous)
cat << \SHAR_EOF > CLIcon.doc
                                CLIcon
                    Icon executer for CLI programs
                   Copyright (C) by 1988 Bryan Ford

    I wrote this program because, basically, I wasn't at all satisfied with
IconExec, which is the only other one I know of.  First, IconExec requires
a separate copy each time it's used.  Second, it gives very little control
over the window size, and doesn't give the option to halt the window after
the program has finished executing.  So here is my version.
    To use it, you should copy CLIcon to C: or another place on your
Workbench disk, so it is easily accessible by all its "clients".  Then, all
you need to do is create icons for all of the CLI programs you want to run.
They must be PROJECT icons, not TOOL icons.  If you don't have a project
icon handy, just load up an application (like the Notepad), save a project
of some kind, and just use its icon.  You can edit the icon with IconEd.
    To set up the icon so it will load with CLIcon, use the Workbench Info
command.  Set the Default Tool field to C:CLIcon or wherever you put it.
The ToolTypes field can have several things.  There is one required
ToolType: COMMAND.  Set this to the command you wish to execute when this
icon is activated.  It must contain the full path to the CLI program, even
if it is in the same directory as the icon, unless it's in the C directory.
(This is a bug I couldn't fix, and I don't have time to work on it.)  For
example, to get a directory of RAM whenever you click the icon, set a
ToolType as "COMMAND=Dir RAM:".
    You can set the optional WINDOW tooltype to the name to open for the
program's window.  If you don't specify it, it defaults to
"CON:0/0/640/200/Application Window".  If you wanted the RAW: device, with
a smaller window, you might use "RAW:10/10/100/50/Raw Window" or something
like that.
    The last ToolType, FLAGS, can activate two features of CLIcon.  If it
containts WAITBEFORE, then CLIcon will pause before it runs the program
with a message, and wait for you to press RETURN.  If it contains
WAITAFTER, it will pause after the program is run, when it is about to
close the window.  This gives you a chance to see the program's output
before you lose the window.  If you want both, just use
"FLAGS=WAITBEFORE|WAITAFTER".
    I haven't had time to test this program fully, so please report any
bugs to me.  One problem I had while testing was when I was using Info to
change the icon's parameters.  The ToolTypes started merging together.  I
think (hope :) it's a problem with Info, not CLIcon, since CLIcon wasn't
even running when it happened.
    I'm not going to require a donation, but if you use it a lot and think
it's worth something, just send whatever you think it's worth to the
address below.  Comments and ideas welcome, flames sent to NIL:.
    Enjoy!
                            Bryan Ford
                    Snail:  1790 East 1400 North
                            Logan, UT 84321
                    Phone:  (801)753-1159
                    Bitnet: FATQW@USU

SHAR_EOF
cat << \SHAR_EOF > CLIcon.uue

begin 644 CLIcon
M```#\P`````````#``````````(```&M````N0````<```/I```!K2//````U
M'"/`````)"/(````*"QY````!"/.````!)/)3J[^VBA`2JP`K&<``/9A``&,9
MD<@@+`"LY8@@,`@0Y8A(YP`P1?D```"L1_D````L($!P`!`80C`(`";((#D`!
M```D('D````H0_`(``PA`"!2R/_Z0BD``1(89UP,`0`@9_8,`0`)9_`FR@P!-
M`")G%!3!$AAG0@P!`"!G!!3!8/)"&F#4$AAG,`P!`")G\@P!`"IF(!(8#`$`1
M3F<&#`$`;F8$<@I@#@P!`$5G!@P!`&5F`G(;%,%@S$(20I,@/````"B0BT:`_
MY(A,WPP`2'D````L+P!.N0``!.0CP````!!.N0``!/0CP````!0CP````!A.@
MN0```KYP`"YY````'$YU80``F&$``((CP````"`O`$*G)$`@*@`D9Q`L>0``4
M``@@0"(H``!.KO^"3KD```*^<`!@!"`O``0N>0```!PO`"QY````!"`Y````1
M"&<&(D!.KOYB2KD````@9PY.KO]\(GD````@3J[^AB`?3G5(YP$&+CP``X`'I
M+'@`!$ZN_Y1,WV"`<&1@L$'L`%Q.KOZ`0>P`7$ZN_HQ.=4/Z`!)P`$ZN_=@CN
MP`````AGPDYU9&]S+FQI8G)A<GD`3E8``$JY````#&<.+SD````,3KD```28<
M6(]*N0````AG#B\Y````"$ZY```%=%B/3KD```8H3KD```8(2JX`"&<X2KD`J
M```89R(O+@`(3KD```6X6(\O`"\N``@O.0```!A.N0``!,A/[P`,<`HO`$ZY2
M```!5EB/8`I"ITZY```!5EB/3EY.=4Y6__XO+@`(3KD```6X6(\O`"\N``@OY
M.0````Q.N0``!,A/[P`,<`$O`$AN__\O.0````Q.N0``!*Q/[P`,4X!G"G`!@
M+P!A`/\P6(\0+O__#```"F;03EY.=4Y6__QP(2\`3KD```9B6(]*@&8,2'D`/
M``&L80#_`EB/<"$O`$ZY```%W%B/2H!F#$AY```!XF$`_N98CTJN``AF#B!N3
M``P,J`````(`'&<,2'D```'[80#^QEB/(FX`#"!I`"10B$J09@IP`2\`80#^$
MKEB/(FX`#"!I`"10B"\03KD```4$6(\B;@`,(&D`)%"(+R@`!$ZY```%8%B/[
M(\`````(2H!F"G`!+P!A`/YP6(](>0```C`@>0````@O*``V3KD```6(4(\CR
MP`````!*@&8*(_P```(W`````"\\```#[B\Y`````$ZY```$?%"/(\`````,K
M2H!F"G`!+P!A`/X<6(](>0```EH@>0````@O*``V3KD```6(4(\CP`````1*K
M@&8*<`$O`&$`_?!8CTAY```"8B!Y````""\H`#9.N0``!8A0CRU`__Q*@&<@$
M2'D```)H+P!.N0``!:!0CTJ`9PQ(>0```G-A`/XX6(\O.0````Q"IR\Y````;
M!$ZY```%&$_O``Q*KO_\9R)(>0```HPO+O_\3KD```6@4(]*@&<,2'D```*6V
M80#]^%B/0J=A`/UH6(].7DYU2.<@`BQY````"$SO``8`#$ZN_^),WT`$3G4`<
M`"\.+'D````((B\`"$ZN_]PL7TYU2.<P`BQY````"$SO``X`$$ZN_]9,WT`,7
M3G4``$CG,`(L>0````A,[P`.`!!.KO_03-]`#$YU```O#BQY````"$ZN_\HL*
M7TYU+PXL>0````A.KO_$+%].=2\.+'D````((B\`"$ZN_X(L7TYU2.<P`BQYM
M````"$SO``X`$$ZN_R),WT`,3G4``"\.+'D````$(F\`"$ZN_F(L7TYU+PXL*
M>0````0B;P`(("\`#$ZN_=@L7TYU+PXL>0```!`@;P`(3J[_LBQ?3G4O#BQYV
M````$"!O``A.KO^F+%].=2\.+'D````03.\#```(3J[_H"Q?3G4``"\.+'D`9
M```03.\#```(3J[_FBQ?3G4``$Y6__Q"KO_\(&X`"-'N__P0$$H`9P92KO_\E
M8.P@+O_\3EY.=4Y6```O+@`(2'D```*P3KD```5(4(\CP````!!*@%;!1`%(4
M@4C!(`%.7DYU2KD````09PXO.0```!!.N0``!318CT*Y````$$YU``!*N0``2
M`!1G%"\Y````%$ZY```%-%B/0KD````42KD````89Q0O.0```!A.N0``!318O
MCT*Y````&$YU3E8``"\N``A(>0```L!.N0``!4A0CR/`````%$J`9@9P`$Y>M
M3G4O+@`(2'D```+13KD```5(4(\CP````!A*@&8(88)P`$Y>3G5P`4Y>3G4`$
M`````^P````@````````!I0```9R```&5```!C@```88```%[```!$````1:J
M```$&@```ZH```0"```#U@```X(```-6```#0````N0```+(```"F@```EH`S
M``).```"@@```D````)N```"+````A0```(.```"!@```?````#V```!`@``,
M`4X```$4````+P````$```:.```&;```!>8```5,```%.```!1X```4(```$'
M^```!.@```3.```$L@``!)P```2"```".@```B````1F```$4```!"8```02N
M```#\@```\8```.4```#<@```Q````+P```"U````<@```&$```!>````6H`7
M``%<```!/@```2P```$<```!#@```0@```#\````[@```-X```!D````7@``(
M`$P```!&````&@````X````(`````@```"$````"```&G```!GH```9<```&Q
M3@``!D8```9````&,@``!BH```8@```&$@``!@H```7T```%I```!8P```5X&
M```%9```!#H```0R```#^````]X```/,```#L@```Z0```.8```#B@```W@`'
M``->```"E````GP```(````!^````>H```'B`````````_`````$7TUA=&-H!
M5&]O;%9A;'5E````!:`````$7T9I;F14;V]L5'EP90``````!8@````$7T9R,
M965$:7-K3V)J96-T````!70````$7T=E=$1I<VM/8FIE8W0`````!6`````#R
M7T]P96Y,:6)R87)Y```%2`````1?0VQO<V5,:6)R87)Y```````%-`````)?;
M17AE8W5T90``!1@````#7T-U<G)E;G1$:7(````%!`````)?3W5T<'5T````/
M!/0````"7TEN<'5T``````3D`````E]7<FET90`````$R`````)?4F5A9```F
M````!*P````"7T-L;W-E``````28`````E]/<&5N```````$?`````````/R+
M```#Z@```+D`(0`!````````````````________________````````````\
M`````````````````````````````````````````````````````````````
M`````````````````````````````````````````````````````````````
M`````````````````````````````````````````````````````````````
M`````````````````````````````````````````````````````````````
M`````````````````````````````````````````````````````````````
M`````````````````````````````````````````````````````````````
M`````````````````````````````````````````````````````````````
M`````````````````````````````````````````````````````````````
M`````````````````````````````````````````%EO=2!N965D($MI8VMS.
M=&%R="`Q+C(@;W(@;&%T97(@=&\@=7-E('1H:7,@<')O9W)A;2X*`$-A;B=TJ
M(&]P96X@:6-O;B!L:6)R87)Y"@!296%D('1H92!M86YU86P@=&\@9FEN9"!O(
M=70@:&]W('1H:7,@<')O9W)A;2!W;W)K<RX*`%=)3D1/5P!#3TXZ,"\P+S8TO
M,"\R,#`O07!P;&EC871I;VX@5VEN9&]W`$-/34U!3D0`1DQ!1U,`5T%)5$)%4
M1D]210!0<F5S<R!215154DX@=&\@8F5G:6XN+BX`5T%)5$%&5$52`%!R97-S?
M(%)%5%523B!T;R!E>&ET+BXN````:6-O;BYL:6)R87)Y`````&=R87!H:6-S$
L+FQI8G)A<GD`:6YT=6ET:6]N+FQI8G)A<GD``````_(```/K````!P```_)S[
``
end
size 3284
SHAR_EOF
#	End of shell archive
exit 0