home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
swCHIP 1991 January
/
swCHIP_95-1.bin
/
ikony
/
animart
/
animator.doc
< prev
next >
Wrap
Text File
|
1995-12-09
|
9KB
|
170 lines
ANIMAT.EXE (VERSION 1.0) Copyright (c) 1993 ??????????????
-------------------------------------------------------------------------
First Published in PC Magazine June 15,1993 (Utilities)
-------------------------------------------------------------------------
ANIMAT.EXE:
ICON ANIMATOR is a Windows 3.1 utility that gives you the
ability to bring an icon to life when you minimize a running application,
by displaying a timed sequence of icon frames in place of the usual static
icon. Up to 16 animation sequences can be used at once, each associated
with a different application. The frame rate (the amount of time between
frames) for each sequence is user-selectable, and different animated icons
can run at different speeds.
Not only do icons add fun to your Windows environment, they also
make minimized programs easier to recognize. With programs like IconDraw,
Borland's Resource Workshop, Norton's icon editor, or with our own IKE
utility (PC Magazine, March 26, 1991), you can customize your icons, but
we decided to go a step further. Until now, icons have remained static
and inert. Wouldn't it be nice to see the pencil scribble back and forth
when you minimize NOTEPAD?
To recompile the program after making changes of your own, you'll
need either the Borland C++ 3.1 compiler or the Microsoft C 6.0 compiler
and the Windows SDK.
Before you can put ICON ANIMATOR to work, of course, you must create
the individual images (the frames) that will comprise the animation
sequence. For this you'll need a separate icon editor. In addition to
the editors mentioned at the outset, any number of public domain icon
editors are available for downloading from various bulletin boards.
In selecting a suitable icon editor, look for two things: the
ability to draw an icon transparently, that is, without a background
of its own; and the ability to save the drawn image under a filename,
move the entire image a few pixels and save it under a new filename,
move it and save it again, and so on. This will eliminate the need to
redraw the entire icon for each frame of the animation sequence.
For example for a bouncing ball sequence, you might begin your
frame sequence by creating an image with the ball at the top of the
editing area. Save this first frame as BALL1.ICO. The next frame,
to be saved as BALL2.ICO, will use the same image, but this time it
will be drawn two pixels lower, and so on, until the ball reaches the
bottom of the editing area. (Typically, the editing area is 32 by 32
pixels overall.) If the ball is only to bounce up and down, you can
then re-use your previously drawn icons in reverse order to show the
ball traveling back up to the top of the frame.
Including a numeral as part of each .ICO filename will help you
keep their order straight when you are ready to put them into an
animation sequence (an .ANM script file) for ICON ANIMATOR to run.
To get you started, I've included the .ICO and .ANM files for the
bouncing ball as part of the ZIPped archive you can download from
PC MagNet.
USING ICON ANIMATOR
After downloading ANIMATOR.EXE, copy it to the drive and directory
from which you want to access it under Windows. There are several ways
to run the program. As with most Windows applications, you can run it
using the File Run menu selections. If you don't want ICON ANIMATOR
to start up automatically, you can put it in any group you wish. Since
you'll probably want some of your regular programs to use animated icons
automatically, however, you'll normally install ANIMATOR in your Startup
Group.
To do this, simply highlight the Startup Group in Program Manager,
select the File New menu command, choose Program Item, and click OK.
Fill in an icon title (in this case, Animator would be the obvious
choice) in the Description edit box, and enter the complete path and
executable filename on the Command Line. As your working directory,
specify the directory in which you keep ANIMATOR's frame (.ICO) and
script (.ANM) files. Finally, you'll want to check the Run Minimized
box so that ANIMATOR won't come up atop your Program Manager each time
you start Windows.
Once you have installed the utility and produced a series of images
with your icon editor, you're ready to use ANIMATOR to create a script
(.ANM) file. When you run ANIMATOR and choose File New, an <Untitled>
window will appear. Select Animate and choose Append Icon To End Of
List. ICON ANIMATOR will now display a File Selection dialog box that
contains your working directory. Double-click on the .ICO file that
contains the image that you want to place first in your animation
sequence (BALL1.ICO, for example). ICON ANIMATOR will display this
file--complete with image and full pathname--in the window in which your
script file is being created.
If you should decide to add a second image to your animation
sequence (BALL2.ICO, for instance), simply repeat the process:
Choose Animate, then select Append Icon To End Of List, double-click
on the correct .ICO file, and ANIMATOR will display it in the <Untitled>
window as the second item.
Either during or after creation of an .ANM script, you may find
it necessary to make editing changes. If you need to edit a script you
have already created, simply select File Open. ICON ANIMATOR will
present a list of all the .ANM files in your working directory.
Double-click on the script you want to edit and ANIMATOR will display
it in the window. Obviously, if you're in the process of creating a
script, it will be displayed already.
Suppose, for example, that after correctly making BALL1.ICO the
first frame in your sequence, you accidentally skip BALL2.ICO and make
BALL3.ICO the second frame in the sequence. If you double-click on
BALL3.ICO to highlight it, and you then select Insert Icon into List
from the Animate menu choices, you'll be able to repair your omission.
To remove an icon frame file from the list, simply highlight it and
select Delete Icon from List from the Animate menu.
ICON ANIMATOR also supports the File Manager's drag-and-drop
protocol as an alternate way to insert or append icons. To insert an
icon or a list of icons into a specific position, select the file(s)
from File Manager (either with the mouse or by choosing File Select
Files), and drag the file atop the desired position in the icon script
list. Dragging past the end of the list and releasing the left mouse
button appends the file to the end of the list.
After your list of frame filenames is complete, you have but two
remaining tasks. First, you must specify the frame rate; that is, the
time interval to be inserted between frames. Second, you must associate
the animation sequence with an application. You execute both these
configuration options by selecting Settings from the Animate menu.
The default time interval between frames is 100 milliseconds, but you
can choose any value between 20 and 20,000 ms.
There are two ways to associate or link an animation sequence to
an application. If the application is already running, press the Link
to Running Task button; otherwise, press Link to an Executable File.
Your choice will be displayed to the right of the words Linked to File.
To avoid losing the linkage when ANIMATOR is closed, you should also
check the Automatically Animate check box.
After you have linked an animation sequence to an application, you
can see it work by selecting Go! from the Animate menu and then minimizing
the application. At this point, however, your script has not yet been
saved, so don't choose File Close. Rather, select the File Save (or
File Save As if you want a new filename for your script) to record what
you have done.
The Stop and Go! choices on the Animate menu form a toggle whose
status is reflected by the status bar at the bottom of the main ANIMATOR
window. ICON ANIMATOR also has a Window drop-down menu that contains
the standard Cascade, Tile, Arrange Icons, and Close All selections.
It also shows the command line for all open ANIMATOR windows. Selecting
a script window title in the menu activates that specific script.
Once you have prepared the animation scripts, add the ones you
want to use regularly to the ANIMATOR Command Line as parameters. To do
this, simply highlight ANIMATOR in your Startup Group, select File
Properties from the Program Manager menu, and add the animation script
filenames to the Command Line. For example, if you keep ICON ANIMATOR
and its related files in the PCMUTILS subdirectory of your Windows
directory on drive C:, enter
C:\WINDOWS\PCMUTILS\ANIMATOR.EXE BALL.ANM
on the Command Line. To load more than one script, just enter it thus:
C:\WINDOWS\PCMUTILS\ANIMATOR.EXE BALL.ANM BELL.ANM
Note: In order for any program you run to have its icon replaced
with its animating icon automatically, you must put the script file on
the command line as a parameter.
-------------------------------------------------------------------------
PHILIP B. ESKELIN, JR., IS A SOFTWARE ENGINEER AT TURNING POINT SOFTWARE.
-------------------------------------------------------------------------