o What is CLImate?
CLImate is a command line interface. It lets you control your
Macintosh using English commands. You can create or delete files
and folders, rename them, or move them to different locations on
your disk. You can also start up applications, format disks, or
shutdown your machine all from within CLImate. It offers more than
25 different commands to control you Macintosh. Furthermore, you
can create double-clickable scripts that combine these sequences
of commands.
CLImate incorporates some of the most popular commands found in
other command line systems such as MS-DOS, AmigaDOS, and UNIX. It
also includes a BASIC interpreter that enables you to script your
Macintosh without AppleScript.
CLImate does not replace the Macintosh operating system-it
supplements it by giving the user more and different ways to solve
their computing problems.
o Scripting the Finder
The Finder is what gives you Icons, Windows, and a Mouse. It is
the means by which you control your Macintosh. To script the
Finder is to automate the tasks that would usually be done using
the Mouse within the Finder.
CLImate gives you the power to automate these tasks by providing
command line access to your Macintosh. It enables you to
communicate with your Macintosh using English commands and to
create programs (or scripts) that execute combinations of these
commands.
CLImate runs in conjunction with the Finder, it does not replace
or alter it in any way.
o CLImate versus AppleScript
AppleScript is Apple's system scripting language that enables you
to control your Macintosh by sending it commands via AppleEvents.
AppleEvents are available only on System 7, so AppleScript will
work only on System 7. There is no way to script System 6 using
AppleScript.
CLImate, on the other hand, does not use AppleEvents. It foregoes
the message passing strategy by implementing the commands
themselves, thus ensuring system compatibility on System 6 as well
as on System 7. Not using AppleEvents also gives CLImate a speed
advantage over AppleScript.
AppleScript is a program-oriented system where the user writes
scripts and executes them. It lacks an interactive environment
where the user can execute individual commands or a group of
commands by entering them one at a time.
CLImate's command line interface provides this interactive
environment. Simply enter a desired command, hit the return key,
and your command will be executed.
o The BASIC interpreter
CLImate's scripting language is BASIC, one of the most popular
programming languages of all time. It includes some well-known
programming constructs such as: repeat loops, if/then/else
conditionals, subroutine calls, and others. It does not include
any graphics commands since CLImate is intended to be a system
scripting language and not a full-featured programming language.
The following is a small sample BASIC program that demonstrates
the flexibility and usefulness of this scripting language:
10 rem *** Sample ***
20 repeat diskInit
30 eject #1
40 print "Initialize another disk (Y/N)? "; : input ans$
50 if (ans$ = "n") or (ans$ = "N") then exit diskInit
60 print "Insert a disk and press RETURN"; : input ans$
70 format #1, "Untitled"
80 end repeat diskInit
This program will initialize a handful of disks, asking the user
for each new disk. It shows how operating system commands such as
"eject" and "format" are integrated within a BASIC script.
o CLImate's Interface
The CLImate console window is the center for communication between
you and your Macintosh. Simply type in commands at the ">" prompt
and CLImate will execute them. All results will appear in the
console window and can be rerouted into a BASIC variable for use
in your BASIC scripts.
CLImate even lets you customize your command line environment by
using the "alias" command. For example, you can create an
environment similar to Unix by aliasing CLImate's commands as
follows:
alias ls dir
alias cp copy
alias mv rename
alias rm delete
You can also use this command to shorten redundant sequences of
commands by grouping them under a single name.
o Wildcards
CLImate supports the use of wildcard characters, so you can match
a group of files using a pattern of both regular and special
characters. These special characters can be substituted for one or
more unknown characters. Two wildcard characters "*" and "?" are
used to implement this matching method.
The following are examples of the ways wildcards can match a group
of files.
<> To list all files that end in "copy", type:
dir *copy
<> To list all files that contain at least three characters, type:
dir *???
<> To list all files that start in "T", end in ".bas", and contain
at least three more characters in between, type:
dir T*???.bas -or- dir T???*.bas
The flexibility of the wildcard mechanism combined with the BASIC
scripting system enables you to create powerful and extensive
system scripts to effectively control your Macintosh environment.
______
Sample programs bundled with CLImate include "Backup.bas" which
backs up an entire hard disk to floppy disks, "WordFind.bas"
which searches a group of files for a particular string,
"AppLauncher.bas" which collects a group of applications and
launches them at the same time, and several others. All sample
programs are fully documented and offer tips on how to modify or
reuse the code to create even more powerful programs.
CLImate comes packaged as a single application that occupies less
than 70K of disk space. Installation is as simple as copying the
application file and the accompanying example folder onto the
hard disk.
CLImate is available now from Orchard Software, Inc. for $59.95
plus $3 shipping (overseas shipping is $6). MA residents add 5%
sales tax. Send a check or money order made payable to:
Orchard Software, Inc.
P.O. Box 380814
Cambridge, MA 02238-0814
(617) 876-4608