click

this

ScuzzBlog: Diaries June 2024

Entry 22nd June 2024: Post 1: Amiga icons - The power of IconX.


Amiga icons - The power of IconX.

I do love Amiga icons, and do enjoy designing many of my own. The
first thing I wanted to do when writing scripts for the amiga was
to associate it with an icon so I could simply click it from the
Workbench.

So how do I do that ?

In the 'C' drawer in Workbench is a handy tool call 'IconX'. Tools
in C are part of the AmigaDOS language and as such are understood
by the Shell/CLI without directing to a specific tool. If you look
at the 'Information' drop down when selecting any icon on the WB
it will identify any default tool associated with the icon.

Having a copy of DOpus is always useful when studying and managing
icons because it automatically splits any icon into the actual item
under consideration and the associated icon. Dopus also lets you
view the .info [icon] much the same way as Information from the main
drop down menu.

OK so you have created a script or series of instruction in a Text
Editor and saved as a text file. Next you find a handy 'Project' or
.info file and using DOpus associate that .info file with the text
file that you created giving the same base name. The example I give
is 'run nmbd' with 'run nmbd' as the script and 'run nmbd.info' as
the icon.

The icon will be called a (Project), the Default Tool you edit so
that it uses 'IconX' and the Tool Type FILETYPE=Text as it is a
Text File.

Now when you save the Icon like magic the script is initiated. Other
aspects that come into play here are the 'user-startup' that will
ASSIGN certain drawers [ application folders] identifying their
file path so that scripts can find stuff. In the example the various
program files were in the Samba directory.

Once you have an icon you can very quickly change its appearance by
using a piece of software from Aminet called Icon Copy which will
copy the .info part of any icon and use it as the one you are
wishing to change. It leaves the working program, project, drawer etc
as is only changing the icon.

Anyhoo that is that. You should learn to use scripts to activate
instructions on the Amiga that you repeat a lot. It really is fun.

Here are some words, not mine on the wonders of IconX.



What is IconX?

IconX is a program stored in the C: directory. It is designed to
execute command scripts (text files that contain a number of commands,
similar to batch files on the PC) from the Workbench. It can be
found on your original Workbench disk as well as on most magazines.


ICONX allows you to execute a script file of AmigaDOS commands via
an icon.

To use ICONX, create or copy a project icon for the script. Open
the icon's Information window and change the Default Tool of the
icon to C:ICONX and select Save to store the changed .info file.
The script can then be executed by double-clicking on the icon.

When the icon is opened, ICONX changes the current directory to
the directory containing the project icon before executing the
script. An input/output window for the script file will be opened
on the Workbench screen.

Several Tool Types can be specified in the icons for the script
files. The WINDOW Tool Type lets you provide an alternate window
specification for the input/output window. By default, the window's
specification is:

WINDOW=CON:0/50//80/IconX/AUTO/WAIT/CLOSE

This has the effect of opening a window only if there actually is
some output performed by the script. If a window does open, it will
remain opened after the script terminates, until the user clicks
on its close gadget.

The WAIT Tool Type lets you specify the number of seconds the input
/output window should remain open after the script terminates.
Using this option will cause the default input/output window to not
have a close gadget. There is also a DELAY Tool Type which works
in a very similar way, except that its parameter is in 1/50th of a
second, instead of in seconds.

The STACK Tool Type lets you specify the number of bytes to use
for stack for the script execution. If this Tool Type is not provided,
the default 4096 bytes is used.

Finally, the USERSHELL Tool Type lets you cause the script file to
be run using the current User Shell instead of the normal ROM Shell.
You must specify USERSHELL=YES for this to happen. User Shells are
third party shells that you can purchase and install in your system
to replace the standard shell environment that comes with the
operating system.

Extended selection can be used to pass files that have icons to
the script. Their filenames appear to the script as keywords. To
use this facility, the .KEY keyword must appear at the start of
the script. In this case, the AmigaDOS EXECUTE command is used to
execute the script file.

[clear as mud ]

Amiga icons - The power of IconX.


scuzz site

If you can only see this CONTENT window
then click the image above for the full site

Last updated 22nd June 2024

Chandraise Kingdom

Keep the Faith
scuzzscink 2024