• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Called script won't store property
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Called script won't store property


  • Subject: Re: Called script won't store property
  • From: kai <email@hidden>
  • Date: Mon, 28 Feb 2005 19:41:14 +0000


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:
This email sent to email@hidden


  • Prev by Date: Recording hangs
  • Next by Date: Re: Called script won't store property
  • Previous by thread: Re: Called script won't store property
  • Next by thread: Re: Called script won't store property
  • Index(es):
    • Date
    • Thread