[comp.sys.mac.programmer] Launching apps from a driver?

rich@GS8.SP.CS.CMU.EDU (Richard T Goodwin) (03/14/91)

This is posted for a friend with limited access to the net.  
 
--------
Hi,
 
We are writing an application for wide-area electronic mail transfer and
require a way to set up a schedule such that the application will be launched
and transfer mail according to a user-defined schedule (e.g. Mon-Fri from 8 am
to 6 pm every hour).  We would like the solution to work in Finder and
MultiFinder with System 6.0.2 and higher.
 
The only solution we could come up with that meets the criteria is a device
driver that looks at the schedule and launches the application whenever the
time is right.  We launch using the method described in Tech Note 126.  We are
issuing a sub-launch when running in MultiFinder and a regular launch when
running in Finder.
 
Things work fine in MultiFinder, but in Finder there are two problems:
1)  Depending on which other application is currently running, we sometimes
crash when we attempt to launch our application.
 
2)  How do we gracefully shutdown the current application (so that it closes
any unsaved windows, etc) before launching our own?
 
We know of an INIT, On Cue, which launches under Finder with neither problem
above, so we think it can be done.  However, documentation is scarce on this
subject.
 
Does anyone know the tricks to launching applications from a driver while
running under Finder?
 
Thanks,
 
Jay Gauthier @ Telesis North
 
--------

Posted by Richard.Goodwin@CS.CMU.EDU