Detecting Launched Applet
Detecting Launched Applet
- Subject: Detecting Launched Applet
- From: email@hidden
- Date: Mon, 10 Dec 2001 08:42:50 EST
I have an intersting problem that I've encountered. I have an applet that is
in the Startup Items folder (OS 8.6 and 9.1). It runs everytime the system
boots. On occassion, I need to run it manually. For reasons that aren't
important to this problem, I need to detect whether the script has been
launched on startup of the computer or manually by the user.
Currently, I do this by checking to see if the applet is the current Finder
selection (i.e. it was double-clicked, so it was launched by the user). That
works fine, except it will fail if the script is run from an alias or from
the recent apps menu in the Apple Menu, for example.
So the question is, how can I detect if the applet was launched during the
startup process or by the user (via any method) at some point later?
Thanks.
Ken Fleisher
email@hidden