[comp.sys.mac.programmer] Automatic MPW

marmar@mtk.UUCP (Mark Martino) (11/21/89)

I know how to set up menus in MPW.  I know how to kick off most
applications with a specific file.  Is there some way to use
applications within scripts the way one uses commands in UNIX or
batch files in, excuse me, DOS?

This would be really handy when copying groups of files from TSSNet or
sending files to LaseTalk.  Will this ability  be available at least
in System 7?

tim@hoptoad.uucp (Tim Maroney) (11/22/89)

In article <934@mtk.UUCP> marmar@mtk.UUCP (Mark Martino) writes:
>I know how to set up menus in MPW.  I know how to kick off most
>applications with a specific file.  Is there some way to use
>applications within scripts the way one uses commands in UNIX or
>batch files in, excuse me, DOS?
>
>This would be really handy when copying groups of files from TSSNet or
>sending files to LaseTalk.  Will this ability  be available at least
>in System 7?

Not now, without some serious hacks.  You can launch an application
from a script now, but under Finder, that will be the last thing a
script does, and under MultiFinder, the application will be launched
and the script will continue on without giving you any time to do
anything with the application before the script is done.

However, under System 7.0, it should be possible to write tools which
can be called from scripts, which will manipulate any application using
the AppleEvents mechanism.  There may even be such tools provided with
an MPW upgrade.  Then you will be able to launch an application from a
script, give ti commands from a script, and make it quit from a script.

Of course, if your application is custom, then you can make it a tool
instead and avoid such problems.  But I assume you want to do something
like opening a third-party word processor or terminal emulator.
-- 
Tim Maroney, Mac Software Consultant, sun!hoptoad!tim, tim@toad.com

"But don't you see, the color of wine in a crystal glass can be spiritual.
 The look in a face, the music of a violin.  A Paris theater can be infused
 with the spiritual for all its solidity."
    -- Lestat, THE VAMPIRE LESTAT, Anne Rice