On Mon, 28 Feb 2005 19:54:52 +0100, Emmanuel wrote:
At 6:34 PM +0000 2/28/05, kai wrote:
Is there a good way to distinguish, in a script, whether it was
"run" or double clicked?
From within the script? Not to my knowledge.
I wonder whether "current application" would work here.
Don't think so, Emmanuel - good thought, though. The trouble is that
stuff like 'path to current application', 'path to frontmost
application' and 'path to me' all seem to point to the application
running the script.
The best thing I've come up with so far is to build a name property
into the called app - and then to compare that with the name of one of
the above. However, if someone decides to change the called app's name
(without amending its name property), the whole thing goes kinda
pear-shaped.
Besides, just a name comparison doesn't necessarily guarantee accurate
results - since you could conceivably have two files of the same name
in different folders. I seem to recall that this sort of situation was
a bit easier in OS 9 - where every file had an id. However, I'm not
suggesting we go back... ;-)