• 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: Tiger: determining if a script is being run as an application
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tiger: determining if a script is being run as an application


  • Subject: Re: Tiger: determining if a script is being run as an application
  • From: kai <email@hidden>
  • Date: Mon, 6 Jun 2005 03:27:29 +0100


On Monday, June 6, 2005, at 02:42 am, Stephen Jonke wrote:

Now, and this is really weird, the following returns "application" when run in script editor or via FastScripts, but returns "script" when run as an application:

  class of parent of parent of me

Can anyone explain this weirdness?

If my family's anything to go by, grandparents can behave very strangely indeed... ;-)


Better, is there some reliable and unlikely to change way to determine if your script is being run as as script application or not?

I'm not in Tiger, Stephen - but something like the following has worked here for some time. If it still works in Tiger (and I can't think of a reason why it shouldn't), then it's probably a fairly safe bet:


(info for (path to me))'s file creator is "aplt"
--> true (if it's a script application)
--> false (if another app is running the script)

---
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


  • Follow-Ups:
    • Re: Tiger: determining if a script is being run as an application
      • From: Stephen Jonke <email@hidden>
References: 
 >Tiger: determining if a script is being run as an application (From: Stephen Jonke <email@hidden>)

  • Prev by Date: Running an installer program from a script
  • Next by Date: Re: Tiger: determining if a script is being run as an application
  • Previous by thread: Tiger: determining if a script is being run as an application
  • Next by thread: Re: Tiger: determining if a script is being run as an application
  • Index(es):
    • Date
    • Thread