home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / sys / mac / programm / 20155 < prev    next >
Encoding:
Internet Message Format  |  1992-12-22  |  2.1 KB

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