Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Called script won't store property




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... ;-)

---
kai

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-users/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.