home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!comp.vuw.ac.nz!waikato.ac.nz!ldo
- From: ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University)
- Newsgroups: comp.sys.mac.programmer
- Subject: Re: Detecting File Launch
- Message-ID: <1992Dec22.112641.12944@waikato.ac.nz>
- Date: 22 Dec 92 11:26:40 +1300
- References: <1992Dec21.040009.26063@mcs.drexel.edu>
- Organization: University of Waikato, Hamilton, New Zealand
- Lines: 37
-
- In article <1992Dec21.040009.26063@mcs.drexel.edu>, udsugar@mcs.drexel.edu (David Sugar) writes:
- > I am looking for a way to detect how a file was launched. For
- > instance I need to know if an application was launched by
- > being double clicked or weather it was started at startup
- > time because it was in the StartUp Items folder. (I realize
- > that I can check to see if the application is in the Startup
- > Items folder but I need to see if it was user launched.)
-
- This check won't gain you anything anyway, since you might have been launched
- via an alias in the Startup Items folder.
-
- > The reason for this is because if the Application was double-
- > clicked I would like to bring up a preferences screen or
- > something like that, but if the Application was run because
- > it is startup time and the Application is in the Startup
- > Items folder I would like for the Application to do whatever
- > then quit without any user interaction.
- >
- > Any ideas??
-
- I don't think what you want is possible in general. I don't think the Finder
- does any different processing for Startup Items than it does for a user
- open request.
-
- Alternative: have a special document type. If you launch the application by
- opening this, then you don't get the preferences dialog. Put a document of
- this type (or an alias to it) in the Startup Items folder, instead of the
- application itself.
-
- Or split the application into two parts: a faceless part that gets launched
- at startup time, and a front end that the user has to open explicitly to
- configure the faceless part.
-
- Lawrence D'Oliveiro fone: +64-7-856-2889
- Computer Services Dept fax: +64-7-838-4066
- University of Waikato electric mail: ldo@waikato.ac.nz
- Hamilton, New Zealand 37^ 47' 26" S, 175^ 19' 7" E, GMT+13:00
-